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-1.0.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-1.0.0-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pipen_deprecated-1.0.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-1.0.0.tar.gz
Algorithm Hash digest
SHA256 de533eaea79601516f5d1a203ca27a767b7f2e575f301fb36a31da50a0662189
MD5 a2d5e2cea58f823e1c2b1d4d7ecf7c82
BLAKE2b-256 991b59bbb19984deba0fa20d22cc2a299dcf26445eabdf4cf3245ba003f0b827

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pipen_deprecated-1.0.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-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce26afd0e217cefeff88db841c001ac9e0933ed621b27c69dcd9f66ae148cb9c
MD5 a4339a2f805cdda1e58fff5394e5bb7e
BLAKE2b-256 1bba8bae223266155aae2a52a861f2cc9fe0268b528095080aa2c8b30c881719

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