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 scripts for building packages and publishing them to PyPi #1915

Merged
merged 4 commits into from
Sep 14, 2023

Conversation

AdeelH
Copy link
Collaborator

@AdeelH AdeelH commented Sep 8, 2023

Overview

This PR adds scripts to build and publish packages to PyPi, thus automating a manual and tedious part of the release process. It also updates the release instructions accordingly.

This PR is a step towards #1130.

Checklist

  • Added needs-backport label if PR is bug fix that applies to previous minor release
  • Ran scripts/format_code and committed any changes
  • Documentation updated if needed
  • PR has a name that won't get you publicly shamed for vagueness

Testing Instructions

  • These scripts were used to publish v0.21.1.
  • Check release process doc in CI docs build.

@AdeelH AdeelH added the needs-backport This PR needs to be backported to release branches label Sep 8, 2023
@AdeelH AdeelH changed the title Add scripts for building and publishing packages to PyPi Add scripts for building packages and publishing them to PyPi Sep 8, 2023
@AdeelH AdeelH force-pushed the automate_pypi_publish branch from 0d96cf7 to 490a3a6 Compare September 8, 2023 15:07
@AdeelH AdeelH requested a review from jamesmcclain September 8, 2023 15:09
@jamesmcclain
Copy link
Contributor

@AdeelH 👀

Copy link
Contributor

@jamesmcclain jamesmcclain left a comment

Choose a reason for hiding this comment

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

Assuming the test publication works as expected, this looks good to me.

@@ -0,0 +1,27 @@
#!/bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see anything that looks obviously wrong to me ... if the test publication works as expected, than it should be good.

for plugin in "${plugins[@]}"; do
publish_plugin "$plugin"
done

Copy link
Contributor

Choose a reason for hiding this comment

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

The only thing that I might suggest -- from a belt-and-suspenders point of view -- is to force a test publication before a real one. If the person says passes --test then it will terminate after the test publication, if they do not then it will publish to testpypi then prompt them to inspect the published artifacts before proceeding with the real publication.

Copy link
Collaborator Author

@AdeelH AdeelH Sep 14, 2023

Choose a reason for hiding this comment

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

To keep things simple, I've made it so that

  • --test works as before
  • With no --test, you have to go through an Actually publish to PyPi? (y/N) prompt
  • -y bypasses the prompt (for when/if we choose to fully automate things)

@AdeelH AdeelH force-pushed the automate_pypi_publish branch from dd9123e to e53b464 Compare September 14, 2023 19:24
@AdeelH AdeelH merged commit a8b4bff into azavea:master Sep 14, 2023
@AdeelH AdeelH deleted the automate_pypi_publish branch September 14, 2023 19:42
AdeelH added a commit to AdeelH/raster-vision that referenced this pull request Sep 22, 2023
…#1915)

* add pypi_build and pypi_publish scripts

* update release instructions

---------

Co-authored-by: Adeel Hassan <ahassan@element84.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-backport This PR needs to be backported to release branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants