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
2 changes: 1 addition & 1 deletion .github/workflows/build-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: |
uv venv
source .venv/bin/activate
uv sync --locked --extra dev_build
uv sync --locked --group dev_build
cd js
npm ci
npm run build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uv venv
source .venv/bin/activate
uv lock --check
uv sync --locked --extra dev_codegen
uv sync --locked --group dev_codegen
- name: Run codegen
run: |
source .venv/bin/activate
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: |
uv venv
source .venv/bin/activate
uv sync --locked --extra dev_core
uv sync --locked --group dev_core
- name: Check handwritten code with ruff
run: |
source .venv/bin/activate
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-js-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
source .venv/bin/activate
# Technically, we only need the `jupyter-builder` package, but using the dev_build extra
# keeps build behavior consistent across all CI jobs
uv sync --locked --extra dev_build
uv sync --locked --group dev_build
cd js
npm ci
npm run build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
run: |
uv venv
source .venv/bin/activate
uv sync --locked --extra dev_build
uv sync --locked --group dev_build
cd js
npm ci
npm run build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-percy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run: |
uv venv
source .venv/bin/activate
uv sync --locked --extra dev_optional
uv sync --locked --group dev_optional
- name: Build HTML figures (Pandas 2)
run: |
source .venv/bin/activate
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/run-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uv venv
source .venv/bin/activate
uv lock --check
uv sync --locked --extra dev_core
uv sync --locked --group dev_core
python --version
- name: Test core
run: |
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
run: |
uv venv
source .venv/bin/activate
uv sync --locked --extra dev_optional --extra dev_pandas3
uv sync --locked --group dev_optional --group dev_pandas3
python --version
- name: Test core
run: |
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
run: |
uv venv
source .venv/bin/activate
uv sync --locked --extra dev_optional --extra dev_pandas${{ matrix.pandas-version }}
uv sync --locked --group dev_optional --group dev_pandas${{ matrix.pandas-version }}
- name: Test core
run: |
source .venv/bin/activate
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
run: |
uv venv
source .venv/bin/activate
uv sync --locked --extra dev_optional
uv sync --locked --group dev_optional
uv pip uninstall kaleido
uv pip install kaleido==0.2.1
python --version
Expand Down Expand Up @@ -187,7 +187,7 @@ jobs:
uv venv
source .venv/bin/activate
uv lock --check
uv sync --locked --extra dev_matplotlib
uv sync --locked --group dev_matplotlib
python --version
- name: Test matplotlylib
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-plotlyjs-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: |
uv venv
source .venv/bin/activate
uv sync --locked --extra dev_optional
uv sync --locked --group dev_optional
- name: Download plot-schema.json from plotly.js
# plotly.js CI keeps test/plot-schema.json identical to the built schema
env:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

### Changed
- Replace the development extras (`dev` and those prefixed with `dev_`) with [dependency groups](https://packaging.python.org/en/latest/specifications/dependency-groups/) of the same names [[#5923](https://github.com/plotly/plotly.py/pull/5923)]
- Contributors now install them with `uv sync --group dev` or `pip install -e . --group dev` (pip 25.1.1 or later)
- The `express` and `kaleido` extras do not change

## [7.2.0] - 2026-11-24

Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ If you are using `uv`,
you can install all of the packages needed for developing and testing plotly.py with this command:

```bash
uv sync --extra dev
uv sync --group dev
```

If you are using `conda` or `virtualenv`,
or if `uv sync` does not work as you expect,
you can install all packages with:
you can install all packages with pip 25.1.1 or later:

```bash
pip install -e '.[dev]'
pip install -e . --group dev
```

If you're testing local changes in Jupyter Lab or Jupyter Notebook, you'll want to run these commands when you're setting up your development environment:
Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Ensure you have the following installed:

* `git switch main && git pull`
* `git status`: ensure your working tree is clean
* `uv pip install -e ".[dev_optional]"`
* `uv pip install -e . --group dev_optional`
* `cd js && npm ci && cd ..`

### Finalize changelog
Expand Down
27 changes: 15 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,33 +41,34 @@ dependencies = [
[project.optional-dependencies]
express = ["numpy>=1.22"]
kaleido = ["kaleido>=1.3.0"]

[dependency-groups]
dev_core = [
"pytest",
"requests",
# pin precise version of ruff to prevent accidental reformatting in case its defaults are updated
"ruff==0.11.12"
]
dev_matplotlib = [
"plotly[dev_core]",
{include-group = "dev_core"},
"matplotlib",
# Ensure we use a new-enough version that a pre-built Python 3.14 whl exists
"contourpy>=1.3.3; python_version>='3.14'",
"kiwisolver>=1.4.9"
]
dev_build = [
"plotly[dev_core]",
{include-group = "dev_core"},
"build",
"jupyter-builder"
]
dev_codegen = [ # Dependencies for running Python codegen
"plotly[dev_core]",
{include-group = "dev_core"},
"inflect"
]
dev_optional = [
"plotly[dev_build]",
"plotly[dev_codegen]",
"plotly[express]",
"plotly[kaleido]",
{include-group = "dev_build"},
{include-group = "dev_codegen"},
"plotly[express,kaleido]",
"anywidget",
"colorcet",
"geopandas",
Expand All @@ -86,10 +87,10 @@ dev_optional = [
"xarray"
]
dev = [
"plotly[dev_optional]"
{include-group = "dev_optional"}
]

# The following extras are intended for use in CI only
# The following groups are intended for use in CI only
dev_pandas1 = [
"pandas>=1,<2",
"numpy>=1,<2",
Expand All @@ -103,12 +104,14 @@ dev_pandas3 = [
]

[tool.uv]
# Install no group unless asked, so that `uv sync` does not install the `dev` group
default-groups = []
exclude-newer = "72 hours"
exclude-newer-package = { plotly = false }
conflicts = [
[{ extra = "dev_pandas1" }, { extra = "dev_pandas2" }],
[{ extra = "dev_pandas1" }, { extra = "dev_pandas3" }],
[{ extra = "dev_pandas2" }, { extra = "dev_pandas3" }],
[{ group = "dev_pandas1" }, { group = "dev_pandas2" }],
[{ group = "dev_pandas1" }, { group = "dev_pandas3" }],
[{ group = "dev_pandas2" }, { group = "dev_pandas3" }],
]

[project.scripts]
Expand Down
Loading
Loading