nbdev with fasthtml
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- jupyter, jupyter-notebook, python
調査の方向性
まず component.py と uv run python -m hao.component コマンドを使って報告された動作を再現し、次に Jupyter、エクスポートされたパッケージ、nbdev_docs でのパス解決を比較します。static-file の例と nbdev_docs のインポート動作を確認します。対応している fasthtml ワークフローと static-file のパス規則が文書化されるか、互換性の差異が明確に特定されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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?
- 主要言語
- Jupyter Notebook
- スター
- 5.3k
- フォーク
- 514
- 平均マージ
- 2日 30分
- マージ済み PR(30日)
- 8
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
AnswerDotAI/nbdev のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
AnswerDotAI/nbdev#1596 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
AnswerDotAI/nbdev#1587 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
AnswerDotAI/nbdev#1584 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
AnswerDotAI/nbdev#1583 · コメント 1 件 · リアクション 1 件 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
AnswerDotAI/nbdev#1581 ·
AnswerDotAI/nbdev の issue をすべて見る
似ている issue
-
agent/quality hive/hosted-available-lke648397-260827-5n31 quality testing
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
area-clientside-dartpad
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
workflow
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
kristofdegrave/homeassistant-smart-charging#1400 ·
メンテナーはふだん 1 日以内に返信
-
curriculum documentation quality
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
githubnext/gh-aw-workshop#3849 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
joestump/claude-plugin-sdd#262 ·
メンテナーはふだん 1 日以内に返信