From 0ff822794f8b8325adf88c0a051129175b0d8801 Mon Sep 17 00:00:00 2001 From: Jason Paulos Date: Thu, 19 Jan 2023 11:05:57 -0800 Subject: [PATCH] v0.21.0 (#637) --- CHANGELOG.md | 18 +++++++--- docs/requirements.txt | 2 +- release-process.md | 81 +++++++++++++++++++++++++++++++++++++++++++ setup.py | 2 +- 4 files changed, 97 insertions(+), 6 deletions(-) create mode 100644 release-process.md diff --git a/CHANGELOG.md b/CHANGELOG.md index d4080dcfa..da02f72df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,24 @@ # Unreleased -# Added +## Added + +## Changed + +## Fixed + +# v0.21.0 + +## Added * Added frame pointer support for subroutine arguments, replacing the previous usage of scratch. ([#562](https://github.com/algorand/pyteal/pull/562)) * Added frame pointer support for local ABI variables in subroutine. ([#606](https://github.com/algorand/pyteal/pull/606)) -* Added `frame_pointers` property in `OptimizeOptions` to optimize away scratch slots during subroutine calls. This defaults to frame pointer usage when not specified. ([#613](https://github.com/algorand/pyteal/pull/613)) +* Added `frame_pointers` property in `OptimizeOptions` to optimize away scratch slots during subroutine calls. This defaults to frame pointer usage when not specified for AVM version 8+. ([#613](https://github.com/algorand/pyteal/pull/613)) -# Fixed +## Fixed * Allowing the `MethodCall` and `ExecuteMethodCall` to be passed `None` as app_id argument in the case of an app create transaction ([#592](https://github.com/algorand/pyteal/pull/592)) +* No longer accidentally include additional package folders in release ([#610](https://github.com/algorand/pyteal/pull/610), [#614](https://github.com/algorand/pyteal/pull/614)) +* Fixed mistakes in docs ([#612](https://github.com/algorand/pyteal/pull/612), [#625](https://github.com/algorand/pyteal/pull/625), [#627](https://github.com/algorand/pyteal/pull/627)) -# Changed +## Changed * Introducing `AbstractVar` to abstract value access: store, load, and stack type. ([#584](https://github.com/algorand/pyteal/pull/584)) * NOTE: a backwards incompatable change was imposed in this PR: previous ABI value's public member `stored_value` with type `ScratchVar`, is now changed to protected member `_stored_value` with type `AbstractVar`. * Starting with program version 9, when `scratch_slots` flag isn't provided to `OptimizeOptions`, default to optimizing. For versions 8 and earlier the default is and remains to _not_ optimize. ([#613](https://github.com/algorand/pyteal/pull/613)) diff --git a/docs/requirements.txt b/docs/requirements.txt index a82bbf8a5..94121dd46 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,6 +1,6 @@ sphinx==5.1.1 sphinx-rtd-theme==1.0.0 # dependencies from setup.py -py-algorand-sdk>=1.9.0,<2.0.0 +py-algorand-sdk>=2.0.0,<3.0.0 semantic-version>=2.9.0,<3.0.0 docstring-parser==0.14.1 diff --git a/release-process.md b/release-process.md new file mode 100644 index 000000000..018dcc1ad --- /dev/null +++ b/release-process.md @@ -0,0 +1,81 @@ +# PyTeal Release Process + +This document contains information about how to issue a new PyTeal release. + +## Release Steps + +### 1. Prep files in repo + +In addition to the code changes that make up the release, a few files must be updated for each release we make. + +Usually, both of these changes will happen in a "release PR." For example: https://github.com/algorand/pyteal/pull/637 + +#### a. Update `CHANGELOG.md` + +The first section in `CHANGELOG.md` should be `Unreleased`. Ideally this section would be populated with all the changes since the last release and would have been updated with every PR. However, it's possible that some PRs may have forgotten to update the changelog. You should look at all the commits since the last release to see if anything that should be mentioned in the changelog is missing. If so, add it now. + +Not _every_ PR needs to be reflected in the changelog. As a general rule, if and only if the PR makes a change that's visible to consumers of the PyTeal library (including documentation), then it should be included in the changelog. Changes to tests or development tools that do not affect library consumers should generally not be reported. + +Once the `Unreleased` section is complete, change it to the version you are about to release, e.g. `v0.21.0`. If any subsections are empty, remove them. + +At this point, add a new placeholder to the top of the file for future changelog additions, like so: + +``` +# Unreleased + +## Added + +## Changed + +## Fixed +``` + +#### b. Bump version in `setup.py` + +Update the `setup.py` file to contain the version you wish to release. For example: + +```diff +--- a/setup.py ++++ b/setup.py +@@ -7,7 +7,7 @@ + + setuptools.setup( + name="pyteal", +- version="0.20.1", ++ version="0.21.0", + author="Algorand", + author_email="pypiservice@algorand.com", + description="Algorand Smart Contracts in Python", +``` + +### 2. Create a GitHub release & tag + +Once the changes from step 1 have been committed to the repo, it's time to issue the release. + +Navigate to GitHub's "Draft a new release" page: https://github.com/algorand/pyteal/releases/new. Fill out the fields like so: +* Tag: create a new tag with the version you're about to release, e.g. `v0.21.0` +* Title: the version you're about to release. This should be the same as the tag. +* Description: copy and paste the release notes from `CHANGELOG.md`. Do not include the section header with the release version, since it's redundant. + +Press "Publish release" to submit. This was create a new git tag, which triggers a GitHub Actions job of ours to build and upload a release to PyPI. + +### 3. Check outputs to ensure success + +After you've kicked off a release as described in the previous section, you should monitor the process to ensure everything succeeds. Unfortunately we don't have any notifications if the release process fails, so it's important to perform these manual checks. + +#### a. Ensure GitHub Actions job succeeds + +Visit https://github.com/algorand/pyteal/actions to find the GitHub Actions job that's running the release. Open it and ensure it succeeds. + +#### b. Check that PyPI receives the release + +Visit https://pypi.org/project/pyteal/ to check that the latest release is listed in PyPI. + +#### c. Ensure docs are updated + +Issuing a git tag also triggers ReadTheDocs to generate new documentation. + +Visit https://readthedocs.org/projects/pyteal/builds/ to ensure that the docs build for the release succeeds. + +Then, visit https://pyteal.readthedocs.io/ to ensure that the latest release is present on our docs site. In the bottom left corner, there's a button that will display the current version of the docs, e.g. `v: stable`. Click this to see all versions that are available. Ensure that the just released version is there, and click it to bring up that specific version's docs. Manually inspect the site to ensure documentation was generated successfully. + diff --git a/setup.py b/setup.py index aa5c4e1ef..0ee2f5bc4 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setuptools.setup( name="pyteal", - version="0.20.1", + version="0.21.0", author="Algorand", author_email="pypiservice@algorand.com", description="Algorand Smart Contracts in Python",