pre-commit hooks don't work with 2.3.37
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
調査の方向性
まず、2.3.37 の GitHub ソースとインストール済みパッケージのメタデータを比較します。特に nbdev/init.py、nbdev/showdoc.py、および traceback に示されている fastcore.dispatch の import を確認してください。hook が環境をどのようにインストールするかを調べた後、pre-commit run を再実行します。2.3.37 の hook が互換性のあるパッケージバージョンを使用し、fastcore の移行エラーなしで完了すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Jupyter Notebook
- スター
- 5.3k
- フォーク
- 517
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
AnswerDotAI/nbdev のほかの issue
-
Bug Report: `nbdev` Parser `IndexError` on `@patch_to` with Keyword Arguments対応中かも @ruchi-mish90 が 87 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
AnswerDotAI/nbdev#1596 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
AnswerDotAI/nbdev#1587 ·
-
Interested in Windows support?対応中かも @mrexodia が 11 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
AnswerDotAI/nbdev#1584 · コメント 1 件 ·
-
難易度 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
-
./collections should export setUmbracoVersion and setAllowFilePathUploads for in-process consumersオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
umbraco/Umbraco-CMS-MCP-Dev#563 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
feature request good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 87/100
TabularisDB/tabularis#1036 ·
メンテナーはふだん 1 日以内に返信
-
bug next version
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Rem0o/FanControl.Releases#4220 · コメント 1 件 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信