Skip to main content

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

pipen_deprecated-0.1.0.tar.gz (1.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pipen_deprecated-0.1.0-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file pipen_deprecated-0.1.0.tar.gz.

File metadata

  • Download URL: pipen_deprecated-0.1.0.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

Hashes for pipen_deprecated-0.1.0.tar.gz
Algorithm Hash digest
SHA256 72ef56547ef1fa62e8442edbf1880786fe1ffa93c2e3bea740be0678368575e2
MD5 fc18c2a6bd5d0a2552eca56ed61ef1a4
BLAKE2b-256 7fc7d110223501418f94c3e145fc7bf8a88b5b0f288d6601a71618d130ebc34e

See more details on using hashes here.

File details

Details for the file pipen_deprecated-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pipen_deprecated-0.1.0-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

Hashes for pipen_deprecated-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 723721a59471ecff54bbc3173ab91532b23b61b856368bd7139f22dee7390e08
MD5 a648c7a3110ff86964ad00d6c093559a
BLAKE2b-256 aa5c70780663ae676d38135e1bbf41177a2d098027c11d91446ad1bfcfe5810d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page