Marking pipen processes as deprecated
Project description
pipen-deprecated
Marking pipen processes as deprecated.
Installation
pip install -U pipen-deprecated
Enable/Disable
The plugin is enabled by default after installation. To disable it, either uninstall it or:
from pipen import Proc, Pipen
# process definition
class MyPipeline(Pipen):
plugins = ["-deprecated"]
Usage
To mark a process as deprecated, use the @mark(deprecated=...) decorator.
from pipen import Proc
from pipen.utils import mark
@mark(deprecated=True)
class ProcDeprecatedTrue(Proc):
...
@mark(deprecated="This process is deprecated.")
class ProcDeprecatedMessage(Proc):
...
When a deprecated process is run, a warning message will be logged.
If the process is marked with deprecated=True, the message will be:
[ProcDeprecatedTrue] is deprecated and will be removed in a future release.
If a custom message is provided, it will be used instead:
[ProcDeprecatedMessage] This process is deprecated.
You can use proc in the message as a placeholder for the process class. For example:
@mark(deprecated='"{proc.name}" is deprecated.')
class ProcDeprecatedMessage(Proc):
...
This will log:
"ProcDeprecatedMessage" is deprecated.
Project details
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 pipen_deprecated-1.0.2.tar.gz.
File metadata
- Download URL: pipen_deprecated-1.0.2.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3473c70f37352c970af5db2eb2b82fe74b9fe9349d449cc3af7783adc900299f
|
|
| MD5 |
a63cd02189022961b427f55b292001ca
|
|
| BLAKE2b-256 |
1e279f384ffa6b969d759f7afb0231f42acc34f0f08410a8220b449a2102d4de
|
File details
Details for the file pipen_deprecated-1.0.2-py3-none-any.whl.
File metadata
- Download URL: pipen_deprecated-1.0.2-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb8090ea1d13818a31dfd65ae882973fc4af78a3a07fbce1823cfbad814ad220
|
|
| MD5 |
896d43f0464403272ac0fef5f89687b8
|
|
| BLAKE2b-256 |
6fd0d83f9f046b30aaf19d321195b47051e4b6b46c520409de011b6813a441ca
|