todo_by
Runtime lifetimes for comments. Inspired by parker-codes/todo_by.
To use the library, install it using pip:
$ pip install todo_by
Import and call the todo_by decorator and add a date like so:
from todo_by import todo_by, todo_while
@todo_by("2050-06-01")
def my_function():
# TODO: Implement this function by June 1st, 2050
If the current date is after June 1st, 2050, the todo_by decorator will
generate a RuntimeError with the message "TODO by Jun 1, 2050 has passed".
If the current date is on or before June 1st, 2030, the code will run normally.
You can also add specific TODO comments:
@todo_by("2050-06-01", "Clean up implementation")
The todo_while decorator allows you to ensure todos are done based on a SemVer
requirement. This also allows you to make blockers:
@todo_while("1.0.0", "setup.py", "This has to be in the first major release")
def my_function():
self.assertTrue(True)
If the current version in your setup.py (specify any file used for versioning
your code) is equal or greater than 1.0.0, the todo_while decorator will
generate a RuntimeError with the message
"TODO version requirement '1.0.0' not satisfied by current <version_number>".
If the current version number is smaller than 1.0.0, the code will run normally.
License:
Copyright 2023 Martin Simon
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Buy me a coffee?
If you feel like buying me a coffee (or a beer?), donations are welcome:
BTC : bc1qq04jnuqqavpccfptmddqjkg7cuspy3new4sxq9
DOGE: DRBkryyau5CMxpBzVmrBAjK6dVdMZSBsuS
ETH : 0x2238A11856428b72E80D70Be8666729497059d95
LTC : MQwXsBrArLRHQzwQZAjJPNrxGS1uNDDKX6
Metadata
Release files for todo-by 1.2.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 | Provenance | |
|---|---|---|---|---|
| todo_by-1.2.0.tar.gz | 3.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| todo_by-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.7 kB
Release files / todo_by-1.2.0.tar.gz
| Download URL | todo_by-1.2.0.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be455b9c084ec46535c99a87811d2a95531f30715881baef4af3ca91d5164faf
|
|
BLAKE2b-256 checksum How to use checksums |
a69e7645de7198e15d859cfb5e7909193eab562ea899fb554a0575aa98dcf846
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.1 CPython/3.11.4
|
Release files / todo_by-1.2.0-py3-none-any.whl
| Download URL | todo_by-1.2.0-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
078faa14789bf9792c8742e0593de5583496d19414f8675ae9f93e06bf317486
|
|
BLAKE2b-256 checksum How to use checksums |
2a43754f3c626a9cbb54da92769b8d088eeecfdc6d9a6c1105c39c06ffe4a19d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.1 CPython/3.11.4
|
Security for todo-by 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.