Skip to content

Commit

Permalink
Add support for upgrading to 2.6 (#24)
Browse files Browse the repository at this point in the history
* Recommend pipx or virtualenv installation

* Add 2.6 as a no-op upgrade
  • Loading branch information
chriskuehl authored Feb 29, 2024
1 parent 3615291 commit c85c8bf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
This tool will help you make the changes necessary to upgrade your Baseplate.py
service from one version to another.

Install the upgrader on your development machine (outside any VMs, since this
will be editing source code):
The easiest way to use this tool is through `pipx` (`brew install pipx` on
macOS):

pip3.7 install git+https://github.com/reddit/baseplate.py-upgrader
pipx run --spec git+https://github.com/reddit/baseplate.py-upgrader baseplate.py-upgrader ~/src/fooservice

and then run it on a baseplate.py project you want to upgrade:
You can also create a virtualenv and install it manually:

baseplate.py-upgrader ~/src/fooservice
python3.12 -m venv venv
venv/bin/pip install git+https://github.com/reddit/baseplate.py-upgrader
venv/bin/baseplate.py-upgrader ~/src/fooservice
12 changes: 7 additions & 5 deletions baseplate_py_upgrader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ def no_op_upgrade(
"1.3": "1.4",
"1.4": "1.5",
"1.5": "2.0",
"2.0": "2.5",
"2.1": "2.5",
"2.2": "2.5",
"2.3": "2.5",
"2.4": "2.5",
"2.0": "2.6",
"2.1": "2.6",
"2.2": "2.6",
"2.3": "2.6",
"2.4": "2.6",
"2.5": "2.6",
}

# this is useful if we're dealing with pre-releases temporarily
Expand All @@ -75,6 +76,7 @@ def no_op_upgrade(
"2.3": no_op_upgrade,
"2.4": no_op_upgrade,
"2.5": no_op_upgrade,
"2.6": no_op_upgrade,
}


Expand Down

0 comments on commit c85c8bf

Please sign in to comment.