Skip to content

Commit

Permalink
Merge #184 from hakonanes/add-notebook-to-gitignore
Browse files Browse the repository at this point in the history
Add .ipynb to .gitignore and update contributing guide accordingly
  • Loading branch information
pc494 authored May 2, 2021
2 parents c508b11 + 9b5ecaa commit b147a7d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ target/

# Jupyter Notebook
.ipynb_checkpoints
#*.ipynb
*.ipynb

# pyenv
.python-version
Expand Down
6 changes: 6 additions & 0 deletions doc/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ plaintext markup language. They should be accessible in the browser by typing
Tips for writing Jupyter Notebooks that are meant to be converted to reST text
files by `nbsphinx <https://nbsphinx.readthedocs.io/en/latest/>`_:

- Notebooks (with the `.ipynb` file extension) are ignored by git (listed in the
`.gitignore` file). The ``-f``
`git flag <https://git-scm.com/docs/git-add#Documentation/git-add.txt--f>`_ must be
added to ``git add -f notebook.ipynb`` in order to update an existing notebook or add
a new one. Notebooks are ignored by git in general to avoid non-documentation changes
to notebooks, like cell IDs, being pushed unnecessarily.
- All notebooks should have a Markdown (MD) cell with this message at the top,
"This notebook is part of the `orix` documentation https://orix.rtfd.io. Links to the
documentation won't work from the notebook.", and have ``"nbsphinx": "hidden"`` in the
Expand Down

0 comments on commit b147a7d

Please sign in to comment.