Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 26 additions & 35 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,29 @@
<!--
Please uncomment this block and fill in this checklist if your PR makes substantial changes to documentation in the `doc` directory.
Not all boxes must be checked for every PR:
check those that apply to your PR and leave the rest unchecked to discuss with your reviewer.

If your PR modifies code of the `plotly` package, we have a different checklist below.

## Documentation PR

- [ ] I have seen the [`doc/README.md`](https://github.com/plotly/plotly.py/blob/main/doc/README.md) file.
- [ ] This change runs in the current version of Plotly on PyPI and targets the `doc-prod` branch OR it targets the `main` branch.
- [ ] If this PR modifies the first example in a page or adds a new one, it is a `px` example if at all possible.
- [ ] Every new/modified example has a descriptive title and motivating sentence or paragraph.
- [ ] Every new/modified example is independently runnable.
- [ ] 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.
- [ ] Meaningful/relatable datasets are used for all new examples instead of randomly-generated data where possible.
- [ ] The random seed is set if using randomly-generated data.
- [ ] New/modified remote datasets are loaded from https://plotly.github.io/datasets and added to https://github.com/plotly/datasets.
- [ ] Large computations are avoided in the new/modified examples in favour of loading remote datasets that represent the output of such computations.
- [ ] Imports are `plotly.graph_objects as go`, `plotly.express as px`, and/or `plotly.io as pio`.
- [ ] Data frames are always called `df`.
- [ ] `fig = <something>` is called high up in each new/modified example (either `px.<something>` or `make_subplots` or `go.Figure`).
- [ ] Liberal use is made of `fig.add_*` and `fig.update_*` rather than `go.Figure(data=..., layout=...)`.
- [ ] Specific adders and updaters like `fig.add_shape` and `fig.update_xaxes` are used instead of big `fig.update_layout` calls.
- [ ] `fig.show()` is at the end of each example.
- [ ] `plotly.plot()` and `plotly.iplot()` are not used in any example.
- [ ] Named colors are used instead of hex codes wherever possible.
- [ ] Code blocks are marked with `&#96;&#96;&#96;python`.

## Code PR

- [ ] I have read through the [contributing notes](https://github.com/plotly/plotly.py/blob/main/CONTRIBUTING.md) and understand the structure of the package. In particular, if my PR modifies code of `plotly.graph_objects`, my modifications concern the code generator and *not* the generated files.
- [ ] I have added tests or modified existing tests.
- [ ] For a new feature, I have added documentation examples (please see the doc checklist as well).
- [ ] I have added a CHANGELOG entry if changing anything substantial.
- [ ] For a new feature or a change in behavior, I have updated the relevant docstrings in the code.
Thank you for your contribution to plotly.py!

Please complete each section below.
-->

## Link to issue
<!-- Link to the issue closed by this PR. If the issue doesn't exist yet, create it. -->

Closes #(issue number)

## Description of change
<!-- Provide a clear 1-2 sentence description of what this PR does. -->

## Demo

<!-- Include screenshots or screen recordings of this PR in action. -->

## Testing strategy

<!-- Provide 1-2 sentences explaining tests added or changed by this PR. If testing changes are not needed, explain why. -->

## Additional information (optional)

<!-- Include any additional context, background, or explanation which doesn't fit in the previous sections. -->

## Guidelines

- [ ] I have reviewed the [pull request guidelines](https://github.com/plotly/plotly.py/blob/main/CONTRIBUTING.md#opening-a-pull-request) and confirmed that this PR follows them.
36 changes: 36 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,42 @@ and create your pull request.
> Please do _not_ commit changes to `uv.lock`
> unless you have added, removed, or changed dependencies in `pyproject.toml`.

## Opening a pull request

When creating your pull request, please follow the guidelines below.

### Code pull request

- *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.*
- If your PR modifies code of `plotly.graph_objects`, the modifications should be made to the the code generator, *not* the generated files.
- You have added tests or modified existing tests, as needed.
- For a new feature, you have added documentation examples (please see the doc checklist as well).
- You have added a CHANGELOG entry if changing anything substantial.
- For a new feature or a change in behavior, you have updated the relevant docstrings in the code.

### Documentation pull request

- *Make sure you have reviewed the [`doc/README.md`](https://github.com/plotly/plotly.py/blob/main/doc/README.md) file.*
- This change runs in the current version of Plotly on PyPI and targets the `doc-prod` branch OR it targets the `main` branch.
- If this PR modifies the first example in a page or adds a new one, it is a `px` example if at all possible.
- Every new/modified example has a descriptive title and motivating sentence or paragraph.
- Every new/modified example is independently runnable.
- 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.
- Meaningful/relatable datasets are used for all new examples instead of randomly-generated data where possible.
- The random seed is set if using randomly-generated data.
- New/modified remote datasets are loaded from https://plotly.github.io/datasets and added to https://github.com/plotly/datasets.
- Large computations are avoided in the new/modified examples in favour of loading remote datasets that represent the output of such computations.
- Imports are `plotly.graph_objects as go`, `plotly.express as px`, and/or `plotly.io as pio`.
- Data frames are always called `df`.
- `fig = <something>` is called high up in each new/modified example (either `px.<something>` or `make_subplots` or `go.Figure`).
- Liberal use is made of `fig.add_*` and `fig.update_*` rather than `go.Figure(data=..., layout=...)`.
- Specific adders and updaters like `fig.add_shape` and `fig.update_xaxes` are used instead of big `fig.update_layout` calls.
- `fig.show()` is at the end of each example.
- `plotly.plot()` and `plotly.iplot()` are not used in any example.
- Named colors are used instead of hex codes wherever possible.
- Code blocks are marked with `&#96;&#96;&#96;python`.


### Testing

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