Closed DanHickstein closed 2 years ago
Sounds good to me. Yeah the notebook is not the best but I just wanted to get a quick example out to merge the v4. I agree with you individual files for example would be much better, and we could include the .ipynb in the gitignore to avoid pushing it every time one change it maybe.
Cool!
But I don't think that adding the example file to the gitignore will stop changes from being tracked. Once a file is tracked, I don't think that you can stop git from tracking changes to it. And sometimes you will want to make changes to the examples, and with the ipynb file, I think that you need to re-commit the whole 13 MB file each time, so the repo size may expand rapidly.
Even though we had *.pyc in .gitignore, the .pyc files were already tracked in the repo, so they'll be re-committed every time. We don't want these getting updated in the repo each time someone makes PR, so I think that it's best to remove these from the repo.
I also added .ipynb_checkpoints to the gitignore to specifically ignore the checkpoints file that is generated when the notebook is run.
One annoying thing is that whenever the notebook is run, the file changes, so git wants to track these changes. I don't think there is a good solution to this, but there are some options discussed here: https://mg.readthedocs.io/git-jupyter.html. I think that life might be easier if there were several example .py files rather than a notebook. But, the notebook is quite nice.