Skip to content

update python deployment github action#11

Merged
gauravharsha merged 10 commits intomainfrom
pypi-restrict
Mar 11, 2026
Merged

update python deployment github action#11
gauravharsha merged 10 commits intomainfrom
pypi-restrict

Conversation

@gauravharsha
Copy link
Contributor

Serves two important purposes:

  1. A new PyPI package can only be deployed when we trigger a new version of GREEN-MBPT. This ensures consistency of version tags.
  2. To successfully accomplish a new PyPI deployment, the version.py and __grids_version__ attribute in the grid files should be upgraded automatically (if not already correct). This action does that before deploying the package.

… green-mbpt, 2) automatically update the version.py and h5py attributes before deployment
@gauravharsha gauravharsha requested a review from Copilot March 9, 2026 22:00
Copy link
Contributor

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 updates the Python deployment GitHub Action to restrict PyPI deployments to only be triggered via repository_dispatch from the green-mbpt repository (when a new tag is created), rather than allowing direct pushes or manual triggers. It also adds automatic version bumping of version.py and HDF5 file __grids_version__ attributes before publishing.

Changes:

  • Replaced push/pull_request/workflow_dispatch triggers with a repository_dispatch trigger (version-update type)
  • Added an update-and-deploy job that updates version.py and HDF5 grid file version attributes, commits/pushes changes, and creates/pushes a matching tag
  • Updated downstream jobs (build_sdist, publish) to depend on update-and-deploy and use the dispatched tag as the checkout ref

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov-commenter
Copy link

codecov-commenter commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.16%. Comparing base (1675406) to head (a0d9e06).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #11      +/-   ##
==========================================
+ Coverage   96.43%   97.16%   +0.72%     
==========================================
  Files          19       27       +8     
  Lines        1292     1658     +366     
  Branches       60       60              
==========================================
+ Hits         1246     1611     +365     
- Misses         27       28       +1     
  Partials       19       19              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@egull egull left a comment

Choose a reason for hiding this comment

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

Im really not an expert on this... seems to make sense but I don't feel qualified :)

@gauravharsha
Copy link
Contributor Author

Tested a dry run; waiting for python application test before merging. Then we can release 0.3.3 from green-mbpt

@gauravharsha gauravharsha merged commit e93e2ca into main Mar 11, 2026
5 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.

4 participants