nbdev with fasthtml
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- jupyter, jupyter-notebook, python
- Lĩnh vực
- developer-experience, documentation
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện hành vi được báo cáo với component.py và lệnh uv run python -m hao.component, sau đó so sánh việc phân giải đường dẫn trong Jupyter, package đã export và nbdev_docs. Xem xét ví dụ static-file và hành vi import của nbdev_docs; công việc được xem là hoàn tất khi workflow fasthtml được hỗ trợ và các quy tắc đường dẫn static-file được ghi lại, hoặc khi khoảng trống tương thích được xác định rõ ràng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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?
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 5.3k
- Fork
- 517
- Merge trung bình
- 1 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của AnswerDotAI/nbdev
-
Bug Report: `nbdev` Parser `IndexError` on `@patch_to` with Keyword ArgumentsCó thể đã có người làm @ruchi-mish90 đã nhận 85 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
AnswerDotAI/nbdev#1596 · 1 bình luận ·
-
`great-docs` by Posit Is here!Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
AnswerDotAI/nbdev#1587 ·
-
Interested in Windows support?Có thể đã có người làm @mrexodia đã nhận 10 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
AnswerDotAI/nbdev#1584 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
AnswerDotAI/nbdev#1583 · 1 bình luận · 1 reaction ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
AnswerDotAI/nbdev#1581 ·
Tất cả issue của AnswerDotAI/nbdev
Issue tương tự
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
bug
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
automated-analysis code-quality cookie
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
github/gh-aw#67517 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
defect from-review
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
khuisman/mcp-gee-sweet#974 ·
Maintainer thường phản hồi trong vòng 1 ngày