AnswerDotAI / AnswerDotAI/nbdev
Consider add option to clean `kernelspec` in notebook meta?
- Vorherrschende Sprache
- Jupyter Notebook
- Sterne
- 5.3k
- Forks
- 514
- Ø Merge
- 2 T. 30 Min.
- Gemergte PRs (30 T.)
- 8
Beschreibung
Hi all,
I am new to nbdev and thanks for creating this amazing tool!
I found the `kernelspec` in notebook meta data in preserved when running `nbdev_clean`. Please refer to https://github.com/fastai/nbdev/blob/b2f0810a4edd8ee79180b0a1c6a41e6966226ea4/nbdev/clean.py#L91
However, I found this metadata shouldn't be record by git in my case. For example, here is what I get from `git diff xxxx.ipynb`:
```
... some unrelated output...
@@ -79,9 +43,21 @@
],
"metadata": {
"kernelspec": {
- "display_name": "Python 3.9.5 ('base')",
+ "display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.9.13"
}
},
"nbformat": 4,
```
We should save these metadata, for example, the detailed python version.
Will you consider and option to remove it?
Thanks for your help.
Beitragsleitfaden
Rechercherichtung
Lies nbdev/clean.py ungefähr ab Zeile 91 und prüfe, wie nbdev_clean mit Notebook-Metadaten umgeht. Kläre, ob die Option nur kernelspec entfernen und language_info beibehalten sollte, und gleiche das ausgewählte Verhalten anschließend mit dem im Issue gezeigten Git-Diff des Notebooks ab.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- jupyter-notebook, python
- Bereich
- tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100