AnswerDotAI / AnswerDotAI/nbdev
Missing 2.3.12 tag
- Vorherrschende Sprache
- Jupyter Notebook
- Sterne
- 5.3k
- Forks
- 514
- Ø Merge
- 2 T. 30 Min.
- Gemergte PRs (30 T.)
- 8
Beschreibung
The package published to [pypi](https://pypi.org/project/nbdev/) is versioned `2.3.12`, while the latest tag in this repo is `2.3.11`.
This makes `pre-commit` and the nbdev-ci workflow use different versions.
# Provide a minimally reproducible example
Using the `pre-commit` tool with `pre-commit-config.yaml`:
```yaml
repos:
- repo: https://github.com/fastai/nbdev
rev: 2.3.11
hooks:
- id: nbdev_clean
```
and `.github/workflows/test.yaml`:
```yaml
name: CI
on: [workflow_dispatch, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.0
test:
runs-on: ubuntu-latest
steps:
- uses: fastai/workflows/nbdev-ci@master
```
The `lint` job succeeds and the `test` job fails on the initial `00_core.ipynb`.
This is because that the `nbdev_clean` command cleans the initial notebook in `2.3.12` (which is used by the CI as it is published to [pypi](https://pypi.org/project/nbdev/)) while in `2.3.11` (which is the latest tag in [this repo](https://github.com/fastai/nbdev/tags)) it doesn't clean.
The nbdev-ci git action [installs the latest from pypi](https://github.com/fastai/workflows/blob/58444f475ebf4eee6c674808e9053c496a1c9ca8/nbdev-ci/action.yml#L45), while `pre-commit` installs from github, and so the versions differ.
This is confirmed by installing the specific versions and running `nbdev_clean`:
```bash
pip install nbdev=2.3.12
nbdev_clean
git status
# files will change
```
```bash
pip install nbdev=2.3.11
nbdev_clean
git status
# No files will change
```
# Proposed fixes
1. I can work around it by specifying the specific hash of version `2.3.12` (which should probably be 744a52d).
2. An easy fix would be to tag this commit as `2.3.12`.
3. A more permanent solution will be to enable version pining in the [ci workflow](https://github.com/fastai/workflows/), I might create a pull request for that in the coming days.
Beitragsleitfaden
Rechercherichtung
Vergleiche die Repository-Tags mit dem PyPI-Release 2.3.12 und untersuche den Commit 744a52d; überprüfe anschließend die Paketinstallation des nbdev-ci-Workflows und die pre-commit-Konfiguration. Als erledigt gilt die Aufgabe, wenn der Repository-Tag und die CI/pre-commit-Versionen übereinstimmen und die im gezeigten 00_core.ipynb enthaltenen Prüfungen erfolgreich sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- github-actions, jupyter-notebook, python
- Bereich
- ci-cd, release
- Issue-Typ
- Bug
- Schwierigkeit
- 1/5
- Geschätzter Aufwand
- Unter einer Stunde
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 30/100