pre-commit hooks don't work with 2.3.37
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
- 35/100
Hướng nghiên cứu
Bắt đầu bằng cách so sánh mã nguồn GitHub của phiên bản 2.3.37 với metadata của package đã cài đặt, đặc biệt là nbdev/init.py, nbdev/showdoc.py và import fastcore.dispatch được hiển thị trong traceback. Chạy lại pre-commit run sau khi kiểm tra cách hook cài đặt môi trường của nó; được xem là hoàn tất khi các hook của 2.3.37 sử dụng các phiên bản package tương thích và hoàn tất mà không gặp lỗi migration của fastcore.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Pre-commit hooks are installed from github directly. The source for tag 2.3.37 identifies the library version as 2.3.32 while the actual library install (via pypi) is identifying itself as 2.3.37. This has been true for a few past versions as well based on a quick look at the source. So in my environment nbdev is being installed at 2.3.37 with fastcore at 1.8. But the precommit hooks, while directed to 2.3.37 are triggering installs identifying themselves as 2.3.32 and 1.8. Theoretically I have the source for 2.3.37, but the version is just mislabeled, except that the hooks don't work.
The error below indicates the hook is trying to use source that hasn't been updated for fastcore 1.8, but I'm not sure why. I've uninstalled and cleaned the cache for my hooks before reinstalling. nbdev and fastcore work fine together when I call nbdev_clean/export manually. Those installs are coming from conda->pip and identify as their intended versions according to the init.py files in the conda sitepackages folder.
I thought this was a caching problem until I saw the 2.3.32 identifier in the github source.
pre-commit run
[WARNING] Unstaged files detected.
[INFO] Stashing unstaged files to /home/idahlke/.cache/pre-commit/patch1742504830-18983.
nbdev_clean..............................................................Failed
- hook id: nbdev_clean
- exit code: 1
Traceback (most recent call last):
File "/home/idahlke/.cache/pre-commit/repot0rqgexy/py_env-python3.10/bin/nbdev_clean", line 5, in
from nbdev.clean import nbdev_clean
File "/home/idahlke/.cache/pre-commit/repot0rqgexy/py_env-python3.10/lib/python3.10/site-packages/nbdev/init.py", line 4, in
from .showdoc import show_doc
File "/home/idahlke/.cache/pre-commit/repot0rqgexy/py_env-python3.10/lib/python3.10/site-packages/nbdev/showdoc.py", line 10, in
from fastcore.dispatch import TypeDispatch
File "/home/idahlke/.cache/pre-commit/repot0rqgexy/py_env-python3.10/lib/python3.10/site-packages/fastcore/dispatch.py", line 2, in getattr
raise ImportError(
ImportError: Could not import 'path' from fastcore.dispatch - this module has been moved to the fasttransform package.
To migrate your code, please see the migration guide at: https://answerdotai.github.io/fasttransform/fastcore_migration_guide.html
- 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 86 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ự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 3 ngày
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
implement-spec: step 9 cleanup collides with branch -D guards and with rewritten integration historyĐang mởneeds-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
mattpocock/skills#1251 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày