Skip to content

Commit

Permalink
chore: use dependency-groups
Browse files Browse the repository at this point in the history
  • Loading branch information
gadomski committed Feb 3, 2025
1 parent f991340 commit 0bb3329
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 96 deletions.
51 changes: 6 additions & 45 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:
merge_group:

concurrency:
# Cancel running job if another commit is pushed to the branch
group: ${{ github.ref }}
cancel-in-progress: true

Expand All @@ -34,14 +33,13 @@ jobs:
- macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: Sync
run: uv sync --all-extras
- name: Lint
run: uv run pre-commit run --all-files
- name: Test on windows
if: runner.os == 'Windows'
shell: bash
Expand All @@ -57,12 +55,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install with dependencies
run: uv sync --all-extras
- name: Run coverage with orjson
Expand All @@ -80,45 +73,18 @@ jobs:
if: ${{ env.GITHUB_REPOSITORY }} == 'stac-utils/pystac'
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
files: ./coverage.xml
fail_ci_if_error: false
- name: Check for coverage drop
# This will use the configured fail-under, causing this job to fail if the
# coverage drops.
run: uv run coverage report

lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Sync
run: uv sync
- name: Execute linters & type checkers
run: uv run pre-commit run --all-files

without-orjson:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Sync
run: uv sync
- name: Uninstall orjson
Expand Down Expand Up @@ -150,15 +116,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install pandoc
run: sudo apt-get install pandoc
- name: Install pystac
run: uv sync --no-dev && uv sync --package pystac-docs --inexact
- name: Sync
run: uv sync --group docs
- name: Check docs
run: uv run make -C docs html SPHINXOPTS="-W --keep-going -n"
3 changes: 1 addition & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ build:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
- uv sync --all-extras --no-dev
- uv sync --package pystac-docs --inexact # we need inexact to keep the top-level sync packages
- uv sync --group docs
- uv run sphinx-build -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html

formats:
Expand Down
19 changes: 0 additions & 19 deletions docs/pyproject.toml

This file was deleted.

71 changes: 41 additions & 30 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,47 @@ orjson = ["orjson>=3.5"]
urllib3 = ["urllib3>=1.26"]
validation = ["jsonschema~=4.18"]

[dependency-groups]
dev = [
"asv>=0.6.4",
"codespell<2.3",
"coverage>=7.6.2",
"doc8>=1.1.2",
"html5lib>=1.1",
"jinja2>=3.1.4",
"jsonschema>=4.23.0",
"mypy>=1.11.2",
"orjson>=3.10.7",
"packaging>=24.1",
"pre-commit>=4.0.1",
"pytest>=8.3.3",
"pytest-cov>=5.0.0",
"pytest-mock>=3.14.0",
"pytest-recording>=0.13.2",
"requests-mock>=1.12.1",
"ruff>=0.6.9",
"types-html5lib>=1.1.11.20240806",
"types-jsonschema>=4.23.0.20240813",
"types-orjson>=3.6.2",
"types-python-dateutil>=2.9.0.20241003",
"types-urllib3>=1.26.25.14",
"virtualenv>=20.26.6",
]
docs = [
"boto3>=1.35.39",
"ipython>=8.28.0",
"jinja2>=3.1.4",
"jupyter>=1.1.1",
"nbsphinx>=0.9.5",
"pydata-sphinx-theme>=0.15.4",
"rasterio>=1.4.1",
"shapely>=2.0.6",
"sphinx>=8.1.1",
"sphinx-autobuild>=2024.10.3",
"sphinx-design>=0.6.1",
"sphinxcontrib-fulltoc>=1.2.0",
]

[project.urls]
Documentation = "https://pystac.readthedocs.io"
Repository = "https://github.com/stac-utils/pystac"
Expand Down Expand Up @@ -72,36 +113,6 @@ exclude = ["tests*", "benchmarks*"]
[tool.setuptools.dynamic]
version = { attr = "pystac.version.__version__" }

[tool.uv]
dev-dependencies = [
"asv>=0.6.4",
"codespell<2.3",
"coverage>=7.6.2",
"doc8>=1.1.2",
"html5lib>=1.1",
"jinja2>=3.1.4",
"jsonschema>=4.23.0",
"mypy>=1.11.2",
"orjson>=3.10.7",
"packaging>=24.1",
"pre-commit>=4.0.1",
"pytest>=8.3.3",
"pytest-cov>=5.0.0",
"pytest-mock>=3.14.0",
"pytest-recording>=0.13.2",
"requests-mock>=1.12.1",
"ruff>=0.6.9",
"types-html5lib>=1.1.11.20240806",
"types-jsonschema>=4.23.0.20240813",
"types-orjson>=3.6.2",
"types-python-dateutil>=2.9.0.20241003",
"types-urllib3>=1.26.25.14",
"virtualenv>=20.26.6",
]

[tool.uv.workspace]
members = ["docs"]

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

0 comments on commit 0bb3329

Please sign in to comment.