Skip to content

Commit f47345d

Browse files
committed
Update contribution instructions
Test Update contribution instructions Tmp Tmp
1 parent 6b79f2f commit f47345d

File tree

4 files changed

+19
-11
lines changed

4 files changed

+19
-11
lines changed

.gitattributes

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# Strips notebook output for diffs and when staging files
2-
# Download with 'pip install nbstripout'
31
# See: https://github.com/kynan/nbstripout
42
*.ipynb filter=nbstripout
53
*.ipynb diff=ipynb
6-

HOWTOCONTRIBUTE.rst

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,9 @@ Some helpful ReST guides are located `here <http://docutils.sourceforge.net/docs
7070
7171
The built documentation should be available in the ``docs/_build/html``.
7272

73-
Preparing Pull Requests
73+
Preparing pull requests
7474
=======================
7575

76-
#. If you intend to make changes / add examples to the ipython notebooks,
77-
you need to install `nbstripout <https://github.com/kynan/nbstripout>`__
78-
with ``pip install nbstripout``. This deletes notebook cell output so
79-
`nbsphinx <https://nbsphinx.readthedocs.io/en/0.4.3/>`__ always reruns them
80-
after git pushes.
81-
8276
#. Fork the
8377
`proplot GitHub repository <https://github.com/lukelbd/proplot>`__. It's
8478
fine to use ``proplot`` as your fork repository name because it will live
@@ -97,6 +91,23 @@ Preparing Pull Requests
9791
If you need some help with git, follow the
9892
`quick start guide <https://git.wiki.kernel.org/index.php/QuickStart>`__.
9993

94+
#. If you intend to make changes / add examples to the ipython notebooks,
95+
you need to install and configure
96+
`nbstripout <https://github.com/kynan/nbstripout>`__ with
97+
98+
.. code-block:: bash
99+
100+
cd proplot
101+
pip install nbstripout
102+
git config --local include.path ../.gitconfig
103+
104+
This strips notebook cell output when files are staged, which reduces the
105+
repo storage size and lets us use
106+
`nbsphinx <https://nbsphinx.readthedocs.io/en/0.4.3/>`__
107+
to test each ``git push``, since ``nbsphinx`` must then re-run every cell.
108+
The ``git config`` command configures the filters referenced in
109+
``proplot/.gitattributes`` with the options declared in ``proplot/.gitconfig``.
110+
100111
#. Make an editable install of proplot by running:
101112

102113
.. code-block:: bash

docs/.gitconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# See: https://github.com/kynan/nbstripout
12
[diff "ipynb"]
23
textconv = nbstripout -t
34
[filter "nbstripout"]

docs/sphinxext/custom_roles.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from proplot import rc
44

55
# Adapted from matplotlib
6-
# TODO: Understand what the hell is going on here
76
def get_nodes(rawtext, text, inliner):
87
rctext = (f"rc['{text}']" if '.' in text else f'rc.{text}')
98
rendered = nodes.Text(rctext)

0 commit comments

Comments
 (0)