Amend: Ensure your values are right
Project description
Amend
Ensure your values are right
Motivation
Often times I write a lot of boilerplate code to validate and correct certain values. I have decided to create a package to stop doing it for some of the things I use. The goals of this package:
- perform routine type validation and correction (amend!)
- do not rely on third-party libraries
- if it's outside standard Python, amends should be handled by package maintainers
- do not overcomplicate things
- what can easily be done with a processing pipeline should be done with a processing pipeline
Using this, hopefully, writing argument parsers and ensuring correctness in functionality should be slightly easier, while forcing people to explicitly handle more elaborate and specific use cases.
Installation
You can install this with pip:
pip install amend
Alternatively, you can install this from source:
git clone git@github.com:suflaj/amend.git
cd amend
pip install .
Running tests
Amend uses your run-of-the-mill unittest. Therefore, to test the whole package, you can simply do:
python3 -m unittest amend.testing
If you wish to test some specific module you can reference the testing module with unittest. For example, if you want to unit test built-in amendments, do:
python3 -m unittest amend.testing.unit.built_in
For more info on how to use unittest, look here.
Things to do
This package is in beta. For it to reach a full release it will need to receive:
- ReadTheDocs documentations
- usage examples
- some actual usage (will start to substitute my boilerplate for it)
Currently, it wasn't battle tested. I put in some effort to write it well, but not necessarily optimally. However, even though I do not recommend you use this for production, you can use it for many things, and presumably it should work. If it doesn't, create an issue. The format doesn't really matter currently.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file amend-0.3.1.tar.gz.
File metadata
- Download URL: amend-0.3.1.tar.gz
- Upload date:
- Size: 31.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9138dcfc727aae2d96f7ddbb5b35242c6152b929775b8dc3f9fbd264f0d766a1
|
|
| MD5 |
7a9079b5163492895af33369207b5137
|
|
| BLAKE2b-256 |
9ae116a6d96f0373ba525be9200bf67eaa2ee6f59788a625c6b9e82bc3753af2
|
File details
Details for the file amend-0.3.1-py3-none-any.whl.
File metadata
- Download URL: amend-0.3.1-py3-none-any.whl
- Upload date:
- Size: 49.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b89d9fefd06cb049ad5ad9f5a81c4c8ea36d2f10a0c1b6b005ee94b92b2c1b1
|
|
| MD5 |
b06e8eeb88e41130aef8ccae0cd155aa
|
|
| BLAKE2b-256 |
ef4ad7b438168d294c86549f077f30a23a6365a316568f36f2c6615a32e0f42a
|