Skip to content

Commit b1d8222

Browse files
committed
initial commit
0 parents  commit b1d8222

Some content is hidden

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

41 files changed

+1191
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: 🐛 Bug Report
3+
about: Report a bug
4+
# based on matplotlib issue template
5+
---
6+
7+
<!--To help us understand and resolve your issue, please fill out the form to the best of your ability.-->
8+
<!--You can feel free to delete the sections that do not apply.-->
9+
10+
### Bug report
11+
12+
**Bug summary**
13+
14+
<!--A short 1-2 sentences that succinctly describes the bug-->
15+
16+
**Code for reproduction**
17+
18+
<!--A minimum code snippet required to reproduce the bug.
19+
Please make sure to minimize the number of dependencies required, and provide
20+
any necessary plotted data.
21+
22+
```python
23+
# Paste your code here
24+
#
25+
#
26+
```
27+
28+
**Actual outcome**
29+
30+
<!--The output produced by the above code, which may be a screenshot, console output, etc.-->
31+
32+
**Expected outcome**
33+
34+
<!--A description of the expected outcome from the code snippet-->
35+
<!--If this used to work in an earlier version of Matplotlib, please note the version it used to work on-->
36+
37+
**Version Info**
38+
<!--Please specify your platform and versions of the relevant libraries you are using:-->
39+
* Operating system:
40+
* Matplotlib version:
41+
* Matplotlib backend (`print(matplotlib.get_backend())`):
42+
* Python version:
43+
* Jupyter version (if applicable):
44+
* Other libraries:

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
2+
blank_issues_enabled: true # default
3+
contact_links:
4+
- name: ❓ Question/Support/Other
5+
url: https://discourse.matplotlib.org/c/3rdparty/18
6+
about: If you have a usage question
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: 📖 Documentation improvement
3+
about: Report parts of the docs that are wrong or unclear
4+
labels: documentation, bug
5+
---
6+
7+
<!--To help us understand and resolve your issue, please fill out the form to the best of your ability.-->
8+
<!--You can feel free to delete the sections that do not apply.-->
9+
10+
### Problem
11+
12+
<!--
13+
If you are referencing an existing piece of documentation or example please provide a link.
14+
15+
* I found [...] to be unclear because [...]
16+
* [...] made me think that [...] when really it should be [...]
17+
* There is no example showing how to do [...]
18+
-->
19+
20+
21+
### Suggested Improvement
22+
23+
<!--
24+
If you have an idea to improve the documentation please suggest it here
25+
26+
* This line should be be changed to say [...]
27+
* Include a paragraph explaining [...]
28+
* Add a figure showing [...]
29+
-->
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: 🚀 Enhancement/Feature Request
3+
about: Suggest something that could be improved or a New Feature to add
4+
labels: enhancement
5+
---
6+
7+
<!--
8+
Welcome! Thanks for thinking of a way to improve $mpl_point_clicker. If this solves a problem for you, then it probably solves that problem for lots of people! So the whole community will benefit from this request.
9+
10+
11+
Before creating a new feature request please search the issues for relevant feature requests.
12+
-->
13+
14+
### Problem
15+
16+
<!-- Provide a clear and concise description of what problem this feature will solve. For example:
17+
18+
* I'm always frustrated when [...] because [...]
19+
* I would like it if [...] happened when I [...] because [...]
20+
-->
21+
22+
### Proposed Solution
23+
24+
<!-- Provide a clear and concise description of a way to accomplish what you want. For example:
25+
26+
* Add an option so that when [...] [...] will happen
27+
-->
28+
29+
### Additional context
30+
31+
<!-- Add any other context or screenshots about the feature request here. You can also include links to examples of other programs that have something similar to your request. For example:
32+
33+
* Another project [...] solved this by [...]
34+
-->
35+

.github/workflows/lint.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-python@v2
15+
- uses: psf/black@stable
16+
with:
17+
args: ". --check"
18+
- name: docstrings
19+
run: |
20+
pip install flit
21+
pushd $(mktemp -d)
22+
git clone https://github.com/Carreau/velin.git --single-branch --depth 1
23+
cd velin
24+
flit install
25+
popd
26+
velin . --check

.github/workflows/publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# heavily based on https://github.com/jupyterlab/jupyterlab-git/blob/v0.22.2/.github/workflows/publish.yml
2+
name: Publish Package
3+
4+
on:
5+
release:
6+
types: [published]
7+
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Install Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: '3.x'
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install packaging setuptools twine wheel build
22+
- name: Publish the Python package
23+
env:
24+
TWINE_USERNAME: __token__
25+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
26+
run: |
27+
python -m build -s -w
28+
twine upload dist/*

.gitignore

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
98+
__pypackages__/
99+
100+
# Celery stuff
101+
celerybeat-schedule
102+
celerybeat.pid
103+
104+
# SageMath parsed files
105+
*.sage.py
106+
107+
# Environments
108+
.env
109+
.venv
110+
env/
111+
venv/
112+
ENV/
113+
env.bak/
114+
venv.bak/
115+
116+
# Spyder project settings
117+
.spyderproject
118+
.spyproject
119+
120+
# Rope project settings
121+
.ropeproject
122+
123+
# mkdocs documentation
124+
/site
125+
126+
# mypy
127+
.mypy_cache/
128+
.dmypy.json
129+
dmypy.json
130+
131+
# Pyre type checker
132+
.pyre/
133+
134+
# pytype static type analyzer
135+
.pytype/
136+
137+
# Cython debug symbols
138+
cython_debug/
139+
140+
# mac stuff
141+
.DS_store
142+
143+
# editors
144+
145+
## vim
146+
[._]*.s[a-v][a-z]
147+
!*.svg # comment out if you don't need vector files
148+
[._]*.sw[a-p]
149+
[._]s[a-rt-v][a-z]
150+
[._]ss[a-gi-z]
151+
[._]sw[a-p]
152+
[._]*.un~
153+
154+
## vscode
155+
.vscode

LICENSE

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2021, Ian Hunt-Isaak
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
1. Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
2. Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
3. Neither the name of the copyright holder nor the names of its contributors
17+
may be used to endorse or promote products derived from this software
18+
without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# mpl-point-clicker
2+
3+
A multiclass point clicker for matplotlib
4+
5+
## Installation
6+
7+
You can install using `pip`:
8+
9+
```bash
10+
pip install mpl_point_clicker
11+
```
12+
13+
## Development Installation
14+
15+
16+
```bash
17+
pip install -e ".[dev]"
18+
```
19+

docs/API.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
===
2+
API
3+
===
4+
5+
Example Module
6+
---------------
7+
8+
The example module just contains one function - which is just an example
9+
function to extend matplotlib functionality.
10+
11+
.. currentmodule:: mpl_point_clicker._clicker
12+
.. autosummary::
13+
:toctree: autoapi
14+
:nosignatures:
15+
:recursive:
16+
17+
clicker

0 commit comments

Comments
 (0)