From 3cb1041186eae77f2d4ecc224db48f6c6f319cd7 Mon Sep 17 00:00:00 2001 From: michael Date: Tue, 24 Nov 2020 14:39:12 +1100 Subject: [PATCH 1/5] add sphinx-toggleprompt --- docs/sphinx/source/conf.py | 1 + setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index faf1b2dcee..37e642c039 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -50,6 +50,7 @@ 'IPython.sphinxext.ipython_directive', 'IPython.sphinxext.ipython_console_highlighting', 'sphinx_gallery.gen_gallery', + 'sphinx_toggleprompt', ] napoleon_use_rtype = False # group rtype on same line together with return diff --git a/setup.py b/setup.py index 6aa5d80bd8..362e5f9c3d 100755 --- a/setup.py +++ b/setup.py @@ -50,7 +50,7 @@ 'cftime >= 1.1.1'], 'doc': ['ipython', 'matplotlib', 'sphinx == 3.1.2', 'sphinx_rtd_theme==0.5.0', 'sphinx-gallery', 'docutils == 0.15.2', - 'pillow', 'netcdf4', 'siphon', 'tables'], + 'pillow', 'netcdf4', 'siphon', 'tables', 'sphinx-toggleprompt >= 0.0.4'], 'test': TESTS_REQUIRE } EXTRAS_REQUIRE['all'] = sorted(set(sum(EXTRAS_REQUIRE.values(), []))) From 979ad3c1f44713aef21cf224f270129a78de9dce Mon Sep 17 00:00:00 2001 From: michael Date: Tue, 24 Nov 2020 14:48:11 +1100 Subject: [PATCH 2/5] format line to long --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 362e5f9c3d..6bd7827a27 100755 --- a/setup.py +++ b/setup.py @@ -50,7 +50,8 @@ 'cftime >= 1.1.1'], 'doc': ['ipython', 'matplotlib', 'sphinx == 3.1.2', 'sphinx_rtd_theme==0.5.0', 'sphinx-gallery', 'docutils == 0.15.2', - 'pillow', 'netcdf4', 'siphon', 'tables', 'sphinx-toggleprompt >= 0.0.4'], + 'pillow', 'netcdf4', 'siphon', 'tables', + 'sphinx-toggleprompt >= 0.0.4'], 'test': TESTS_REQUIRE } EXTRAS_REQUIRE['all'] = sorted(set(sum(EXTRAS_REQUIRE.values(), []))) From 4f7c8ab099155f1e4fe7f54a6527fd37ec803675 Mon Sep 17 00:00:00 2001 From: michael Date: Tue, 24 Nov 2020 14:48:44 +1100 Subject: [PATCH 3/5] update whatsnew --- docs/sphinx/source/whatsnew/v0.8.1.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/sphinx/source/whatsnew/v0.8.1.rst b/docs/sphinx/source/whatsnew/v0.8.1.rst index 4028e49f79..89e17b827e 100644 --- a/docs/sphinx/source/whatsnew/v0.8.1.rst +++ b/docs/sphinx/source/whatsnew/v0.8.1.rst @@ -37,6 +37,7 @@ Documentation * Update sphinx to 3.1.2 and use the ``recursive`` option in ``autosummary`` class template. (:issue:`1055`, :pull:`1075`) * Add gallery example about backtracking on sloped terrain. (:pull:`1077`) +* Add toggle button for code prompts to make copying code easier (:pull:`1096`) Requirements ~~~~~~~~~~~~ From bc33c0f1b02b3e22f0b3ee2a6139dacb0f5bd27a Mon Sep 17 00:00:00 2001 From: michael Date: Fri, 27 Nov 2020 09:31:10 +1100 Subject: [PATCH 4/5] bump toggleprompt version to one that handles "Out[xx]:" --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6bd7827a27..b89a3c9983 100755 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ 'doc': ['ipython', 'matplotlib', 'sphinx == 3.1.2', 'sphinx_rtd_theme==0.5.0', 'sphinx-gallery', 'docutils == 0.15.2', 'pillow', 'netcdf4', 'siphon', 'tables', - 'sphinx-toggleprompt >= 0.0.4'], + 'sphinx-toggleprompt >= 0.0.5'], 'test': TESTS_REQUIRE } EXTRAS_REQUIRE['all'] = sorted(set(sum(EXTRAS_REQUIRE.values(), []))) From 568b595e40fb094041e6c39db4277d7a58ed6b95 Mon Sep 17 00:00:00 2001 From: Michael Jurasovic Date: Sat, 28 Nov 2020 10:21:31 +1100 Subject: [PATCH 5/5] Add self to contributors --- docs/sphinx/source/whatsnew/v0.8.1.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/sphinx/source/whatsnew/v0.8.1.rst b/docs/sphinx/source/whatsnew/v0.8.1.rst index 89e17b827e..1e5bcba48a 100644 --- a/docs/sphinx/source/whatsnew/v0.8.1.rst +++ b/docs/sphinx/source/whatsnew/v0.8.1.rst @@ -50,3 +50,4 @@ Contributors * Will Holmgren (:ghuser:`wholmgren`) * Cliff Hansen (:ghuser:`cwhanse`) * Will Vining (:ghuser:`wfvining`) +* Michael Jurasovic (:ghuser:`jurasofish`)