Skip to content

Packaging: Use of pyproject.toml and move to minimal setup.py for modernization #123

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

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

fmalatino
Copy link
Contributor

@fmalatino fmalatino commented May 20, 2025

Description
This PR moves the metadata and configuration for the package to a pyproject.toml file, as is prescribed by Deprecate legacy setup.py develop mechanism for pip install --editable #11457. The previous setup.py file is now minimal.

Fixes # (118)
This PR also addresses Issue 118

How Has This Been Tested?
Tested using the current CI suite.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included

@fmalatino fmalatino requested review from oelbert, bensonr, abrooks1085 and jjuyeonkim and removed request for abrooks1085 and jjuyeonkim May 20, 2025 20:09
@fmalatino fmalatino marked this pull request as draft May 21, 2025 20:00
pyproject.toml Outdated
dependencies = [
"ndsl @ git+https://github.com/NOAA-GFDL/NDSL.git@develop",
"pyFV3 @ git+https://github.com/NOAA-GFDL/PyFV3.git@develop",
"pySHiELD @ git+https://github.com/NOAA-GFDL/PySHiELD.git@develop",
Copy link
Collaborator

Choose a reason for hiding this comment

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

So the issue with that is we can't control for release anymore. When you pull the package you get develop, which is risky but ok if you are on the develop branch of Pace (you agree to be on the "expected stable" branch, with the caveat).

But when you release Pace you want hard encoded versions. Is the plan to change those path to a release tag when making a release with Pace?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Definitely need a broader discussion on this, but I think moving forward we will have release branches that will point to the most recent release for each dependency, while the develop branch will point to the develop branches. I will be pushing a minor change shortly that will amend the current CI.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not a bad strategy, it would made the "release" commit pretty clear and allow "released" codebase to also be moved onto develop or other branch after the fact, which is a nice perk.

There's probably something out there that automatize this process, though it's simple enough it can be documented up (so you and I aren't the only ones knowing how to release!).

@fmalatino fmalatino marked this pull request as ready for review May 22, 2025 15:33
oelbert
oelbert previously approved these changes May 23, 2025
Copy link
Collaborator

@oelbert oelbert left a comment

Choose a reason for hiding this comment

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

nice nice

Copy link
Collaborator

@oelbert oelbert left a comment

Choose a reason for hiding this comment

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

lgtm

@fmalatino fmalatino marked this pull request as draft June 13, 2025 14:26
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