Skip to content

Commit 4b9c21f

Browse files
authored
Clean up readme
- Reorder sections - Correct formatting of pytest-mpl - correct link for using cookiecutter
1 parent 8e61188 commit 4b9c21f

File tree

1 file changed

+29
-24
lines changed

1 file changed

+29
-24
lines changed

README.md

+29-24
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Turn your matplotlib convenience scripts into a proper python package using this cookiecutter.
44
```
55
pip install cookiecutter
6-
cookiecutter gh:ianhi/matplotlib-extension-cookiecutter
6+
cookiecutter gh:matplotlib/matplotlib-extension-cookiecutter
77
```
88
**Buy why?**
99

@@ -15,7 +15,7 @@ Why use this over just starting with a setup.py? This cookiecutter will provide
1515
- A setup for docs with:
1616
- `sphinx-gallery`
1717
- `autodoc`
18-
- The set up for `pytest-mpl
18+
- The set up for `pytest-mpl`
1919

2020

2121
## Building docs
@@ -47,6 +47,33 @@ Once you've made your package other people will likely want to use your hard wor
4747
- [Example PR](https://github.com/matplotlib/matplotlib/pull/13076)
4848
2. Tweet about your pacakge and and mention `@matplotlib` for a retweet.
4949

50+
51+
## Miscellaneous Advice
52+
53+
Do not use Matplotlib private methods. If you really need the functionality then consider opening a feature request to have Matplotlib provide a public API for what you want.
54+
55+
There is some discussion of how to use Matplotlib docstrings on discourse: https://discourse.matplotlib.org/t/docs-for-a-method-wrapping-a-matplotlib-method/21055
56+
57+
https://colcarroll.github.io/yourplotlib/ is a great read for how to make an extension to Matplotlib.
58+
59+
## LICENSE Advice
60+
61+
You may end up using portions of Matplotlib's code or copying docstrings when making a Matplotlib extension.
62+
63+
As a practical rule: If you end up copying a non-trivial amount of code or docs the safest course of action is to add the Matplotlib license to your project as a derived work. For example see how Matplotlib does it https://github.com/matplotlib/matplotlib/tree/master/LICENSE.
64+
65+
> But what counts as non-trivial?
66+
67+
68+
A good rule of thumb is to ask yourself:
69+
70+
If it were homework and you didn't acknowledge would it be cheating?
71+
72+
If the answer is yes, then you should leave a comment in the code and include a license file in a top level `LICENSE` folder.
73+
74+
75+
76+
5077
## Releasing to PyPi
5178
### Manually
5279
First set ensure you have the right packages installed:
@@ -96,28 +123,6 @@ then draft a new release:
96123
After you fill out the information the Github action will create a new tag for you, build the wheel, and upload it to PyPI.
97124

98125

99-
## Miscellaneous Advice
100-
101-
Do not use Matplotlib private methods. If you really need the functionality then consider opening a feature request to have Matplotlib provide a public API for what you want.
102-
103-
There is some discussion of how to use Matplotlib docstrings on discourse: https://discourse.matplotlib.org/t/docs-for-a-method-wrapping-a-matplotlib-method/21055
104-
105-
https://colcarroll.github.io/yourplotlib/ is a great read for how to make an extension to Matplotlib.
106-
107-
## LICENSE Advice
108-
109-
You may end up using portions of Matplotlib's code or copying docstrings when making a Matplotlib extension.
110-
111-
As a practical rule: If you end up copying a non-trivial amount of code or docs the safest course of action is to add the Matplotlib license to your project as a derived work. For example see how Matplotlib does it https://github.com/matplotlib/matplotlib/tree/master/LICENSE.
112-
113-
> But what is non-trivial????
114-
115-
116-
practical copyright rules
117-
118-
If it were homework and you didn't acknowledge would it be cheating?
119-
If yes then .... (e..g add a comment and include a license file in ___ folder)
120-
121126

122127
## Credit
123128

0 commit comments

Comments
 (0)