From c7d6e109c293eaafc391a1d9f868582dee138b9e Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Sun, 6 Oct 2024 07:21:22 -0600 Subject: [PATCH 1/2] chore: use requirements files for dev and docs --- .github/workflows/ci.yaml | 14 +++--- .readthedocs.yaml | 2 +- README.md | 4 +- pyproject.toml | 15 ------- requirements-dev.in | 12 ++++++ requirements-dev.txt | 90 +++++++++++++++++++++++++++++++++++++++ requirements-docs.in | 3 ++ requirements-docs.txt | 71 ++++++++++++++++++++++++++++++ 8 files changed, 186 insertions(+), 25 deletions(-) create mode 100644 requirements-dev.in create mode 100644 requirements-dev.txt create mode 100644 requirements-docs.in create mode 100644 requirements-docs.txt diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 90829f3..499432a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,13 +36,15 @@ jobs: - name: Update pip run: pip install -U pip - name: Install with development dependencies - run: pip install .[cli,dev] + run: pip install .[cli] -r requirements-dev.txt - name: Check with pre-commit run: pre-commit run --all-files - name: Test run: pytest min-dependencies: runs-on: ubuntu-latest + env: + UV_SYSTEM_PYTHON: 1 steps: - name: Checkout uses: actions/checkout@v4 @@ -51,12 +53,10 @@ jobs: with: python-version: "3.11" cache: "pip" - - name: Update pip - run: pip install -U pip + - name: Install uv + uses: astral-sh/setup-uv@v3 - name: Install with development dependencies - run: pip install .[cli,dev] - - name: Install minimum versions of dependencies - run: scripts/install-min-dependencies + run: uv pip install .[cli] -r requirements-dev.txt --resolution lowest-direct - name: Check with pre-commit run: pre-commit run --all-files - name: Test @@ -74,7 +74,7 @@ jobs: - name: Update pip run: pip install -U pip - name: Install with development dependencies - run: pip install .[cli,dev] + run: pip install .[cli] -r requirements-dev.txt - name: Test with coverage run: pytest --cov=stac_asset - name: Upload coverage reports diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 81bf523..bcc3800 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -5,10 +5,10 @@ build: python: "3.11" python: install: + - requirements: requirements-docs.txt - method: pip path: . extra_requirements: - cli - - docs sphinx: configuration: docs/conf.py diff --git a/README.md b/README.md index 927d354..359aa7e 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ Clone, install with the dev dependencies, and install **pre-commit**: ```shell git clone git@github.com:stac-utils/stac-asset.git cd stac-asset -pip install '.[dev]' +pip install -e '.' -r requirements-dev.txt pre-commit install ``` @@ -154,7 +154,7 @@ See [each client's documentation](#clients) for instructions on setting up your Install the documentation dependencies: ```shell -pip install -e '.[docs]' +pip install -e . -r requirements-docs.txt ``` Then, build the docs: diff --git a/pyproject.toml b/pyproject.toml index 3bb0bfb..716b755 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,21 +34,6 @@ cli = [ "tabulate~=0.9.0", "tqdm~=4.66.1", ] -dev = [ - "mypy~=1.3", - "pre-commit~=3.3", - "pystac[validation]>=1.8.4", - "pytest~=8.2", - "pytest-asyncio~=0.21", - "pytest-cov>=5.0", - "pytest-recording~=0.13.1", - "ruff==0.6.8", - "types-aiofiles~=24.1", - "types-python-dateutil~=2.9", - "types-tqdm~=4.66.0", - "types-tabulate~=0.9.0", -] -docs = ["pydata-sphinx-theme~=0.13", "sphinx~=8.0", "sphinx-click~=6.0"] [project.scripts] stac-asset = "stac_asset._cli:cli" diff --git a/requirements-dev.in b/requirements-dev.in new file mode 100644 index 0000000..7f0bb39 --- /dev/null +++ b/requirements-dev.in @@ -0,0 +1,12 @@ +mypy +pre-commit +pystac[validation] +pytest +pytest-asyncio +pytest-cov +pytest-recording +ruff +types-aiofiles +types-python-dateutil +types-tqdm +types-tabulate diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..6c56679 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,90 @@ +# This file was autogenerated by uv via the following command: +# uv pip compile requirements-dev.in +attrs==24.2.0 + # via + # jsonschema + # referencing +cfgv==3.4.0 + # via pre-commit +coverage==7.6.1 + # via pytest-cov +distlib==0.3.8 + # via virtualenv +filelock==3.16.1 + # via virtualenv +identify==2.6.1 + # via pre-commit +idna==3.10 + # via yarl +iniconfig==2.0.0 + # via pytest +jsonschema==4.23.0 + # via pystac +jsonschema-specifications==2023.12.1 + # via jsonschema +multidict==6.1.0 + # via yarl +mypy==1.11.2 + # via -r requirements-dev.in +mypy-extensions==1.0.0 + # via mypy +nodeenv==1.9.1 + # via pre-commit +packaging==24.1 + # via pytest +platformdirs==4.3.6 + # via virtualenv +pluggy==1.5.0 + # via pytest +pre-commit==4.0.0 + # via -r requirements-dev.in +pystac==1.11.0 + # via -r requirements-dev.in +pytest==8.3.3 + # via + # -r requirements-dev.in + # pytest-asyncio + # pytest-cov + # pytest-recording +pytest-asyncio==0.24.0 + # via -r requirements-dev.in +pytest-cov==5.0.0 + # via -r requirements-dev.in +pytest-recording==0.13.2 + # via -r requirements-dev.in +python-dateutil==2.9.0.post0 + # via pystac +pyyaml==6.0.2 + # via + # pre-commit + # vcrpy +referencing==0.35.1 + # via + # jsonschema + # jsonschema-specifications +rpds-py==0.20.0 + # via + # jsonschema + # referencing +ruff==0.6.9 + # via -r requirements-dev.in +six==1.16.0 + # via python-dateutil +types-aiofiles==24.1.0.20240626 + # via -r requirements-dev.in +types-python-dateutil==2.9.0.20241003 + # via -r requirements-dev.in +types-tabulate==0.9.0.20240106 + # via -r requirements-dev.in +types-tqdm==4.66.0.20240417 + # via -r requirements-dev.in +typing-extensions==4.12.2 + # via mypy +vcrpy==6.0.1 + # via pytest-recording +virtualenv==20.26.6 + # via pre-commit +wrapt==1.16.0 + # via vcrpy +yarl==1.13.1 + # via vcrpy diff --git a/requirements-docs.in b/requirements-docs.in new file mode 100644 index 0000000..96f91e3 --- /dev/null +++ b/requirements-docs.in @@ -0,0 +1,3 @@ +pydata-sphinx-theme +sphinx +sphinx-click diff --git a/requirements-docs.txt b/requirements-docs.txt new file mode 100644 index 0000000..11f5f38 --- /dev/null +++ b/requirements-docs.txt @@ -0,0 +1,71 @@ +# This file was autogenerated by uv via the following command: +# uv pip compile requirements-docs.in +accessible-pygments==0.0.5 + # via pydata-sphinx-theme +alabaster==1.0.0 + # via sphinx +babel==2.16.0 + # via + # pydata-sphinx-theme + # sphinx +beautifulsoup4==4.12.3 + # via pydata-sphinx-theme +certifi==2024.8.30 + # via requests +charset-normalizer==3.3.2 + # via requests +click==8.1.7 + # via sphinx-click +docutils==0.21.2 + # via + # pydata-sphinx-theme + # sphinx + # sphinx-click +idna==3.10 + # via requests +imagesize==1.4.1 + # via sphinx +jinja2==3.1.4 + # via sphinx +markupsafe==2.1.5 + # via jinja2 +packaging==24.1 + # via + # pydata-sphinx-theme + # sphinx +pydata-sphinx-theme==0.15.4 + # via -r requirements-docs.in +pygments==2.18.0 + # via + # accessible-pygments + # pydata-sphinx-theme + # sphinx +requests==2.32.3 + # via sphinx +snowballstemmer==2.2.0 + # via sphinx +soupsieve==2.6 + # via beautifulsoup4 +sphinx==8.0.2 + # via + # -r requirements-docs.in + # pydata-sphinx-theme + # sphinx-click +sphinx-click==6.0.0 + # via -r requirements-docs.in +sphinxcontrib-applehelp==2.0.0 + # via sphinx +sphinxcontrib-devhelp==2.0.0 + # via sphinx +sphinxcontrib-htmlhelp==2.1.0 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==2.0.0 + # via sphinx +sphinxcontrib-serializinghtml==2.0.0 + # via sphinx +typing-extensions==4.12.2 + # via pydata-sphinx-theme +urllib3==2.2.3 + # via requests From 0305385cf91a56fe0eb4203ddccc3158a40825c2 Mon Sep 17 00:00:00 2001 From: Pete Gadomski Date: Sun, 6 Oct 2024 07:23:15 -0600 Subject: [PATCH 2/2] chore: remove Python 3.9 --- .github/workflows/ci.yaml | 3 --- CHANGELOG.md | 4 ++++ pyproject.toml | 3 +-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 499432a..d04d931 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,7 +11,6 @@ jobs: strategy: matrix: python-version: - - "3.9" - "3.10" - "3.11" - "3.12" @@ -19,8 +18,6 @@ jobs: - ubuntu-latest - macos-latest exclude: # macos-latest is arm64, which doesn't have these pythons - - os: macos-latest - python-version: "3.9" - os: macos-latest python-version: "3.10" fail-fast: true diff --git a/CHANGELOG.md b/CHANGELOG.md index d77ec90..af6a6bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Removed + +- Python 3.9 ([#224](https://github.com/stac-utils/stac-asset/pull/224)) + ## [0.4.3] - 2024-07-29 ### Added diff --git a/pyproject.toml b/pyproject.toml index 716b755..dda2de3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,14 +8,13 @@ keywords = ["stac", "async"] classifiers = [ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Development Status :: 4 - Beta", ] license = { text = "Apache-2.0" } -requires-python = ">=3.9" +requires-python = ">=3.10" dependencies = [ "aiofiles>=23.1.0", "aiobotocore>=2.5.0",