Trouble with .ipynb files in git

310 views
Skip to first unread message

Nicholas Chisholm

unread,
Apr 16, 2022, 10:50:57 AM4/16/22
to sympy
I am having issues with git and the jupyter notebook files in the examples directory of a fork/clone of the sympy git repository.  For some reason, git indicates that these .ipynb files are modified after a fresh clone of the sympy repository although git diff reports no changes.  Git's performance is also very slow; running git status takes several seconds even with a shallow (--depth=1) clone.

Strangely, staging the (non-existent) modifications makes the performance issues go away.  However, I'm worried committing them might cause issues with a pull request back to sympy's main repo.

Has anyone encountered similar issues? Common causes seem to be differences in line endings (unix vs windows) or file permissions, but trying common fixes for those issues has not worked.

I am using Git 2.35.1 on Linux.

Kuldeep Borkar

unread,
Apr 17, 2022, 2:38:30 AM4/17/22
to sympy
I have not encountered something similar yet but maybe this could help a bit https://ploomber.io/blog/nbs-myths/

Aaron Meurer

unread,
Apr 17, 2022, 5:40:34 AM4/17/22
to sy...@googlegroups.com
Not completely sure if this is what is going on, but maybe you
accidentally committed .ipynb or a notebook with a large file in a
prior commit. You can use git log --stat or git diff master --stat to
see the files that are different. If you make a PR to SymPy the bot
will also inform you if you accidentally committed anything. If you
did do this, you will need to rebase your branch to remove the commit.

Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/3226d4da-b0d2-408f-8168-f7da130b9efbn%40googlegroups.com.

Nicholas Chisholm

unread,
Apr 17, 2022, 9:39:57 AM4/17/22
to sympy
Thanks!  After your replies pointed to the fact that this was definitely a problem with my system, I suddenly remembered I had globally installed nbstripout a while ago, which was messing with the notebooks and causing the issue.  After uninstalling it, everything seems to be working normally :).
Reply all
Reply to author
Forward
0 new messages