AnswerDotAI / AnswerDotAI/nbdev
Consider add option to clean `kernelspec` in notebook meta?
- Dominant language
- Jupyter Notebook
- Stars
- 5.3k
- Forks
- 513
- Avg merge
- 2d 30m
- Merged PRs (30d)
- 8
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.