Skip to content

Conversation

@esparig
Copy link
Member

@esparig esparig commented Oct 13, 2025

Resolves https://github.com/grycap/issue-tracker/issues/107

This pull request modernizes and simplifies the Python package build and release process, aligning it with current Python packaging standards and GitHub Actions best practices. The changes include migrating configuration to pyproject.toml, streamlining the CI/CD workflows for building and publishing releases, and updating documentation and metadata to reflect the new package name and structure.

Build and Release Workflow Modernization:

  • Replaced the legacy release-build.yaml workflow with a new, standards-compliant workflow that builds and publishes the package to PyPI only when a GitHub release is published. The new workflow uses pyproject.toml-based builds, uploads artifacts, and employs trusted publishing to PyPI. (.github/workflows/release-build.yaml)
  • Removed the old release-version.yaml workflow, which previously handled version bumping and release creation, in favor of a simpler, more robust release process. (.github/workflows/release-version.yaml)

Packaging Configuration Updates:

  • Migrated all packaging configuration to a new pyproject.toml file, specifying build system requirements, project metadata, dependencies, and setuptools-scm for automatic versioning from git tags. (pyproject.toml)
  • Simplified setup.py to a minimal stub for backward compatibility, delegating all configuration to pyproject.toml. (setup.py)
  • Removed the now-unnecessary version.py file, as versioning is managed automatically by setuptools-scm. (version.py)

Documentation and CI Improvements:

  • Updated the README.md badges and text to reflect the new package name (oscar-python), correct PyPI links, and display test status instead of the old build workflow. (README.md)
  • Modified the test workflow to also run on the devel branch, improving test coverage for development work. (.github/workflows/tests.yaml)

* Modified versioning and publishing of new releases to Pypi

* Fixed duplicated line
Update pyproject.toml to define packages for setuptools...
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 PR modernizes the Python package build and release process by migrating from legacy setup.py-based configuration to modern pyproject.toml standards and simplifying the CI/CD workflows. The changes align with current Python packaging best practices and implement trusted publishing to PyPI.

Key changes:

  • Migrated packaging configuration from setup.py to pyproject.toml with setuptools-scm for automatic versioning
  • Replaced complex version management workflows with a simple release-triggered build and publish workflow
  • Updated package name from oscar_python to oscar-python and modernized dependency specifications

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pyproject.toml New packaging configuration file with modern Python packaging standards
setup.py Simplified to minimal stub for backward compatibility
version.py Removed in favor of automatic versioning via setuptools-scm
.github/workflows/release-build.yaml Modernized workflow for building and publishing to PyPI on release
.github/workflows/release-version.yaml Removed complex version management workflow
.github/workflows/tests.yaml Extended to run tests on devel branch
README.md Updated badges and package name references

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

* Fix dependencies problem and update tests

* Updated version dependency

* Updated tests action to employ environment dependencies

* Fix development dependencies
@esparig esparig merged commit a8b3375 into main Oct 13, 2025
4 checks passed
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.

3 participants