Surgen is a tool and library to help perform automated upgrades to codebases. It’s goals are:
provide a simple CLI to facilitate upgrading codebases
provide libraries to allow easy authoring of code migration scripts.
Installation
pip install surgen
Usage
Surgen is available as a command line tool, providing the directory containing surgen scripts, and the directory to apply them to:
surgen ./my_upgrade_scripts ./my_target_directory
Both arguments are optional, and default to the ./surgen-scripts directory and the current working directory, respectively.
Surgen Script
A surgen script MUST contain a class that:
extends surgen.Procedure
overrides operate(self)
does NOT override __init__
A surgen script can:
provide a should_run function to determine if the script should run (default true)
Examples of surgen scripts can be found in the examples/ directory.
TODO
backup / restore
Release files for surgen 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| surgen-0.1.0.tar.gz | 8.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| surgen-0.1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 21.6 kB
Release files / surgen-0.1.0.tar.gz
| Download URL | surgen-0.1.0.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb4b2277708e199c8782d1c2da06a8e5df8cd2f08996da67c5f681390a56ebea
|
|
BLAKE2b-256 checksum How to use checksums |
0336f3c06bd538a9b0d5ba79e950102fb49a6f09b58882e75b8baa414346e255
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|
Release files / surgen-0.1.0-py2.py3-none-any.whl
| Download URL | surgen-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 12.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
04888368050286fa715e405ee53e185380646caae476c9315a300bdae9c42253
|
|
BLAKE2b-256 checksum How to use checksums |
a54d8e78f35aa045bc99a3b1f3fc44b3062610ed29d580b36d36d8236f91d40e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|