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

Publish package #277

Merged
merged 58 commits into from
Nov 17, 2023
Merged

Publish package #277

merged 58 commits into from
Nov 17, 2023

Conversation

zain-sohail
Copy link
Member

@zain-sohail zain-sohail commented Nov 17, 2023

Now we have the capability of prereleasing to pypi whenever we push to main. And releasing when we push a tag.
The release version can be arbitrarily set by the person who releases (by defining the tag).
The package is distributed as sed-processor and can be found on https://pypi.org/project/sed-processor/

There are four steps to what the workflow does:

  • Workflow runs prerelease job on every push to main branch and a release job on every tag push.
  • A publish to pypi job is executed on every successful prerelease or release job
  • And if publish is successful, the version is also updated in the pyproject.toml file and pushed to main branch (so we are always upto date)
    • By default, a workflow run that is triggered by a push event will not trigger another push event when it pushes changes to the repository so we don't have worries for recursive runs.

Necessary changes to be made before merging:

  • change workflow to make this run on main
  • let other workflows run before merging
  • fix environment to allow main

closes #266

Changes made:

  • docs dependencies now have a seperate section in toml file. This way they are not packaged for users (only developers need to generate docs), just like dev-dependencies aren't packaged
  • updated license for current year
  • fixed shields
  • updated name of documentation workflow so we can get a nice shield
  • updated readme
  • changed documentation structure to allow readme and tutorials first

Improvements possible:

  • simplify workflow with the sed-processor paths (but not sure how possible that is)
  • further enhance the maintain file
  • add the hextof tutorial in documentation

@zain-sohail zain-sohail self-assigned this Nov 17, 2023
@zain-sohail zain-sohail added documentation Improvements or additions to documentation core request for a core functionality labels Nov 17, 2023
@zain-sohail zain-sohail added this to the Deployment Readiness milestone Nov 17, 2023
@coveralls
Copy link
Collaborator

coveralls commented Nov 17, 2023

Pull Request Test Coverage Report for Build 6905159534

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.05%) to 89.939%

Files with Coverage Reduction New Missed Lines %
sed/binning/numba_bin.py 3 87.74%
Totals Coverage Status
Change from base Build 6890295349: -0.05%
Covered Lines: 5006
Relevant Lines: 5566

💛 - Coveralls

@steinnymir
Copy link
Member

steinnymir commented Nov 17, 2023

This looks great!
Do I understand correctly, that a patch vesrsion is automatically updated when we merge a PR to main?

For example, now we are at 0.1.4. Will the next merge bump us to 0.1.5? or how do pre-release versions look like?

And for releases, we should instead change the minor or even major, i.e. 0.1.4 -> 0.2.0?

@zain-sohail
Copy link
Member Author

This looks great! Do I understand correctly, that a patch vesrsion is automatically updated when we merge a PR to main?

For example, now we are at 0.1.4. Will the next merge bump us to 0.1.5? or how do pre-release versions look like?

prerelease are great because users don't get to install them unless they explicitly say. They look like this:
https://pypi.org/project/sed-processor/#history
so 0.1.4 -> 0.1.5a0 -> 0.1.5a1
and then when we feel ready to make a minor or patch release, we can do so manually.
by saying
git tag v0.1.5
git push origin v0.1.5

which would make it: 0.1.5a1 -> 0.1.5

From semantic versioning

MAJOR version when you make incompatible API changes
MINOR version when you add functionality in a backward compatible manner
PATCH version when you make backward compatible bug fixes

Instead of prereleasing, we can also patch everytime, but I think it's better to do it manually just because if things get broken in the automated pipeline, at least we don't have a release.

And for releases, we should instead change the minor or even major, i.e. 0.1.4 -> 0.2.0?
yess. we probably want to do 1.0.0 when all the important PRs are merged.

Copy link
Member

@steinnymir steinnymir left a comment

Choose a reason for hiding this comment

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

This looks good! I'll test installing it from pypi now, and approve if this works!

pyproject.toml Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
@steinnymir
Copy link
Member

so 0.1.4 -> 0.1.5a0 -> 0.1.5a1

perfect! this I love this!

And yes, I think once most of the current open PRs are merged we can bump to 1.0.0!

@rettigl
Copy link
Member

rettigl commented Nov 17, 2023

This looks great, yes!
There is now the email address [email protected], which for the moment links to my email, but the idea is to get an email list for this. So I suggest to use if for publishing as disussed in #183.

@rettigl
Copy link
Member

rettigl commented Nov 17, 2023

We can make the pipy badge link to the pipy page.

Copy link
Member

@steinnymir steinnymir left a comment

Choose a reason for hiding this comment

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

It worked, I got it installed on maxwell with python 3.10 by simply creating a conda environment, and running pip install sed-processor.

The only problem is we have really a LOT of dependencies!

LGTM!

@zain-sohail
Copy link
Member Author

It worked, I got it installed on maxwell with python 3.10 by simply creating a conda environment, and running pip install sed-processor.

The only problem is we have really a LOT of dependencies!

Yes, I also noticed it and we really should see if we can remove some.

@zain-sohail zain-sohail merged commit c2ddae9 into main Nov 17, 2023
5 checks passed
@zain-sohail zain-sohail deleted the publish-pypi branch November 17, 2023 15:04
@rettigl
Copy link
Member

rettigl commented Nov 17, 2023

Yes, I also noticed it and we really should see if we can remove some.

A lot of them come from pynxtools...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core request for a core functionality documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Push first version to PyPi
4 participants