chore: auto-commit (129 archivos)
- .claude/agents/fn-analizador/SKILL.md - .claude/agents/fn-constructor/SKILL.md - .claude/agents/fn-executor/SKILL.md - .claude/agents/fn-mejorador/SKILL.md - .claude/agents/fn-orquestador/SKILL.md - .claude/agents/fn-recopilador/SKILL.md - .claude/commands/app.md - .claude/commands/compile.md - .claude/commands/cpp-app.md - .claude/commands/create_functions.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -30,7 +30,7 @@ file_path: "python/functions/embedding/model.py"
|
||||
|
||||
```python
|
||||
path = embedding_save_model("intfloat/multilingual-e5-small", ".local/models/e5-small")
|
||||
# path = "/home/lucas/fn_registry/.local/models/e5-small"
|
||||
# path = "$HOME/fn_registry/.local/models/e5-small"
|
||||
```
|
||||
|
||||
## Notas
|
||||
|
||||
@@ -14,7 +14,7 @@ params:
|
||||
- name: size
|
||||
desc: "Lado del cuadrado del PNG en pixels. Default 64. El hub launcher usa 64 para las tarjetas."
|
||||
- name: registry_root
|
||||
desc: "Ruta a la raiz del fn_registry. Si es None usa FN_REGISTRY_ROOT env o /home/lucas/fn_registry."
|
||||
desc: "Ruta a la raiz del fn_registry. Si es None usa FN_REGISTRY_ROOT env o $HOME/fn_registry."
|
||||
- name: style
|
||||
desc: "Estilo del icono igual que generate_app_icon: 'fill_white' (default), 'adaptive_duotone' o 'white_duotone'. CLI: `--style <valor>`."
|
||||
output: "dict con ok=True, count=N (PNGs escritos), out_dir (ruta absoluta), skipped (lista de {name, reason} para apps omitidas)."
|
||||
@@ -54,7 +54,7 @@ print(json.dumps(export_hub_icons('/tmp/hub_icons_test'), indent=2))
|
||||
"
|
||||
|
||||
# Via CLI directo con tamaño personalizado
|
||||
cd /home/lucas/fn_registry
|
||||
cd $HOME/fn_registry
|
||||
python/.venv/bin/python3 python/functions/infra/export_hub_icons.py /tmp/hub_icons --size 128
|
||||
```
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ def export_hub_icons(
|
||||
se sobreescriben.
|
||||
size: Lado del cuadrado del PNG en pixels. Default 64.
|
||||
registry_root: Ruta a la raiz del fn_registry. Si es None, usa la variable
|
||||
de entorno FN_REGISTRY_ROOT o /home/lucas/fn_registry como fallback.
|
||||
de entorno FN_REGISTRY_ROOT o la raiz del repo derivada de la ubicacion del archivo.
|
||||
|
||||
Returns:
|
||||
{
|
||||
@@ -198,7 +198,7 @@ if __name__ == "__main__":
|
||||
parser.add_argument(
|
||||
"--registry-root",
|
||||
default=None,
|
||||
help="Path to fn_registry root (default: FN_REGISTRY_ROOT env or /home/lucas/fn_registry)",
|
||||
help="Path to fn_registry root (default: FN_REGISTRY_ROOT env or repo root derived from file location)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--style",
|
||||
|
||||
@@ -18,7 +18,7 @@ params:
|
||||
- name: out_path
|
||||
desc: "Ruta de destino del archivo TSV. Puede ser absoluta o relativa al cwd. El directorio padre se crea si no existe."
|
||||
- name: registry_root
|
||||
desc: "Raiz del fn_registry. Si None, usa la variable de entorno FN_REGISTRY_ROOT o /home/lucas/fn_registry como fallback."
|
||||
desc: "Raiz del fn_registry. Si None, usa la variable de entorno FN_REGISTRY_ROOT o $HOME/fn_registry como fallback."
|
||||
output: "Dict {ok: True, count: N, out_path: str} con la ruta absoluta del TSV escrito y el numero de apps incluidas."
|
||||
tested: false
|
||||
tests: []
|
||||
|
||||
@@ -50,14 +50,15 @@ def export_hub_manifest(out_path: str, *, registry_root: str | None = None) -> d
|
||||
Args:
|
||||
out_path: Destination path for the TSV manifest file.
|
||||
registry_root: Path to the fn_registry root directory.
|
||||
Defaults to FN_REGISTRY_ROOT env var or /home/lucas/fn_registry.
|
||||
Defaults to FN_REGISTRY_ROOT env var or repo root derived from file location.
|
||||
|
||||
Returns:
|
||||
{"ok": True, "count": N, "out_path": "<abs_path>"}
|
||||
"""
|
||||
root = Path(
|
||||
registry_root
|
||||
or os.environ.get("FN_REGISTRY_ROOT", "/home/lucas/fn_registry")
|
||||
or os.environ.get("FN_REGISTRY_ROOT")
|
||||
or Path(__file__).resolve().parents[3]
|
||||
).resolve()
|
||||
|
||||
db_path = root / "registry.db"
|
||||
@@ -134,7 +135,7 @@ if __name__ == "__main__":
|
||||
parser.add_argument(
|
||||
"--registry-root",
|
||||
default=None,
|
||||
help="Path to fn_registry root (default: FN_REGISTRY_ROOT env or /home/lucas/fn_registry)",
|
||||
help="Path to fn_registry root (default: FN_REGISTRY_ROOT env or repo root derived from file location)",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ ico_path = generate_app_icon(
|
||||
accent_hex="#0ea5e9",
|
||||
out_ico_path="apps/chart_demo/appicon.ico",
|
||||
)
|
||||
print(ico_path) # /home/lucas/fn_registry/apps/chart_demo/appicon.ico
|
||||
print(ico_path) # $HOME/fn_registry/apps/chart_demo/appicon.ico
|
||||
```
|
||||
|
||||
```python
|
||||
|
||||
@@ -6,7 +6,7 @@ import os
|
||||
import unittest
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
sys.path.insert(0, "/home/lucas/fn_registry/python/functions")
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
from infra.http_download_file import http_download_file
|
||||
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
|
||||
import json
|
||||
import sys
|
||||
import os
|
||||
import unittest
|
||||
import urllib.error
|
||||
import urllib.request
|
||||
from io import BytesIO
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
sys.path.insert(0, "/home/lucas/fn_registry/python/functions")
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
from infra.http_get_json import http_get_json
|
||||
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
|
||||
import json
|
||||
import sys
|
||||
import os
|
||||
import unittest
|
||||
import urllib.error
|
||||
from io import BytesIO
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
sys.path.insert(0, "/home/lucas/fn_registry/python/functions")
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
from infra.http_post_json import http_post_json
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ Dos `expressions` con el mismo `lib/expression-name` en la misma stage generan c
|
||||
|
||||
```python
|
||||
import sys
|
||||
sys.path.insert(0, '/home/lucas/fn_registry/python/functions')
|
||||
sys.path.insert(0, '$HOME/fn_registry/python/functions')
|
||||
from metabase import MetabaseClient
|
||||
from metabase.metabase_mbql_validate import metabase_mbql_validate
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
"""Tests para metabase_validate_card_payload y metabase_validate_dashboard_payload."""
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
sys.path.insert(0, "/home/lucas/fn_registry/python/functions")
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
from metabase.validation import (
|
||||
metabase_validate_card_payload,
|
||||
|
||||
@@ -52,7 +52,7 @@ path = hf_snapshot_download(
|
||||
ignore_patterns=["*.bin"],
|
||||
local_dir=".local/models/sd-v1-5",
|
||||
)
|
||||
# path = "/home/lucas/fn_registry/.local/models/sd-v1-5"
|
||||
# path = "$HOME/fn_registry/.local/models/sd-v1-5"
|
||||
|
||||
# Descargar un modelo gated (Llama) con token
|
||||
path = hf_snapshot_download(
|
||||
|
||||
@@ -32,14 +32,14 @@ file_path: "python/functions/notebook/jupyter_discover.py"
|
||||
from notebook.jupyter_discover import jupyter_discover
|
||||
|
||||
# Descubrir con deteccion automatica de puertos
|
||||
instances = jupyter_discover(registry_root="/home/lucas/fn_registry")
|
||||
instances = jupyter_discover(registry_root="$HOME/fn_registry")
|
||||
|
||||
# Escanear puertos especificos
|
||||
instances = jupyter_discover(ports=[8888, 8900])
|
||||
|
||||
for inst in instances:
|
||||
print(inst["url"], inst["analysis"], inst["root_dir"], inst["collaborative"])
|
||||
# http://localhost:8888 estudio_mercados /home/lucas/fn_registry/analysis/estudio_mercados True
|
||||
# http://localhost:8888 estudio_mercados $HOME/fn_registry/analysis/estudio_mercados True
|
||||
```
|
||||
|
||||
## Estructura del dict retornado
|
||||
@@ -51,7 +51,7 @@ Cada elemento de la lista tiene la siguiente forma:
|
||||
"url": "http://localhost:8888",
|
||||
"port": 8888,
|
||||
"analysis": "estudio_mercados", # nombre del subdirectorio en analysis/, detectado via /proc
|
||||
"root_dir": "/home/lucas/fn_registry/analysis/estudio_mercados", # path absoluto real del proceso
|
||||
"root_dir": "$HOME/fn_registry/analysis/estudio_mercados", # path absoluto real del proceso
|
||||
"collaborative": True, # True si YDocExtension esta activo
|
||||
"kernels": [
|
||||
{
|
||||
@@ -75,13 +75,13 @@ Cada elemento de la lista tiene la siguiente forma:
|
||||
|
||||
```bash
|
||||
# Descubrir con deteccion automatica
|
||||
python python/functions/notebook/jupyter_discover.py --registry-root /home/lucas/fn_registry
|
||||
python python/functions/notebook/jupyter_discover.py --registry-root $HOME/fn_registry
|
||||
|
||||
# Puertos especificos, salida JSON
|
||||
python python/functions/notebook/jupyter_discover.py --port 8888 --port 8889 --json
|
||||
|
||||
# Usando variable de entorno
|
||||
FN_REGISTRY_ROOT=/home/lucas/fn_registry python python/functions/notebook/jupyter_discover.py
|
||||
FN_REGISTRY_ROOT=$HOME/fn_registry python python/functions/notebook/jupyter_discover.py
|
||||
```
|
||||
|
||||
Ejemplo de salida en modo texto con multi-instancia:
|
||||
@@ -90,7 +90,7 @@ Ejemplo de salida en modo texto con multi-instancia:
|
||||
Puerto 8888 [colaborativo]
|
||||
url: http://localhost:8888
|
||||
analysis: estudio_mercados
|
||||
root_dir: /home/lucas/fn_registry/analysis/estudio_mercados
|
||||
root_dir: $HOME/fn_registry/analysis/estudio_mercados
|
||||
kernels (1):
|
||||
- python3 estado=idle id=abc12345...
|
||||
sesiones (1):
|
||||
@@ -99,7 +99,7 @@ Puerto 8888 [colaborativo]
|
||||
Puerto 8889 [estandar]
|
||||
url: http://localhost:8889
|
||||
analysis: estudio_embeddings
|
||||
root_dir: /home/lucas/fn_registry/analysis/estudio_embeddings
|
||||
root_dir: $HOME/fn_registry/analysis/estudio_embeddings
|
||||
kernels: ninguno
|
||||
sesiones: ninguna
|
||||
```
|
||||
|
||||
@@ -93,7 +93,7 @@ def test_extract_outputs_handles_streams_and_results():
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
JUPYTER_VENV_BIN = Path("/home/lucas/fn_registry/analysis/pruebas_jupyter/.venv/bin")
|
||||
JUPYTER_VENV_BIN = Path(__file__).resolve().parents[4] / "analysis" / "pruebas_jupyter" / ".venv" / "bin"
|
||||
|
||||
|
||||
def _free_port() -> int:
|
||||
|
||||
@@ -210,7 +210,7 @@ def test_run_cells_non_code_cell_raises():
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
JUPYTER_VENV_BIN = Path("/home/lucas/fn_registry/analysis/pruebas_jupyter/.venv/bin")
|
||||
JUPYTER_VENV_BIN = Path(__file__).resolve().parents[4] / "analysis" / "pruebas_jupyter" / ".venv" / "bin"
|
||||
|
||||
|
||||
def _free_port() -> int:
|
||||
|
||||
@@ -42,7 +42,7 @@ print(r)
|
||||
CLI directo:
|
||||
|
||||
```bash
|
||||
/home/lucas/fn_registry/python/.venv/bin/python3 \
|
||||
$HOME/fn_registry/python/.venv/bin/python3 \
|
||||
python/functions/pipelines/dedup_duckdb_table_by_hash.py \
|
||||
apps/data_factory/data/hn_top_stories.duckdb hn_stories
|
||||
```
|
||||
|
||||
@@ -48,7 +48,7 @@ python python/functions/pipelines/metabase_add_ops_db.py --list
|
||||
El contenedor Metabase debe tener montado el directorio de la app como volumen RW:
|
||||
|
||||
```
|
||||
-v /home/lucas/fn_registry/apps/<app_name>:/data/ops-<app-name>
|
||||
-v $HOME/fn_registry/apps/<app_name>:/data/ops-<app-name>
|
||||
```
|
||||
|
||||
Ademas, el directorio debe tener permisos para el usuario metabase (UID 2000):
|
||||
|
||||
@@ -82,7 +82,7 @@ notes: |
|
||||
|
||||
```bash
|
||||
# Siempre hacer dry-run primero para revisar
|
||||
cd /home/lucas/fn_registry
|
||||
cd $HOME/fn_registry
|
||||
python/.venv/bin/python3 python/functions/pipelines/migrate_issues_frontmatter.py dev/issues --dry-run
|
||||
|
||||
# Aplicar migracion real
|
||||
|
||||
Reference in New Issue
Block a user