Skip to content

Commit

Permalink
Add docs for cutting a release and upgrading python (#667)
Browse files Browse the repository at this point in the history
* Added python update tutorial and release tutorial

* Adding links
  • Loading branch information
KennethSkylight authored and nickbristow committed Jul 17, 2023
1 parent e4953c7 commit fd81feb
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
34 changes: 34 additions & 0 deletions tutorials/python-update-tutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Python Upgrade Process

The python upgrade process involves updating the python version in multiple places to ensure that the build runs correctly.

## pyproject.toml
Upgrading pyproject.toml is straightforward, update the python version number to your specified version.

## test.yaml
For the test.yaml, update the `TEST_RUNNER_PYTHON_VERSION` to your new python version

## Changing requirements.txt
To upgrade python, understanding the current state of the repo is key. Currently as of June 2023, phdi is self-referential because the `requirements.txt` in the contianers/* folder points to the actual phdi pypi project itself. Therefore, when upgrading python, you have to point the requirements.txt to the current branch that has the new version of python. For example, if your branch is named `upgradepython3x`, then your requirements.txt file will have an entry named `phdi @ git+https://github.com/CDCgov/phdi@upgradepython3x`

Once you push these changes into GitHub, you must change the `requirements.txt` file to point to main. Therefore it will be `phdi @ git+https://github.com/CDCgov/phdi@main`

The files that need to be changed are
- containers/alerts/requirements.txt
- containers/ingestion/requirements.txt
- containers/message-parser/requirements.txt
- containers/record-linkage/requirements.txt
- containers/tabulation/requirements.txt
- containers/validation/requirements.txt

## Changing Docker
For each of the Docker files, update the FROM python to your desire version number. Check the Docker website to ensure that the desired version number is supported.

The Docker files that need to be changed are

- containers/alerts/DockerFile
- containers/ingestion/DockerFile
- containers/message-parser/DockerFile
- containers/record-linkage/DockerFile
- containers/tabulation/DockerFile
- containers/validation/DockerFile
17 changes: 17 additions & 0 deletions tutorials/release-tutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Tutorials: Release Tutorial
This doc will guide you through the release process and the approvals and steps necessary to create a new release and push it into our [pypi](https://pypi.org/project/phdi/) phdi library.


## Cutting a new release

Cutting a new release is a straightforward process. Make sure to check if the team wants any last changes to make it to the release or have any reservations about creating a new release.

1. Let the team know you're about to cut a release.
2. Create a new branch off of main, the name does not matter.
3. In the `phdi/__init__.py` file, update your version number.
4. In the `pyproject.toml`, update your version number.
5. In the GitHub repository, create a new pull request. The pull request name must have `[RELEASE]` as the beginning of the title.
6. Request for a team member to approve the PR.
7. Click the green "Merge" button (it may be "Squash and Merge")

After the merging is complete and the github workflow is finished, you can observe your new python release on the pypi phdi library site

0 comments on commit fd81feb

Please sign in to comment.