Comments (4)
I'm not able to reproduce this using the same versions of nb-clean and nbformat, either using the Git filter or invoking nb-clean manually:
$ nb-clean check plotly-example-2.ipynb
plotly-example-2.ipynb cell 0: metadata
plotly-example-2.ipynb cell 0: execution count
plotly-example-2.ipynb cell 0: outputs
plotly-example-2.ipynb metadata: language_info.version
However, I'm on Linux whereas you're on Windows and there's a warning from Git that LF line endings will be replaced with CRLF line endings on checkout in your output. To see if the line ending conversion is involved, do you have the same error if you run nb-clean outside the Git filter (nb-clean check plotly-example-2.ipynb
)?
from nb-clean.
I can pass the $ nb-clean check plotly-example-2.ipynb
on windows powershell command line too, returning the same results as you.
But when I use $ git add plotly-example-2.ipynb
, I still get the same error showing above.
My CRLF setting in the git global config file C:\Users\Administrator\.gitconfig
is as following
[core]
autocrlf = input
Should I alter the autocrlf setting to something else?
from nb-clean.
According to this PR in another project, Jupyter notebooks are always created with LF line endings on Windows. That suggests adding the following to the .gitattributes
file in your repository (if you've not worked with the .gitattributes
file before, there's documentation on its purpose and the available options here):
*.ipynb text eol=lf
from nb-clean.
I'll assume configuring .gitattributes
worked: if you have any other trouble please open a new issue.
from nb-clean.
Related Issues (20)
- Option to preserve output HOT 1
- Support batch and wildcard file names HOT 3
- pre-commit hook? HOT 2
- [Feature] support --recursive in combination with a folder as an argument HOT 2
- Only preserve `cells`. HOT 9
- When preserving output, remove the execution count on outputs of type execute_result HOT 10
- Support Jupyter `savehook` HOT 2
- Git filter only if file >100MB HOT 1
- Rewrite in Rust HOT 1
- Preserve execution count when using `nb-clean` HOT 3
- Feature request: preserve notebook metadata HOT 3
- [BUG] Filtering to ignore metadata during checks not working as expected HOT 2
- [BUG] Using preserve cell metadata flag before filename not working as expected HOT 3
- Request: `pyproject.toml`-based configuration HOT 2
- Feedback in cli missing HOT 1
- Notebooks not cleaned when staged for git commit HOT 3
- Add `required` option to `git filter` HOT 2
- Filter cleans python version metadata HOT 7
- Option to preserve tag metadata HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nb-clean.