Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add all dependency group #3354

Merged
merged 8 commits into from
Mar 11, 2024
Merged
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.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]"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pip install "altair[all]"
pip install altair[all]

Since there is no usage of special characters, I think we don't need the double quotes here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The quotes are needed for zsh (because square brackets are used for pattern matching), which is the default shell on MacOS. See https://stackoverflow.com/questions/30539798/zsh-no-matches-found-requestssecurity. I think this approach should be valid across all major shells on windows and linux as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. I did not know this. Thanks for explaining. Just ignore then!


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
Loading