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

[FEATURE] Automate library release process to GitHub and PyPi #49

Open
2 of 8 tasks
neomatrix369 opened this issue Oct 25, 2020 · 0 comments
Open
2 of 8 tasks

[FEATURE] Automate library release process to GitHub and PyPi #49

neomatrix369 opened this issue Oct 25, 2020 · 0 comments
Labels
2. medium-priority Good if it can be attended to be soon, but not urgent enough enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed Release

Comments

@neomatrix369
Copy link
Owner

neomatrix369 commented Oct 25, 2020

Missing functionality

Currently, the release process (to GitHub and PyPi) is done manually, it's prone to errors, and the two scripts used work best in happy-path use-case scenarios while edge-case even though less to worry about are not taken care of, as well as they could have been.

The release to PyPi should be fail-safe as there is no way to revert if a mistake is made.

Proposed feature

Automate the process and checks and balances:

  • check if the git state is valid, report invalid state and abort step
  • Check if version information is tagged/entered into the CHANGELOG.md
    - if the __version__ is the same, let the user know it needs to be entered before proceeding
    - otherwise, mention the presence and proceed
  • version checking: compare local version stamp with that on git repo (releases/tags) and warn accordingly
    • if the __version__ is the same, let the user know it needs to be incremented before proceeding
    • otherwise mention local version and remote version and proceed with the process
  • version checking: compare local version stamp with that on pypi and warn accordingly
    • if the __version__ is the same, let the user know it needs to be incremented before proceeding
    • otherwise mention local version and remote version and proceed with the process
  • synchronise local and remote repo (part of the scripts)
    - [x] by running GITHUB_TOKEN=$MY_GITHUB_TOKEN ./release-to-github.sh
  • ability to delete release and tag from local and remote with a switch in the script
    - [ ] add to ./release-to-github.sh
  • ask the user when running the pypi release script if they REALLY wish to proceed
    - [ ] when running ./release-to-pypi.sh
  • synchronise local and remote repo after releasing (part of the scripts) (already done when it's run the first time)
    - [x] by running GITHUB_TOKEN=$MY_GITHUB_TOKEN ./release-to-github.sh

Provide tangible steps or CLI commands when suggesting solutions for the above steps. Also, add messages to suggest next steps for the two scripts when it finishes executing.

Alternatives considered

Manual intervention: perform all the above steps manually using the above checklist as the release process is a highly infrequent process.

Also, libraries like bumpversion could be taken into consideration, depending on how useful and flexible they are.

@neomatrix369 neomatrix369 added this to To do in NLP Profiler via automation Oct 25, 2020
@neomatrix369 neomatrix369 added 2. medium-priority Good if it can be attended to be soon, but not urgent enough enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Oct 25, 2020
@neomatrix369 neomatrix369 changed the title [FEATURE] Automate release process [FEATURE] Automate library release process to GitHub and PyPi Oct 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. medium-priority Good if it can be attended to be soon, but not urgent enough enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed Release
Projects
NLP Profiler
  
To do
Development

No branches or pull requests

1 participant