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

add package build and upload to pypi for releases into ci/cd setup #71

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

leifdenby
Copy link
Member

@leifdenby leifdenby commented Aug 20, 2024

Describe your changes

Add ci/cd setup to build and upload releases created on github automatically to pypi.org

This would allow people to install releases of neural_lam directly with pip from pypi.org, i.e. to install releases of neural_lam with:

python -m pip install neural_lam

I could also include a note in the README about being able to install releases of neural-lam from pypi, but I haven't yet.

The change requires a pypi.org API key be added to the repository secrets (you can see its use here: https://github.com/mllam/neural-lam/pull/71/files#diff-8edc26411310cfa4356b22a2f31845a08e57cb9f418b3b802f0366a2630af992R22). I have create an API token under my pypi.org user, but I will transfer this to a group on pypi.org when the first package has been uploaded, and people can then join that group on pypi.org.

Issue Link

There is no issue to link to. We haven't discussed this before I don't think. But I thought it might make sense and be convenient since with #37 and #32 it is now possible to install neural-lam as a package.

Type of change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📖 Documentation (Addition or improvements to documentation)

Checklist before requesting a review

  • My branch is up-to-date with the target branch - if not update your fork with the changes from the target branch (use pull with --rebase option if possible).
  • I have performed a self-review of my code
  • For any new/modified functions/classes I have added docstrings that clearly describe its purpose, expected inputs and returned values
  • I have placed in-line comments to clarify the intent of any hard-to-understand passages of my code
  • I have updated the README to cover introduced code changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have given the PR a name that clearly describes the change, written in imperative form (context).
  • I have requested a reviewer and an assignee (assignee is responsible for merging)

Checklist for reviewers

Each PR comes with its own improvements and flaws. The reviewer should check the following:

  • the code is readable
  • the code is well tested
  • the code is documented (including return types and parameters)
  • the code is easy to maintain

Author checklist after completed review

  • I have added a line to the CHANGELOG describing this change, in a section
    reflecting type of change (add section where missing):
    • added: when you have added new functionality
    • changed: when default behaviour of the code has been changed
    • fixes: when your contribution fixes a bug

Checklist for assignee

  • PR is up to date with the base branch
  • the tests pass
  • author has added an entry to the changelog (and designated the change as added, changed or fixed)
  • Once the PR is ready to be merged, squash commits and merge the PR.

@leifdenby
Copy link
Member Author

This is just a suggestion btw. We don't have to include this in release v0.2.0, I just thought it might be nice since we have everything in place now to make it possible :)

@leifdenby leifdenby changed the title add package build and upload to pypi in cicd add package build and upload to pypi for releases into ci/cd setup Aug 20, 2024
@joeloskarsson
Copy link
Collaborator

I think this is great, and I agree that we should put neural-lam on pypi.

Perhaps it would make most sense to do this for the v0.3.0 release? The logic being that at the moment there are still things that are MEPS (region/data) specific, which does not really make sense in a general package that you install from pypi. In that way it is better to make sure all users end up in this repo and read about these limitations before installing.

I see v0.3.0 as the step to a completely general setup, and then it makes sense to put up the package with it.

@leifdenby leifdenby added this to the v0.3.0 milestone Aug 23, 2024
@joeloskarsson joeloskarsson removed this from the v0.3.0 milestone Nov 20, 2024
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.

2 participants