Skip to content

Commit

Permalink
Add all dependency group (#3354)
Browse files Browse the repository at this point in the history
* Add `all` dependency group

* Update documentation installation instructions to include [all]

* all is a default feature

* quote them

* include all

* altair_tiles>=0.3.0
  • Loading branch information
jonmmease authored Mar 11, 2024
1 parent 86a4810 commit 32443be
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
pip install ".[all, dev]"
# pip install "selenium<4.3.0"
# pip install altair_saver
- name: Install specific jsonschema
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
pip install ".[all, dev]"
- name: Lint with ruff
run: |
ruff check .
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ every time you open a new Python interpreter

```cmd
cd altair/
python -m pip install -e .[dev]
python -m pip install -e ".[all, dev]"
```

'[dev]' indicates that pip should also install the development requirements
which you can find in `pyproject.toml` (`[project.optional-dependencies]/dev`)
'[all, dev]' indicates that pip should also install the optional and development requirements
which you can find in `pyproject.toml` (`[project.optional-dependencies]/all` and `[project.optional-dependencies]/dev`)

### Creating a Branch

Expand Down
3 changes: 3 additions & 0 deletions NOTES_FOR_MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ an issue](https://github.com/vega/vl-convert/issues) if this version hasn't been
included in a released yet.). Update the vl-convert version check in `altair/utils/_importers.py`
with the new minimum required version of vl-convert.

Also, the version bound of the `vl-convert-python` package should be updated in the
`[project.optional-dependencies]/all` dependency group in `pyproject.toml`.

## Releasing the Package

To cut a new release of Altair, follow the steps outlined in
Expand Down
6 changes: 3 additions & 3 deletions doc/getting_started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Altair can be installed, along with the example datasets in vega_datasets_, usin

.. code-block:: bash
pip install altair vega_datasets
pip install "altair[all]"
If you are using the conda_ package manager, the equivalent is:

Expand All @@ -33,11 +33,11 @@ from the root of the repository to install the main version of Altair:
pip install -e .
To install development dependencies as well, run
To install optional and development dependencies as well, run

.. code-block:: bash
pip install -e .[dev]
pip install -e ".[all, dev]"
If you do not wish to clone the source repository, you can install the
development version directly from GitHub using:
Expand Down
17 changes: 10 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,25 @@ Documentation = "https://altair-viz.github.io"
Source = "https://github.com/altair-viz/altair"

[project.optional-dependencies]
all = [
"vega_datasets>=0.9.0",
"vl-convert-python>=1.1.0",
"pyarrow>=11",
"vegafusion[embed]>=1.5.0",
"anywidget>=0.9.0",
"altair_tiles>=0.3.0"
]
dev = [
"hatch",
"ruff>=0.3.0",
"ipython",
"pytest",
"pytest-cov",
"m2r",
"vega_datasets",
"vl-convert-python>=1.1.0",
"mypy",
"pandas-stubs",
"types-jsonschema",
"types-setuptools",
"pyarrow>=11",
"vegafusion[embed]>=1.5.0",
"anywidget",
"geopandas",
]
doc = [
Expand Down Expand Up @@ -100,7 +103,7 @@ include = ["/altair"]
artifacts = ["altair/jupyter/js/index.js"]

[tool.hatch.envs.default]
features = ["dev"]
features = ["all", "dev"]

[tool.hatch.envs.default.scripts]
test = [
Expand All @@ -113,7 +116,7 @@ test-coverage = "python -m pytest --pyargs --doctest-modules --cov=altair --cov-
test-coverage-html = "python -m pytest --pyargs --doctest-modules --cov=altair --cov-report html altair"

[tool.hatch.envs.doc]
features = ["dev", "doc"]
features = ["all", "dev", "doc"]

[tool.hatch.envs.doc.scripts]
clean = "rm -rf doc/_build"
Expand Down

0 comments on commit 32443be

Please sign in to comment.