Skip to content

Commit 54cddd5

Browse files
authored
Add checklists removed from PR template into CONTRIBUTING.md
1 parent c906710 commit 54cddd5

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

CONTRIBUTING.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,42 @@ and create your pull request.
171171
> Please do _not_ commit changes to `uv.lock`
172172
> unless you have added, removed, or changed dependencies in `pyproject.toml`.
173173
174+
## Opening a pull request
175+
176+
When creating your pull request, please follow the guidelines below.
177+
178+
### Code pull request
179+
180+
- *Make sure you have reviewed the full [contributing notes (this file)](https://github.com/plotly/plotly.py/blob/main/CONTRIBUTING.md) and understand the structure of the package.*
181+
- If your PR modifies code of `plotly.graph_objects`, the modifications should be made to the the code generator, *not* the generated files.
182+
- You have added tests or modified existing tests, as needed.
183+
- For a new feature, you have added documentation examples (please see the doc checklist as well).
184+
- You have added a CHANGELOG entry if changing anything substantial.
185+
- For a new feature or a change in behavior, you have updated the relevant docstrings in the code.
186+
187+
### Documentation pull request
188+
189+
- *Make sure you have reviewed the [`doc/README.md`](https://github.com/plotly/plotly.py/blob/main/doc/README.md) file.*
190+
- This change runs in the current version of Plotly on PyPI and targets the `doc-prod` branch OR it targets the `main` branch.
191+
- If this PR modifies the first example in a page or adds a new one, it is a `px` example if at all possible.
192+
- Every new/modified example has a descriptive title and motivating sentence or paragraph.
193+
- Every new/modified example is independently runnable.
194+
- Every new/modified example is optimized for short line count and focuses on the Plotly/visualization-related aspects of the example rather than the computation required to produce the data being visualized.
195+
- Meaningful/relatable datasets are used for all new examples instead of randomly-generated data where possible.
196+
- The random seed is set if using randomly-generated data.
197+
- New/modified remote datasets are loaded from https://plotly.github.io/datasets and added to https://github.com/plotly/datasets.
198+
- Large computations are avoided in the new/modified examples in favour of loading remote datasets that represent the output of such computations.
199+
- Imports are `plotly.graph_objects as go`, `plotly.express as px`, and/or `plotly.io as pio`.
200+
- Data frames are always called `df`.
201+
- `fig = <something>` is called high up in each new/modified example (either `px.<something>` or `make_subplots` or `go.Figure`).
202+
- Liberal use is made of `fig.add_*` and `fig.update_*` rather than `go.Figure(data=..., layout=...)`.
203+
- Specific adders and updaters like `fig.add_shape` and `fig.update_xaxes` are used instead of big `fig.update_layout` calls.
204+
- `fig.show()` is at the end of each example.
205+
- `plotly.plot()` and `plotly.iplot()` are not used in any example.
206+
- Named colors are used instead of hex codes wherever possible.
207+
- Code blocks are marked with `&#96;&#96;&#96;python`.
208+
209+
174210
### Testing
175211

176212
We use [pytest](https://docs.pytest.org/) for managing and running tests.

0 commit comments

Comments
 (0)