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

Use requirements files for dev and docs #224

Merged
merged 2 commits into from
Oct 6, 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
17 changes: 7 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@ jobs:
strategy:
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
os:
- 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
Expand All @@ -36,13 +33,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
Expand All @@ -51,12 +50,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
Expand All @@ -74,7 +71,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
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Clone, install with the dev dependencies, and install **pre-commit**:
```shell
git clone [email protected]:stac-utils/stac-asset.git
cd stac-asset
pip install '.[dev]'
pip install -e '.' -r requirements-dev.txt
pre-commit install
```

Expand All @@ -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:
Expand Down
18 changes: 1 addition & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -34,21 +33,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"
Expand Down
12 changes: 12 additions & 0 deletions requirements-dev.in
Original file line number Diff line number Diff line change
@@ -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
90 changes: 90 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions requirements-docs.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pydata-sphinx-theme
sphinx
sphinx-click
71 changes: 71 additions & 0 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -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