-
Notifications
You must be signed in to change notification settings - Fork 32
modernize ci and fix sdist building #68
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The pre-commit checks are now handled by pre-commit.ci, so the dedicated workflow job is no longer needed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Replace separate main.yml and deploy.yml with unified test.yml - Use hynek/build-and-inspect-python-package@v2 for building - Remove SETUPTOOLS_SCM_PRETEND_VERSION hack (no longer needed) - Test actual built wheel artifacts instead of source - Migrate from hatch to uv for faster dependency management - Add uv caching with astral-sh/setup-uv@v7 - Use trusted publishing with correct environment names - Enable build provenance attestations for supply chain security 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Add id-token, attestations, and contents permissions to the build-and-inspect job to enable OIDC token generation for build provenance attestations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Use uv's isolated environment approach instead of system-wide installation. This is the recommended pattern for both GitHub Actions and GitLab CI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Move sparse checkout to the beginning (before uv setup) - Include uv.lock in sparse checkout for dependency resolution - Add verification step to assert wheel and sdist artifacts exist - List dist/ contents for debugging if tests fail This ensures the workflow fails fast if build artifacts are missing or malformed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Set bash as the default shell for the test job to ensure glob patterns work consistently on both Ubuntu and Windows runners. This simplifies the workflow by avoiding platform-specific paths. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Use the supported_python_classifiers_json_array output from build-and-inspect-python-package instead of hardcoding Python versions. This ensures the CI automatically tests all Python versions declared in the package classifiers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Switch from hatchling to setuptools>=77 build backend - Use modern PEP 639 license specifiers (license-files) - Configure setuptools_scm to write version to _version.py - Drop Python 3.8 and 3.9 support (requires-python >= 3.10) - Add SETUPTOOLS_SCM_OVERRIDES_FOR_INICONFIG to use no-local-version scheme on main branch instead of SETUPTOOLS_SCM_PRETEND_VERSION hack - Remove hatch configuration and test environments This modernizes the build system and uses setuptools_scm's official override mechanism for controlling version schemes per branch. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Replace black and pyupgrade with ruff-check and ruff-format hooks - Configure ruff with isort (I), bugbear (B), pyupgrade (UP), and pytest-style (PT) rules - Set force-single-line imports for isort - Auto-fix imports and code style with ruff Ruff automatically: - Sorted and organized imports (isort) - Upgraded to modern Python syntax (pyupgrade) - Applied bugbear fixes - Fixed pytest style issues (renamed shadowing variables) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Remove `from __future__ import annotations` (default in Python 3.10+) - Remove TYPE_CHECKING guard for Final imports (not needed in 3.10+) - Import Final directly from typing module - Use forward references for IniConfig in SectionWrapper These patterns are no longer needed since we require Python >= 3.10 and PEP 563 postponed evaluation is the default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Add CHANGELOG entry for version 2.2.0 - Add create-release job to auto-create GitHub releases on tag push - Change publish-to-pypi to trigger on tag push (not release event) - Auto-generate release notes and attach build artifacts The release process is now fully automated: push a tag and the workflow will build, test, create a GitHub release, and publish to PyPI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request completely restructures the project's GitHub Actions workflows for CI and deployment. It removes the old
main.ymlanddeploy.ymlworkflows and introduces a new, more modulartest.ymlworkflow. The new workflow separates build, test, and publishing steps, adds artifact verification, and improves security and reproducibility with build provenance attestation.Key changes:
Workflow modernization and modularization:
.github/workflows/main.ymland.github/workflows/deploy.ymlworkflows, consolidating their functionality into a single, clearer workflow. [1] [2].github/workflows/test.yml, which organizes jobs into distinct stages: build and inspect, test, publish to PyPI, and publish to TestPyPI.Build and artifact improvements:
build-and-inspectjob usinghynek/build-and-inspect-python-package@v2to build the package and generate build provenance attestations, enhancing supply chain security.Testing enhancements:
uvfor Python environment management and test execution, improving speed and reproducibility.Publishing improvements:
These changes make the CI/CD process more robust, secure, and maintainable.- Remove pre-commit job from workflow