814262130d
Nueva funcion write_analysis_md_bash_infra genera analysis.md con frontmatter.
El pipeline ahora acepta --project para crear analisis directamente en
projects/{proyecto}/analysis/{nombre}/, valida que el proyecto exista,
genera analysis.md con dir_path correcto y ejecuta fn index al final.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3.5 KiB
3.5 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | params | output | tested | tests | test_file_path | file_path | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| init_jupyter_analysis | pipeline | bash | pipelines | 1.1.0 | impure | init_jupyter_analysis([--project <p>] [--desc <d>] [--tags <t>], nombre: string, [...paquetes_extra: string]) -> void | Inicializa un analisis Jupyter completo con venv, paquetes, launcher, MCP, reglas Claude, kernel startup y analysis.md. Por defecto crea en analysis/{nombre}/; con --project crea en projects/{proyecto}/analysis/{nombre}/ y ejecuta fn index al final. |
|
|
false | error_go_core |
|
sin salida directa; estructura completa + analysis.md en el destino. Con --project, ejecuta fn index para registrar. | false | bash/functions/pipelines/init_jupyter_analysis.sh |
Ejemplo
# Analisis suelto en analysis/
fn run init_jupyter_analysis finanzas
fn run init_jupyter_analysis ml scikit-learn torch
# Analisis dentro de un proyecto (un solo comando, todo resuelto)
fn run init_jupyter_analysis --project aurgi sale_prices --desc "Comprobacion precios"
fn run init_jupyter_analysis --project aurgi ventas polars --tags "aurgi,ventas"
Flujo
assert_command_exists— verifica que uv o python3 estan disponibles- Crea estructura
{destino}/notebooks/y{destino}/data/ init_uv_venv— crea venv en{destino}/.venv/uv_add_packages— instala jupyter, jupyterlab, jupyter-collaboration, jupyter-mcp-server, pandas, numpy, matplotlib + extraswrite_jupyter_launcher— generarun-jupyter-lab.shcon modo colaborativofind_free_port+write_mcp_jupyter_config— detecta puerto libre y genera.mcp.jsonwrite_claude_jupyter_rules— genera.claude/CLAUDE.mdcon reglas de agentewrite_jupyter_registry_kernel— genera IPython startup confn_query,fn_search,fn_codey acceso apython/functions/write_analysis_md— generaanalysis.mdcon frontmatter ydir_pathcorrecto
Si se paso --project, al final ejecuta fn index para registrar el analisis en registry.db con project_id correcto.
Con --project, el destino es projects/{proyecto}/analysis/{nombre}/ (requiere que projects/{proyecto}/project.md exista); sin el, es analysis/{nombre}/.
Notas
Cada analisis es independiente (propio venv, propio Jupyter, propio MCP). Mismo patron que apps/ pero para exploraciones no reutilizables.
El pipeline usa set -euo pipefail — cualquier fallo detiene la ejecucion.
Paquetes base siempre incluidos: jupyter, jupyterlab, jupyter-collaboration, jupyter-mcp-server, pandas, numpy, matplotlib. Los paquetes extra se añaden a estos.