-
Notifications
You must be signed in to change notification settings - Fork 1
Add CI, publish, and release workflows; update version in pyproject.toml #8
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request introduces comprehensive CI/CD automation for the ducopy project, including continuous integration testing, automated releases with semantic versioning, and PyPI publishing workflows. The PR also updates the project version from the integer-based "17" to semantic versioning "0.17.0" and applies consistent code formatting across Python files.
- Adds GitHub Actions workflows for CI (linting, testing across platforms/Python versions), automated releases (with conventional commits support), and PyPI publishing
- Updates project version to semantic versioning format (0.17.0)
- Applies Black code formatting to improve readability (multi-line function signatures, imports)
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/ci.yml | CI workflow for linting with Ruff/Black, testing across OS/Python versions with coverage reporting, and build verification |
| .github/workflows/release.yml | Release automation with version bumping based on conventional commits or manual selection, changelog generation, and GitHub release creation |
| .github/workflows/publish.yml | PyPI and TestPyPI publishing workflow triggered on releases or manual dispatch |
| pyproject.toml | Version updated to semantic versioning (0.17.0) and removed redundant pytest dependency from dev section |
| tests/test_restapi.py | Reformatted imports and multi-line assertions for better readability |
| tests/test_client.py | Reformatted function signatures and instantiations to follow Black style |
| tests/test_apikeygenerator.py | Reformatted function call to multi-line format |
| src/ducopy/rest/utils.py | Reformatted function signatures and conditional statements across multiple methods |
| src/ducopy/rest/models.py | Reformatted validator methods and field lists for improved readability |
| src/ducopy/rest/client.py | Reformatted method signatures, logging calls, and error messages throughout the file |
| src/ducopy/rest/apikeygenerator.py | Reformatted multi-line string literal and function calls |
| src/ducopy/ducopy.py | Reformatted function signatures and removed trailing whitespace |
| src/ducopy/cli.py | Reformatted Typer option annotations and simplified multi-line expressions |
| src/ducopy/init.py | Changed import style from noqa comments to explicit re-exports using 'as' syntax |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| bump_type = 'patch' # Default to patch | ||
| print(f"Detected bump type: {bump_type}") | ||
| with open(os.environ['GITHUB_OUTPUT'], 'a') as f: |
Copilot
AI
Jan 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'os' module is used on line 106 but is not imported. This will cause a NameError when the 'auto' release type is selected. Add 'import os' at the beginning of the Python script block.
| EOF | ||
| - name: Create GitHub Release | ||
| uses: actions/create-release@v1 |
Copilot
AI
Jan 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The action 'actions/create-release@v1' is deprecated and will stop working in the future. Consider migrating to 'softprops/action-gh-release@v1' or using the GitHub CLI directly. The deprecated action may fail or be removed by GitHub.
| def validate_addr( | ||
| cls, values: dict[str, dict | str | int] | ||
| ) -> dict[str, dict | str | int]: |
Copilot
AI
Jan 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normal methods should have 'self', rather than 'cls', as their first parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback
| def validate_comm_error_ctr( | ||
| cls, values: dict[str, dict | str | int] | ||
| ) -> dict[str, dict | str | int]: |
Copilot
AI
Jan 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normal methods should have 'self', rather than 'cls', as their first parameter.
| def validate_ventilation_fields( | ||
| cls, values: dict[str, dict | str | int] | ||
| ) -> dict[str, dict | str | int]: |
Copilot
AI
Jan 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normal methods should have 'self', rather than 'cls', as their first parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback
| def set_optional_enum( | ||
| cls, values: dict[str, dict | str | int] | ||
| ) -> dict[str, dict | str | int]: |
Copilot
AI
Jan 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normal methods should have 'self', rather than 'cls', as their first parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@stuartp44 I've opened a new pull request, #9, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@stuartp44 I've opened a new pull request, #10, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@stuartp44 I've opened a new pull request, #11, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@stuartp44 I've opened a new pull request, #12, to work on those changes. Once the pull request is ready, I'll request review from you. |
This pull request introduces a comprehensive CI/CD pipeline for the project, adds semantic versioning, and improves release automation. The most important changes include new GitHub Actions workflows for CI, release, and publishing to PyPI, as well as a switch to semantic versioning in
pyproject.toml.CI/CD Automation and Workflows:
.github/workflows/ci.ymlto automate linting, testing (across OSes and Python versions), code coverage reporting, and build artifact uploads..github/workflows/release.ymlto automate version bumping (with semantic versioning), changelog generation, tagging, and GitHub release creation, supporting both manual and commit-driven release types..github/workflows/publish.ymlto automate publishing to PyPI and TestPyPI, with support for manual publishing and on release events.Versioning and Packaging:
pyproject.tomlto use semantic versioning (0.17.0), moving away from integer-only versions.pytestentry from the[project.optional-dependencies.dev]section inpyproject.toml, as it is now included via the new workflows.