Skip to content

Add pre-commit auto-update workflow and migrate zstash from setup.py/setup.cfg to pyproject.toml - #454

Merged
forsyth2 merged 2 commits into
mainfrom
add-pre-commit-update-workflow
Aug 14, 2026
Merged

Add pre-commit auto-update workflow and migrate zstash from setup.py/setup.cfg to pyproject.toml#454
forsyth2 merged 2 commits into
mainfrom
add-pre-commit-update-workflow

Conversation

@forsyth2

@forsyth2 forsyth2 commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Add pre-commit auto-update workflow and migrate zstash from setup.py/setup.cfg to pyproject.toml

Summary

Objectives:

Select one: This pull request is...

  • a bug fix: increment the patch version
  • a small improvement: increment the minor version
  • a new feature: increment the minor version
  • an incompatible (non-backwards compatible) API change: increment the major version

Small Change

  • To merge, I will use "Squash and merge". That is, this change should be a single commit.
  • Logic: I have visually inspected the entire pull request myself.
  • Pre-commit checks: All the pre-commits checks have passed.

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.
@forsyth2 forsyth2 self-assigned this Aug 14, 2026
@forsyth2 forsyth2 added the DevOps CI/CD, configuration, etc. label Aug 14, 2026
Comment thread .github/workflows/pre_commit_update_workflow.yml Outdated
Comment thread zstash/parallel.py
indef_wait: bool = True,
*args,
**kwargs
**kwargs,

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was updated after running pre-commit run --all-files based on the updated conda/dev.yml

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-update and open a PR with updated pins.
  • Migrate packaging metadata from setup.py to pyproject.toml and update tbump to bump versions there.
  • Add a helper script to sync pinned QA tool versions across .pre-commit-config.yaml, conda/dev.yml, and pyproject.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.

Comment thread .github/workflows/pre_commit_update_workflow.yml Outdated
Comment thread .github/workflows/pre_commit_update_workflow.yml
Comment thread .pre-commit-config.yaml
Comment thread pyproject.toml
Comment thread scripts/sync_pre_commit_versions.py
Comment thread pyproject.toml
Comment thread conda/dev.yml
@forsyth2

Copy link
Copy Markdown
Collaborator Author

Confirmed I could create a conda env and pre-commit passes in it.

@forsyth2
forsyth2 merged commit f00c0af into main Aug 14, 2026
6 checks passed
@forsyth2
forsyth2 deleted the add-pre-commit-update-workflow branch August 14, 2026 17:51
@forsyth2

forsyth2 commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator Author

@forsyth2

Copy link
Copy Markdown
Collaborator Author

Running the GitHub Action resulted in #455, which is now merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DevOps CI/CD, configuration, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants