Skip to content

Commit 00075a3

Browse files
authored
Merge branch 'master' into Issue35-documentation
2 parents d4fa183 + fe449ff commit 00075a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2860
-592
lines changed

.all-contributorsrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"profile": "https://sjhaque14.wixsite.com/sjhaque",
4040
"contributions": [
4141
"doc",
42-
"userTesting"
42+
"userTesting",
43+
"code"
4344
]
4445
}
4546
],

.github/workflows/test.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Test
2+
3+
# this is heavily based off the jupyterlab-git workflow file created by @fcollonval
4+
# https://github.com/jupyterlab/jupyterlab-git/blob/a046b66415c6afabcbdf6e624e2a367523ee2e80/.github/workflows/build.yml
5+
6+
on:
7+
push:
8+
branches: [master]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
test-3x:
14+
name: Python ${{ matrix.python-version }} - Matplotlib ${{ matrix.matplotlib-version }}
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
python-version: ['3.7', '3.8']
19+
matplotlib-version: ['3.2', '3.3']
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v2
23+
24+
- name: Setup Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
architecture: 'x64'
29+
30+
- name: Get pip cache dir
31+
id: pip-cache
32+
run: |
33+
echo "::set-output name=dir::$(pip cache dir)"
34+
35+
- name: pip cache
36+
uses: actions/cache@v2
37+
with:
38+
path: ${{ steps.pip-cache.outputs.dir }}
39+
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
40+
restore-keys: |
41+
${{ runner.os }}-pip-${{ matrix.python-version }}-
42+
${{ runner.os }}-pip-
43+
44+
- name: Install
45+
run: |
46+
pip install wheel
47+
pip install matplotlib==${{ matrix.matplotlib-version}}.*
48+
pip install .[test]
49+
50+
- name: Check Formatting
51+
run: |
52+
black mpl_interactions --check
53+
black examples --check
54+
55+
- name: Tests
56+
run: |
57+
pytest --color=yes
58+

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: 20.8b1 # Replace by any tag/version: https://github.com/psf/black/tags
4+
hooks:
5+
- id: black
6+
language_version: python3 # Should be a command that runs python3.6+

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
111111
<td align="center"><a href="http://ianhi.github.io"><img src="https://avatars0.githubusercontent.com/u/10111092?v=4" width="100px;" alt=""/><br /><sub><b>Ian Hunt-Isaak</b></sub></a><br /><a href="https://github.com/ianhi/mpl-interactions/commits?author=ianhi" title="Code">💻</a></td>
112112
<td align="center"><a href="https://darlingdocs.wordpress.com/"><img src="https://avatars1.githubusercontent.com/u/67113216?v=4" width="100px;" alt=""/><br /><sub><b>Sam</b></sub></a><br /><a href="https://github.com/ianhi/mpl-interactions/commits?author=samanthahamilton" title="Documentation">📖</a></td>
113113
<td align="center"><a href="https://github.com/jcoulter12"><img src="https://avatars1.githubusercontent.com/u/14036348?v=4" width="100px;" alt=""/><br /><sub><b>Jenny Coulter</b></sub></a><br /><a href="#userTesting-jcoulter12" title="User Testing">📓</a></td>
114-
<td align="center"><a href="https://sjhaque14.wixsite.com/sjhaque"><img src="https://avatars3.githubusercontent.com/u/61242473?v=4" width="100px;" alt=""/><br /><sub><b>Sabina Haque</b></sub></a><br /><a href="https://github.com/ianhi/mpl-interactions/commits?author=sjhaque14" title="Documentation">📖</a> <a href="#userTesting-sjhaque14" title="User Testing">📓</a></td>
114+
<td align="center"><a href="https://sjhaque14.wixsite.com/sjhaque"><img src="https://avatars3.githubusercontent.com/u/61242473?v=4" width="100px;" alt=""/><br /><sub><b>Sabina Haque</b></sub></a><br /><a href="https://github.com/ianhi/mpl-interactions/commits?author=sjhaque14" title="Documentation">📖</a> <a href="#userTesting-sjhaque14" title="User Testing">📓</a> <a href="https://github.com/ianhi/mpl-interactions/commits?author=sjhaque14" title="Code">💻</a></td>
115115
</tr>
116116
</table>
117117

docs/API.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ will use the built-in Matplotlib widgets.
1818
~mpl_interactions.interactive_plot
1919
~mpl_interactions.interactive_plot_factory
2020
~mpl_interactions.interactive_hist
21+
~mpl_interactions.interactive_scatter
22+
~mpl_interactions.interactive_imshow
2123

2224

2325
generic

docs/Contributing.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@ Code Improvements
1111

1212
All development for this library happens on Github at `mpl_interactions <https://github.com/ianhi/mpl-interactions>`_.
1313

14+
.. code-block:: bash
15+
16+
git clone <your fork>
17+
cd mpl-interactions
18+
pip install -e ".[dev, doc, test]"
19+
pre-commit install
20+
21+
.. code-block:: bash
22+
23+
conda install nodejs=12
24+
jupyter labextension install @jupyter-widgets/jupyterlab-manager
25+
26+
1427
Seeing your changes
1528
^^^^^^^^^^^^^^^^^^^
1629

@@ -45,7 +58,7 @@ Following changes to the source files, you can view recent adjustments by buildi
4558
.. code-block:: bash
4659
4760
cd mpl-interactions
48-
pip install -e.[docs]
61+
pip install -e ".[doc]"
4962
5063
2. Run the following commands:
5164

docs/Installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ First create your own fork of https://github.com/ianhi/mpl-interactions.
3434
3535
git clone <your fork>
3636
cd mpl-interactions
37-
pip install -e.[docs]
37+
pip install -e ".[dev, doc, test]"

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ help:
2020
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2121

2222
watch:
23-
sphinx-autobuild . _build/html -B
23+
sphinx-autobuild . _build/html --open-browser

docs/conf.py

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
#
1313
import os
1414
import sys
15-
sys.path.insert(0, os.path.abspath('../mpl_interactions'))
15+
16+
sys.path.insert(0, os.path.abspath("../mpl_interactions"))
1617
import mpl_interactions as mpl_inter
1718

1819
release = mpl_inter.__version__
@@ -22,9 +23,9 @@
2223

2324
# -- Project information -----------------------------------------------------
2425

25-
project = 'mpl-interactions'
26-
copyright = '2020, Ian Hunt-Isaak'
27-
author = 'Ian Hunt-Isaak'
26+
project = "mpl-interactions"
27+
copyright = "2020, Ian Hunt-Isaak"
28+
author = "Ian Hunt-Isaak"
2829

2930
# The full version, including alpha/beta/rc tags
3031

@@ -35,16 +36,13 @@
3536
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3637
# ones.
3738
extensions = [
38-
#'sphinx.ext.autodoc',
39-
#'sphinx.ext.autosummary',
40-
'nbsphinx',
41-
'sphinx.ext.mathjax',
42-
'sphinx.ext.linkcode',
43-
'sphinx.ext.napoleon',
44-
'numpydoc',
45-
'jupyter_sphinx',
46-
'sphinx_copybutton',
47-
]
39+
"sphinx.ext.mathjax",
40+
"sphinx.ext.linkcode",
41+
"sphinx.ext.napoleon",
42+
"numpydoc",
43+
"jupyter_sphinx",
44+
"sphinx_copybutton",
45+
]
4846

4947

5048
napoleon_google_docstring = False
@@ -57,49 +55,45 @@
5755
napoleon_use_ivar = False
5856
napoleon_use_param = False
5957
napoleon_use_rtype = False
60-
add_module_names=False
58+
add_module_names = False
6159

6260
autosummary_generate = True
6361
autodoc_default_options = {
64-
'members':True,
65-
'show-inheritance':True,
62+
"members": True,
63+
"show-inheritance": True,
6664
}
67-
nbsphinx_execute = 'always'
68-
nbsphinx_execute_arguments = [
69-
"--InlineBackend.figure_formats={'svg', 'pdf'}",
70-
"--InlineBackend.rc={'figure.dpi': 96}",
71-
]
65+
7266
# Add any paths that contain custom static files (such as style sheets) here,
7367
# relative to this directory. They are copied after the builtin static files,
7468
# so a file named "default.css" will overwrite the builtin "default.css".
75-
html_static_path = ['_static']
69+
html_static_path = ["_static"]
7670

7771
# Add any paths that contain templates here, relative to this directory.
78-
templates_path = ['_templates']
72+
templates_path = ["_templates"]
7973

8074
# List of patterns, relative to source directory, that match files and
8175
# directories to ignore when looking for source files.
8276
# This pattern also affects html_static_path and html_extra_path.
83-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '**ipynb_checkpoints']
77+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "**ipynb_checkpoints"]
8478

8579

8680
# -- Options for HTML output -------------------------------------------------
8781

8882
# The theme to use for HTML and HTML Help pages. See the documentation for
8983
# a list of builtin themes.
9084
#
91-
html_theme = 'sphinx_rtd_theme'
85+
html_theme = "sphinx_rtd_theme"
9286
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
9387

9488
html_theme_options = {
95-
# Toc options
96-
'collapse_navigation': False,
97-
'sticky_navigation': True,
98-
'navigation_depth': 4,
89+
# Toc options
90+
"collapse_navigation": False,
91+
"sticky_navigation": True,
92+
"navigation_depth": 4,
9993
}
10094

10195

102-
master_doc = 'index'
96+
master_doc = "index"
10397

10498

10599
def setup(app):

docs/examples/mpl-sliders.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Using Matplotlib Widgets
99
This page is dedicated to showing how to use the ``interactive_*`` functions---such as ``interactive_plot``---with Matplotlib widgets. For
1010
a more general discussion of how to use the ``pyplot`` submodule see the :doc:`pyplot-notebooks` page.
1111

12+
1213
Differences from ipywidgets sliders
1314
-----------------------------------
1415
**1.** mpl-sliders are different from ipywidgets sliders in that they will only take a min and and max with

0 commit comments

Comments
 (0)