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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pipen_deprecated-0.0.0.tar.gz
  • Upload date:
  • Size: 1.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.3 Linux/6.11.0-1018-azure

File hashes

Hashes for pipen_deprecated-0.0.0.tar.gz
Algorithm Hash digest
SHA256 2720d65b5c5e9520e5155aa45058fb519de674a64763301a30d7f49d03239088
MD5 e10d2b92685220c4f8c11c3ecb8ea796
BLAKE2b-256 5fe79a030d6063164876d53f5cff0e8d7cc09485df29fb6643f6a53fe9318ab7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pipen_deprecated-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.3 Linux/6.11.0-1018-azure

File hashes

Hashes for pipen_deprecated-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5de4a5f9a89796a052da1e4ef14fa33cbc217cd338791066689b7d307f58acf3
MD5 c5c2cf3f435b5cee9fc92d0e98cd682d
BLAKE2b-256 a2be8e90c39419e2ccedc52c753545f97d2002b907b0b7f1b2f46b1614ccb67b

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