Add pre-commit auto-update workflow and migrate zstash from setup.py/setup.cfg to pyproject.toml - #454
Conversation
Replace setup.py and setup.cfg with a PEP 621 pyproject.toml, moving flake8 config to .flake8 and isort/pycodestyle/mypy config to [tool.*] sections. Add qa/dev optional-dependencies pinned to .pre-commit-config.yaml, plus scripts/sync_pre_commit_versions.py and the auto-update workflow to keep pyproject.toml, conda/dev.yml, and .pre-commit-config.yaml in sync automatically. Also pins flake8-isort==6.1.2 (previously unpinned; 6.1.1 conflicts with isort==6.0.1) and fixes the deprecated default_stages: [commit] alias. Brings zstash's DevOps setup in line with zppy and zppy-interfaces. Claude-generated diff, verified locally: patch applies cleanly, `python scripts/sync_pre_commit_versions.py --check` passes.
| indef_wait: bool = True, | ||
| *args, | ||
| **kwargs | ||
| **kwargs, |
There was a problem hiding this comment.
This file was updated after running pre-commit run --all-files based on the updated conda/dev.yml
There was a problem hiding this comment.
Pull request overview
This PR modernizes zstash’s developer workflow by adding an automated pre-commit dependency update workflow and migrating packaging/tool configuration toward pyproject.toml (removing setup.py and moving related metadata/config accordingly).
Changes:
- Add a scheduled GitHub Actions workflow to run
pre-commit-updateand open a PR with updated pins. - Migrate packaging metadata from
setup.pytopyproject.tomland update tbump to bump versions there. - Add a helper script to sync pinned QA tool versions across
.pre-commit-config.yaml,conda/dev.yml, andpyproject.toml.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
zstash/parallel.py |
Minor signature formatting updates (trailing commas) for consistency/formatters. |
tbump.toml |
Switch version-bump source from setup.py to pyproject.toml. |
setup.py |
Remove legacy setuptools entrypoint in favor of pyproject.toml. |
scripts/sync_pre_commit_versions.py |
Add script to propagate pinned tool versions from pre-commit config into conda/pyproject. |
pyproject.toml |
Introduce PEP 621 project metadata and move tool configuration (black/isort/mypy/pycodestyle) here. |
conda/dev.yml |
Document/align QA tool pins and add flake8-isort pin. |
.pre-commit-config.yaml |
Update hook args for new config locations; pin flake8-isort; add mypy deps. |
.github/workflows/pre_commit_update_workflow.yml |
Add scheduled workflow to auto-update pre-commit pins and open a PR. |
.flake8 |
Remove tool sections moved to pyproject.toml, keeping flake8-specific config. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Confirmed I could create a conda env and pre-commit passes in it. |
|
https://github.com/E3SM-Project/zstash/actions/runs/31825990337 ran successfully. |
|
Running the GitHub Action resulted in #455, which is now merged. |
Add pre-commit auto-update workflow and migrate zstash from setup.py/setup.cfg to pyproject.toml
Summary
Objectives:
zppyandzppy-interfacesmore closely.Select one: This pull request is...
Small Change