Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ef8dead
Extract payload from Task class and deprecate _payload access
pjhartzell Sep 8, 2025
a93d42a
Make variable naming consistent in payload.py
pjhartzell Sep 8, 2025
776654d
add collection assignment
pjhartzell Sep 10, 2025
5e1ee4f
update tests for new payload class and utils changes
pjhartzell Sep 10, 2025
283adc0
add tests for payload property and method errors
pjhartzell Sep 10, 2025
4fbb2a3
Update README and CHANGELOG
pjhartzell Sep 11, 2025
48ed4a5
update repo machinery
pjhartzell Sep 11, 2025
8d74777
update README with uv instructions
pjhartzell Sep 11, 2025
9e106e1
possible readthedocs fixes
pjhartzell Sep 11, 2025
a61a589
fixup revised release.yml
pjhartzell Sep 11, 2025
9651fbb
grammar correction in README.md
pjhartzell Sep 12, 2025
fdbe538
trigger readthedocs build
pjhartzell Sep 12, 2025
e02e22b
revert a suspect bad change to .readthedocs.yaml
pjhartzell Sep 13, 2025
df65fdc
fix pypi badge in README
pjhartzell Sep 13, 2025
69ecb06
readthedocs updates
pjhartzell Sep 15, 2025
0c358b5
remove non-backwards compatible validation
pjhartzell Sep 15, 2025
b841430
review: better dependency handling and uv usage
pjhartzell Sep 16, 2025
874810e
docs: update copyright year and swap version/release to align with Sp…
pjhartzell Sep 16, 2025
0db1ae0
docs: use docs dependency group
pjhartzell Sep 16, 2025
0f146d9
docs: update uv lock file after correcting dependencies
pjhartzell Sep 16, 2025
3d17c2c
docs: revert back to using requirements file for readthedocs
pjhartzell Sep 16, 2025
c6c7743
review: use Shortcut Reference Style in CHANGELOG
pjhartzell Sep 16, 2025
bd58ce4
review: global_upload_options to upload_options
pjhartzell Sep 16, 2025
ba9ecb8
review: remove requirement for upload_options
pjhartzell Sep 16, 2025
4d1029d
review: allow collection_name to be None in get_collection_upload_opt…
pjhartzell Sep 16, 2025
ee5a923
review: update Optional and Union usage to |
pjhartzell Sep 16, 2025
9bb62df
review: move to local pre-commit repos
pjhartzell Sep 16, 2025
e936c77
review: switch to dynamic versioning
pjhartzell Sep 16, 2025
ad39d48
review: update ruff rules
pjhartzell Sep 16, 2025
d2ad46c
review: use locked uv for docs
pjhartzell Sep 16, 2025
a320239
review: pull version into __init__ and readthedocs conf.py
pjhartzell Sep 16, 2025
666b721
review: show basic upload options in docs
pjhartzell Sep 17, 2025
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
60 changes: 32 additions & 28 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,63 +7,67 @@ on:
pull_request:

jobs:
standard:
standard-lint-test:
name: Lint and test
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install dependencies for linting
run: pip install '.[dev]'
- uses: astral-sh/setup-uv@v6
- name: Install dependencies
run: uv sync --locked --group dev
- name: Lint
run: pre-commit run --all-files
- name: Install dependencies for testing
run: pip install '.[test]'
run: uv run pre-commit run --all-files
- name: Test
run: uv run pytest
minimum-dependencies-test:
name: Minimum dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: astral-sh/setup-uv@v6
- name: Install minimum dependencies
run: uv sync --resolution lowest-direct --group dev
- name: Test
run: pytest
run: uv run pytest
codecov:
name: Codecov
needs:
- standard
- standard-lint-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
- name: Install
run: pip install '.[test]'
run: uv sync --locked --group dev
- name: Test
run: pytest --cov=stactask
run: uv run pytest --cov=stactask --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
fail_ci_if_error: false
docs:
name: Docs
needs:
- standard
- standard-lint-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
- name: Install
run: pip install . -r docs/requirements.txt
run: uv sync --locked --only-group docs
- name: Make docs
run: cd docs && make html
run: cd docs && uv run make html
17 changes: 5 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,15 @@ jobs:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Set up Python 3.x
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Install release dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- uses: astral-sh/setup-uv@v6

- name: Build and publish package
env:
TWINE_USERNAME: ${{ secrets.PYPI_STACUTILS_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_STACUTILS_PASSWORD }}
run: |
python -m build
twine upload dist/*
uv build
uv tool install twine
uv tool run twine upload dist/*
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
__version__.py

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
74 changes: 46 additions & 28 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,50 @@
# Configuration file for pre-commit (https://pre-commit.com/).
# Please run `pre-commit run --all-files` when adding or changing entries.

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
- repo: local
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: ruff_check
name: ruff check
entry: ruff check --force-exclude
language: python
'types_or': [python, pyi]
args: [--fix, --exit-non-zero-on-fix]
require_serial: true
- id: ruff_format
name: ruff format
entry: ruff format --force-exclude
language: python
'types_or': [python, pyi]
args: []
require_serial: true
- id: check-added-large-files
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
args: [--ignore-words=.codespellignore]
types_or: [jupyter, markdown, python, shell]
- repo: https://github.com/psf/black
rev: 24.2.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
hooks:
name: Check for added large files
entry: check-added-large-files
language: system
- id: check-toml
name: Check Toml
entry: check-toml
language: system
types: [toml]
- id: check-yaml
name: Check Yaml
entry: check-yaml
language: system
types: [yaml]
- id: end-of-file-fixer
name: Fix End of Files
entry: end-of-file-fixer
language: system
types: [text]
stages: [pre-commit, pre-push, manual]
- id: trailing-whitespace
name: Trim Trailing Whitespace
entry: trailing-whitespace-fixer
language: system
types: [text]
stages: [pre-commit, pre-push, manual]
- id: mypy
additional_dependencies:
- pytest
- types-setuptools == 65.7.0.3
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.1
hooks:
- id: ruff
name: mypy
entry: mypy
language: python
'types_or': [python, pyi]
args: []
require_serial: true
66 changes: 52 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,53 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## Unreleased

### Added

- ([#176]) Adds a `collection_matchers`
array to the payload process block to support deterministic order when collection
matching.
- ([#176]) Adds a `collection_options`
object to the payload process block to support collection-specific options such as
upload options.

### Changed

- ([#176]) Separated the payload
data model from the Task class.
- ([#176]) Direct access to the
payload dictionary is now through `self.payload` rather than `self._payload`
(deprecated).
- ([#176]) Payload properties are now
accessed through `self.payload.<property>` rather than `self.<property>` (deprecated).
- ([#176]) Removed support for Python
3.9.

## [0.6.1]

### Added

- ([#167](https://github.com/stac-utils/stac-task/pull/167)) Adds workflow-level
- ([#167]) Adds workflow-level
options to the ProcessDefinition object in a new `workflow_options` field. They are
combined with each task's options, giving precedence to the task options on conflict.
- ([#167](https://github.com/stac-utils/stac-task/pull/167)) Adds a `workflow_options`
- ([#167]) Adds a `workflow_options`
property to the `Task` class that returns the `workflow_options` dictionary from the
`ProcessDefinition` object.
- ([#167](https://github.com/stac-utils/stac-task/pull/167)) Adds a `task_options`
- ([#167]) Adds a `task_options`
property to the `Task` class that returns the task options from the `tasks` dictionary
in the `ProcessDefinition` object.

### Deprecated

- ([#166](https://github.com/stac-utils/stac-task/pull/166)) Bare `ProcessDefinition`
- ([#166]) Bare `ProcessDefinition`
objects are deprecated in favor of arrays of `ProcessDefinition` objects.

## [0.6.0]

### ⚠️ Breaking Change

- ([#147](https://github.com/stac-utils/stac-task/pull/147)) Moved
- ([#147]) Moved
`Task.validate` from class method to instance method, availing
implementers of other instance convenience methods (i.e. `self.parameters`).

Expand Down Expand Up @@ -76,28 +99,28 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added

- ([#92](https://github.com/stac-utils/stac-task/pull/92)) Task.upload_item_assets_to_s3 and asset_io.upload_item_assets_to_s3 support explicitly specifying the boto3utils3.s3 object.
- ([#92]) Task.upload_item_assets_to_s3 and asset_io.upload_item_assets_to_s3 support explicitly specifying the boto3utils3.s3 object.

## [v0.4.1] - 2024-03-06

### Fixed

- ([#90](https://github.com/stac-utils/stac-task/pull/90)) Block asset_io
- ([#90]) Block asset_io
module from reaching out to upstream stac APIs (especially on NASA Wednesdays
`transform_hrefs=False`)

## [v0.4.0] - 2024-02-14

### Fixed

- ([#86](https://github.com/stac-utils/stac-task/pull/86)) Guard cleanup of workdir to ensure task was actually created.
- ([#86]) Guard cleanup of workdir to ensure task was actually created.

### Added

- ([#72](https://github.com/stac-utils/stac-task/pull/72)) Given that `_get_file` is part of the `AsyncFileSystem` spec, this
- ([#72]) Given that `_get_file` is part of the `AsyncFileSystem` spec, this
adds the synchronous `get_file` as a way to retrieve files if `_get_file` is
not found.
- ([#77](https://github.com/stac-utils/stac-task/pull/77)) Added option `keep_original_filenames` to download routines to
- ([#77]) Added option `keep_original_filenames` to download routines to
support legacy applications dependent on filename specifics.

## [v0.3.0] - 2023-12-20
Expand All @@ -112,9 +135,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed

- Ensure `workdir` is an absolute path
([#54](https://github.com/stac-utils/stac-task/pull/51)).
([#54]).
- When a `workdir` is set for a `Task` the `workdir` will no longer be removed
by default ([#51](https://github.com/stac-utils/stac-task/pull/51)). That is,
by default ([#51]). That is,
the `save_workdir` argument to `Task` constructor now defaults to `None`, and
if left as `None` the default behavior is now conditional on whether or not a
`workdir` is specified.
Expand All @@ -131,8 +154,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Fixed

- Typing ([#11](https://github.com/stac-utils/stac-task/pull/11), [#25](https://github.com/stac-utils/stac-task/pull/25))
- Removed console scripts ([#18](https://github.com/stac-utils/stac-task/pull/18))
- Typing ([#11], [#25])
- Removed console scripts ([#18])

## [v0.1.0] - 2022-10-31

Expand All @@ -150,3 +173,18 @@ Initial release.
[v0.2.0]: <https://github.com/stac-utils/stac-task/compare/v0.1.1...v0.2.0>
[v0.1.1]: <https://github.com/stac-utils/stac-task/compare/v0.1.0...v0.1.1>
[v0.1.0]: <https://github.com/stac-utils/stac-task/tree/v0.1.0>

[#176]: https://github.com/stac-utils/stac-task/pull/176
[#167]: https://github.com/stac-utils/stac-task/pull/167
[#166]: https://github.com/stac-utils/stac-task/pull/166
[#147]: https://github.com/stac-utils/stac-task/pull/147
[#92]: https://github.com/stac-utils/stac-task/pull/92
[#90]: https://github.com/stac-utils/stac-task/pull/90
[#86]: https://github.com/stac-utils/stac-task/pull/86
[#77]: https://github.com/stac-utils/stac-task/pull/77
[#72]: https://github.com/stac-utils/stac-task/pull/72
[#54]: https://github.com/stac-utils/stac-task/pull/54
[#51]: https://github.com/stac-utils/stac-task/pull/51
[#25]: https://github.com/stac-utils/stac-task/pull/25
[#18]: https://github.com/stac-utils/stac-task/pull/18
[#11]: https://github.com/stac-utils/stac-task/pull/11
Loading