From de8ad838c3563b416983e66e63681bc9eb436810 Mon Sep 17 00:00:00 2001 From: Emily KL <4672118+emilykl@users.noreply.github.com> Date: Mon, 23 Feb 2026 15:30:31 -0500 Subject: [PATCH 1/4] Update and streamline pull request template --- .github/pull_request_template.md | 61 ++++++++++++++------------------ 1 file changed, 26 insertions(+), 35 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 0ac4aea78e7..9b5e1bb5121 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,38 +1,29 @@ + +## Link to issue + + +Closes #(issue number) + +## Description of change + + +## Demo + + + +## Testing strategy + + + +## Additional information (optional) + + + +## 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. From 59bd89ee07db2b7e27d5532862299fc1f90c12c5 Mon Sep 17 00:00:00 2001 From: Emily KL <4672118+emilykl@users.noreply.github.com> Date: Wed, 25 Feb 2026 17:05:00 -0500 Subject: [PATCH 2/4] Add checklists removed from PR template into CONTRIBUTING.md --- CONTRIBUTING.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9f5f4d636ad..b6d8fe7773d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 = ` is called high up in each new/modified example (either `px.` 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 ````python`. + + ### Testing We use [pytest](https://docs.pytest.org/) for managing and running tests. From 788c3df0c4e43d6ce48bdfe7d4edc1adce5e6c31 Mon Sep 17 00:00:00 2001 From: Emily KL <4672118+emilykl@users.noreply.github.com> Date: Mon, 2 Mar 2026 13:03:17 -0500 Subject: [PATCH 3/4] link to code of conduct --- .github/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 9b5e1bb5121..0a6be82cf13 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -26,4 +26,4 @@ Closes #(issue number) ## 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. +- [ ] I have reviewed the [pull request guidelines](https://github.com/plotly/plotly.py/blob/main/CONTRIBUTING.md#opening-a-pull-request) and the [Code of Conduct](https://github.com/plotly/plotly.py/blob/main/CODE_OF_CONDUCT.md) and confirm that this PR follows them. \ No newline at end of file From f9a295ef2fe7dd1359fc70c936f72fc4f6d618cf Mon Sep 17 00:00:00 2001 From: Emily KL <4672118+emilykl@users.noreply.github.com> Date: Tue, 3 Mar 2026 16:49:18 -0500 Subject: [PATCH 4/4] update based on PR comments --- .github/pull_request_template.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 0a6be82cf13..e191dc96267 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -4,26 +4,27 @@ Thank you for your contribution to plotly.py! Please complete each section below. --> -## Link to issue +### Link to issue Closes #(issue number) -## Description of change +### Description of change -## Demo +### Demo -## Testing strategy +### Testing strategy -## Additional information (optional) +### Additional information (optional) -## Guidelines +### Guidelines -- [ ] I have reviewed the [pull request guidelines](https://github.com/plotly/plotly.py/blob/main/CONTRIBUTING.md#opening-a-pull-request) and the [Code of Conduct](https://github.com/plotly/plotly.py/blob/main/CODE_OF_CONDUCT.md) and confirm that this PR follows them. \ No newline at end of file +- [ ] I have reviewed the [pull request guidelines](https://github.com/plotly/plotly.py/blob/main/CONTRIBUTING.md#opening-a-pull-request) and the [Code of Conduct](https://github.com/plotly/plotly.py/blob/main/CODE_OF_CONDUCT.md) and confirm that this PR follows them. +- [ ] I have added an entry to the [changelog](https://github.com/plotly/plotly.py/blob/main/CHANGELOG.md) if needed (not required for documentation PRs).