Skip to content

Conversation

@stuartp44
Copy link
Collaborator

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:

  • Added .github/workflows/ci.yml to automate linting, testing (across OSes and Python versions), code coverage reporting, and build artifact uploads.
  • Added .github/workflows/release.yml to automate version bumping (with semantic versioning), changelog generation, tagging, and GitHub release creation, supporting both manual and commit-driven release types.
  • Added .github/workflows/publish.yml to automate publishing to PyPI and TestPyPI, with support for manual publishing and on release events.

Versioning and Packaging:

  • Updated pyproject.toml to use semantic versioning (0.17.0), moving away from integer-only versions.
  • Removed redundant pytest entry from the [project.optional-dependencies.dev] section in pyproject.toml, as it is now included via the new workflows.

Copy link

Copilot AI left a 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:
Copy link

Copilot AI Jan 3, 2026

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.

Copilot uses AI. Check for mistakes.
EOF
- name: Create GitHub Release
uses: actions/create-release@v1
Copy link

Copilot AI Jan 3, 2026

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.

Copilot uses AI. Check for mistakes.
Comment on lines +135 to +137
def validate_addr(
cls, values: dict[str, dict | str | int]
) -> dict[str, dict | str | int]:
Copy link

Copilot AI Jan 3, 2026

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.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

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

Comment on lines +146 to +148
def validate_comm_error_ctr(
cls, values: dict[str, dict | str | int]
) -> dict[str, dict | str | int]:
Copy link

Copilot AI Jan 3, 2026

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.

Copilot uses AI. Check for mistakes.
Comment on lines +162 to +164
def validate_ventilation_fields(
cls, values: dict[str, dict | str | int]
) -> dict[str, dict | str | int]:
Copy link

Copilot AI Jan 3, 2026

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.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

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

Comment on lines +268 to +270
def set_optional_enum(
cls, values: dict[str, dict | str | int]
) -> dict[str, dict | str | int]:
Copy link

Copilot AI Jan 3, 2026

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.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

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>
Copy link

Copilot AI commented Jan 3, 2026

@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.

Copy link

Copilot AI commented Jan 3, 2026

@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.

Copy link

Copilot AI commented Jan 3, 2026

@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.

Copy link

Copilot AI commented Jan 3, 2026

@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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants