nbdev with fasthtml
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- jupyter, jupyter-notebook, python
Línea de trabajo
Comienza reproduciendo el comportamiento informado con component.py y el comando uv run python -m hao.component, y después compara la resolución de rutas en Jupyter, en el paquete exportado y en nbdev_docs. Revisa el ejemplo de static-file y el comportamiento de importación de nbdev_docs; se considera terminado cuando el flujo de trabajo compatible con fasthtml y las reglas de rutas de static-file estén documentados, o cuando la brecha de compatibilidad esté claramente identificada.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Should there be a way to use nbdev to develop a package that uses fasthtml?
I'm trying to port the fasthtml 3d-component example to run in nbdev to understand the framework but getting stuck on paths and importers
This is related to my bigger issue which is I can't figure out how to reference static files so that they resolve in Jupyter, exported python package and docs.
I can resolve Jupyter and exported python package, using the following to use .parent in the exported python file and .cwd in Jupyter but can't find any docs on how to rewrite file_path to support nbdev_docs (which crashes not being able to resolve this file).
try:
file_path = Path(__file__).parent/f"../nbs/static/data/csv/Mandarin vocab lists - hsk{config['hsk_level']}.csv"
except NameError:
file_path = Path.cwd()/f"static/data/csv/Mandarin vocab lists - hsk{config['hsk_level']}.csv"
vocab = pd.read_csv(file_path)
I'm suspecting that nbdev & fasthtml (or any ASGI service) aren't compatible because I can happily run exported files in my editable package
python -m hao.flashcards
but the ported 3d-components one (renamed https://github.com/AnswerDotAI/fasthtml-example/blob/main/3d-component/main.py to component.py) will start and then complain about the module as below
$ uv run python -m hao.component
Link: http://localhost:5001
INFO: Will watch for changes in these directories: ['/home/XXX/src/hao']
INFO: Uvicorn running on http://0.0.0.0:5001 (Press CTRL+C to quit)
INFO: Started reloader process [10395] using WatchFiles
ERROR: Error loading ASGI app. Could not import module "component".
Any advice?
- Lenguaje dominante
- Jupyter Notebook
- Estrellas
- 5.3k
- Forks
- 514
- Merge medio
- 2 d 30 min
- PR fusionados (30 d)
- 8
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de AnswerDotAI/nbdev
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
AnswerDotAI/nbdev#1596 · 1 comentario ·
-
`great-docs` by Posit Is here!Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
AnswerDotAI/nbdev#1587 ·
-
Interested in Windows support?Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
AnswerDotAI/nbdev#1584 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
AnswerDotAI/nbdev#1583 · 1 comentario · 1 reacción ·
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
AnswerDotAI/nbdev#1581 ·
Todos los issues de AnswerDotAI/nbdev
Issues similares
-
[meshoptimizer] update to 1.3Abiertocategory:port-update
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Use issue templatesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ActivityWatch/activitywatch#1464 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
[Bug]: The ckg tool drops the return type of every decorated Python method in class search resultsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
bytedance/trae-agent#483 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
flathub/flathub#10377 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
kriasoft/oauth-callback#57 ·
Los mantenedores suelen responder en 1 día