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

Fix for environment setup with PyPI package build action #26

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

d33bs
Copy link
Member

@d33bs d33bs commented Jun 4, 2024

Description

This fixes a bug with the environment setup for PyPI package builds through GitHub actions exhibited here. This was a fault on my part in attempting to reuse code across projects (apologies!).

Thanks for any thoughts from review here!

What kind of change(s) are included?

  • Feature (adds or updates new capabilities)
  • Bug fix (fixes an issue).
  • Enhancement (adds functionality).
  • Breaking change (these changes would cause existing functionality to not work as expected).

Checklist

Please ensure that all boxes are checked before indicating that this pull request is ready for review.

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have searched for existing content to ensure this is not a duplicate.
  • I have performed a self-review of these additions (including spelling, grammar, and related).
  • These changes pass all pre-commit checks.
  • I have added comments to my code to help provide understanding
  • I have added a test which covers the code changes found within this PR
  • I have deleted all non-relevant text in this pull request template.

@d33bs d33bs requested a review from jenna-tomkinson June 4, 2024 14:29
Copy link
Member

@jenna-tomkinson jenna-tomkinson left a comment

Choose a reason for hiding this comment

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

LGTM! For my own understanding, what was the issue/bug?

@d33bs
Copy link
Member Author

d33bs commented Jun 4, 2024

Thanks @jenna-tomkinson !

For my own understanding, what was the issue/bug?

We rely on poetry build to help collect the Python package materials for distribution on PyPI (which requires special organization of the files for installation from that platform). The GitHub Actions workflow associated with this is a container which doesn't know about Python, Poetry, or our package state by default. Thus, in order to use poetry build we need to install Python, Poetry, and our package dependencies (from poetry install) in order for the container to know how to build the package for PyPI. The earlier code which was intended to perform this is a reused block from another project which I recycled but wasn't thorough enough about checking before submitting a PR (bad form on my part, sorry!). We don't yet have the related capabilities from that block of code (and I'm not certain they're necessary yet here). So to fix the bug, I removed this unnecessary / non-existent capability, and added the related installation steps which are needed. These align with other Python and Poetry installation steps which are found for example in https://github.com/WayScience/coSMicQC/blob/main/.github/workflows/run-tests.yml .

@d33bs d33bs merged commit 4d923d5 into WayScience:main Jun 4, 2024
11 checks passed
@d33bs d33bs deleted the fix-pypi-action branch June 4, 2024 15:17
@d33bs d33bs added the release-patch Creates a patch release (e.g. `v0.0.1`) label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-patch Creates a patch release (e.g. `v0.0.1`)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants