hildensia / bayesian_changepoint_detection

Methods to get the probability of a changepoint in a time series.
MIT License
670 stars 213 forks source link

CD automation for deployment to PyPI #35

Closed shahsmit14 closed 2 years ago

shahsmit14 commented 2 years ago

What is this feature about? CD for deploying package to PyPI. It makes use of Github's workflow.

Closes Issues: https://github.com/hildensia/bayesian_changepoint_detection/issues/32

Pre-req for owner @hildensia before merging this :

  1. Create a new API tokens inside your PyPI account where this project lives https://pypi.org/
  2. Creating two Repository secrets inside the github project setting. (Steps defined here) A. Secret name PYPI_USERNAME which value __token__
    B. Secret name PYPI_PROD_PASSWORD with the token value from step #1

How to release a package? Leveraging github release feature This can only be done by project admin/maintainer. @hildensia Right now have made the release to based on manual action. We have to make use the of Releases option shown by github, provide a version tag number and description. If we want to change the release strategy we can update the cd.yml accordingly but usually I have seen projects follow manual release.

What Testing was done? I have tested this pipeline where the package was deployed to my Test PyPI account. https://github.com/zillow/bayesian_changepoint_detection/actions/runs/1966108484

shahsmit14 commented 2 years ago

@hildensia Can you take a look at this MR? Somehow I cannot manually add you to the reviewers list when trying to merge from a fork. Thanks.

sayanchk commented 2 years ago

Just an FYI, we have added a note to manually install bayesian-changepoint-detection as a part of the dev release of Luminaire 0.4.0.dev3 until we resolve this issue.

shahsmit14 commented 2 years ago

@hildensia Can you take a look at this MR? Is there anyone else who can review/merge if you are away?

hildensia commented 2 years ago

Hi,

Sorry for not responding. I am relatively busy at the moment. I am not the owner of the pypi package. Someone else created that. I am looking into creating a new package there and will update this ticket.

Johannes

shahsmit14 commented 2 years ago

New package in PyPI - Will that be manual? Also, will that be under the same package name or you are thinking to create a new one? I dont see a problem with either.

Also, is there an approx ETA?

hildensia commented 2 years ago

Ok, created a new pypi package with the current master under the name bayescd -- https://pypi.org/project/bayescd/

I also added the API token and the repository secrets as requested.

hildensia commented 2 years ago

Created a release. PyPi package was updated. Nice. Thanks for the effort and patience. And sorry again for not responding earlier.

hildensia commented 2 years ago

I am also claiming the original pypi package so we can move back to the old name later on: https://github.com/pypa/pypi-support/issues/1817

hildensia commented 2 years ago

@shahsmit14 You seem dependent on this repository, and as you have seen I don't have the time to immediately respond to issues. Would you or someone else from your team be interested in maintenance rights on this repo?

shahsmit14 commented 2 years ago

Related to claiming the original project - Thats is great. So actual customers dont have to worry about updating imports and stuff. I think even we can wait till that can happen.

shahsmit14 commented 2 years ago

Related to maintenance rights - Sure I'll be happy to help from the engineering side of things. @sayanchk will you be interested to help from the data science side of things?

sayanchk commented 2 years ago

I'll be interested on the maintenance rights since we have a strong dependency through our Luminaire package and it's great to have that flexibility.