From 9b5ecaa9eba8f58126c47767ff1f9940c48f4c35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Wiik=20=C3=85nes?= Date: Sun, 2 May 2021 17:01:49 +0200 Subject: [PATCH] Add .ipynb to .gitignore and update contributing guide accordingly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Håkon Wiik Ånes --- .gitignore | 2 +- doc/contributing.rst | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ebd652f8..2f0436d9 100644 --- a/.gitignore +++ b/.gitignore @@ -72,7 +72,7 @@ target/ # Jupyter Notebook .ipynb_checkpoints -#*.ipynb +*.ipynb # pyenv .python-version diff --git a/doc/contributing.rst b/doc/contributing.rst index f4cc9238..61b2ab7b 100644 --- a/doc/contributing.rst +++ b/doc/contributing.rst @@ -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 `_: +- Notebooks (with the `.ipynb` file extension) are ignored by git (listed in the + `.gitignore` file). The ``-f`` + `git flag `_ 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