Skip to content
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

PyPI Package Release Steps Edits #3248

Merged
merged 3 commits into from
Feb 5, 2024

Conversation

SorenSpicknall
Copy link
Contributor

Description

Adds pyproject.toml edits as a valid precursor to PyPI package releases, and updates associated documentation to mention that requirements list updates should prompt a release.

Resolves #3219

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

How has this been tested?

Workflow tested on simulated repo, and docs changes linted successfully.

Post-merge follow-ups

  • No action required
  • Actions required (specified below)

@amandaha8
Copy link
Contributor

Could you add more context? I'm very new to do this so I don't grasp how does this change the process of updating the calitp-data-analysis package?

@SorenSpicknall
Copy link
Contributor Author

SorenSpicknall commented Jan 26, 2024

Could you add more context? I'm very new to do this so I don't grasp how does this change the process of updating the calitp-data-analysis package?

Of course!

The pyproject.toml file in each packages/[package-name] subfolder is used to manage the associated Python package's list of dependencies and some of its publication information, like the version number, author list, and description.

Before now, the GitHub Actions automations that run to detect changes to a package and publish those changes looked inside the packages/[package-name]/[package-name] subfolder, which is one level deeper than where the pyproject.toml files are stored. That's because the code for the package lives in that deeper-level folder. However, that means if somebody made a change to, say, the listed author of a package or the list of dependencies in pyproject.toml, our CI/CD GitHub Actions workflows would not know that the change was made and wouldn't push those changes to PyPI.

The two added lines in the build-[package-name].yml files add the associated pyproject.toml files for each package to the list of files for which a change kicks off a new package publication script run, so that if somebody changes the dependencies for one of these packages, or its metadata (author, description, etc.), it will prompt publication.

@amandaha8
Copy link
Contributor

That's really neat. So does this change any steps in the process of updating calitp-data-analysis in the data-infra repo? If so, which steps are altered? https://docs.calitp.org/data-infra/analytics_tools/python_libraries.html#updating-calitp-data-analysis

@SorenSpicknall
Copy link
Contributor Author

That's really neat. So does this change any steps in the process of updating calitp-data-analysis in the data-infra repo? If so, which steps are altered? https://docs.calitp.org/data-infra/analytics_tools/python_libraries.html#updating-calitp-data-analysis

Great flag! It doesn't change any process steps, but I added a little extra text in 1e460d5 to point people in the right direction if they're trying to make a metadata-only change to the package.

Copy link

@amandaha8
Copy link
Contributor

Hi @SorenSpicknall you can merge it in! Sorry I missed this last week.

Copy link
Member

@charlie-costanzo charlie-costanzo left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for taking care of this

@SorenSpicknall SorenSpicknall merged commit d453565 into main Feb 5, 2024
4 checks passed
@SorenSpicknall SorenSpicknall deleted the soren-small_packages_docs_edits branch February 5, 2024 18:39
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.

Add pyproject.toml Files to Valid Precursors of PyPI Package Publication
3 participants