Files
fn_registry/bash/functions/pipelines/init_jupyter_analysis.md
T
egutierrez bf1efb2099 feat: externalize apps/analysis to Gitea repos, add analysis table
- Migration 007: repo_url on apps table + analysis table with FTS5
- Analysis struct, parser, CRUD, validation, hash computation
- Selective purge: remote-only apps/analysis preserved across fn index
- CLI: fn app list/clone/pull, fn analysis list/clone/pull
- search/show/list now include analysis results
- Apps removed from git tracking (content lives in Gitea repos)
- .gitkeep for apps/ and analysis/ dirs
- Bash functions: jupyter analysis pipeline, shell utilities
- Browser domain: CDP functions moved from infra to browser

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 04:23:51 +02:00

2.3 KiB

name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, 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 tested tests test_file_path file_path
init_jupyter_analysis pipeline bash pipelines 1.0.0 impure init_jupyter_analysis(nombre: string, [...paquetes_extra: string]) -> void Inicializa un analisis Jupyter completo en analysis/{nombre}/ con venv, paquetes, launcher, MCP y reglas para agentes Claude. Acepta paquetes extra opcionales.
jupyter
analysis
setup
pipeline
bash
launcher
assert_command_exists_bash_shell
find_free_port_bash_shell
init_uv_venv_bash_infra
uv_add_packages_bash_infra
write_jupyter_launcher_bash_infra
write_mcp_jupyter_config_bash_infra
write_claude_jupyter_rules_bash_infra
write_jupyter_registry_kernel_bash_infra
false error_go_core
false
bash/functions/pipelines/init_jupyter_analysis.sh

Ejemplo

# Analisis basico
./init_jupyter_analysis.sh finanzas

# Con paquetes extra
./init_jupyter_analysis.sh duckdb polars duckdb
./init_jupyter_analysis.sh ml scikit-learn torch

# Via fn run
fn run init_jupyter_analysis finanzas
fn run init_jupyter_analysis ml scikit-learn torch

Flujo

  1. assert_command_exists — verifica que uv o python3 estan disponibles
  2. Crea estructura analysis/{nombre}/notebooks/ y analysis/{nombre}/data/
  3. init_uv_venv — crea venv en analysis/{nombre}/.venv/
  4. uv_add_packages — instala jupyter, jupyterlab, jupyter-collaboration, jupyter-mcp-server, pandas, numpy, matplotlib + extras
  5. write_jupyter_launcher — genera run-jupyter-lab.sh con modo colaborativo
  6. find_free_port + write_mcp_jupyter_config — detecta puerto libre y genera .mcp.json
  7. write_claude_jupyter_rules — genera .claude/CLAUDE.md con reglas de agente
  8. write_jupyter_registry_kernel — genera IPython startup con fn_query, fn_search, fn_code y acceso a python/functions/

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.