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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pipen_deprecated-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 78b30ef0aa4ada0e291645a3459810780afef8ba175d9564bf6b284ee8a84675
MD5 91702bcd674642aa3fea6434963ab376
BLAKE2b-256 c8ec4d53a226b467448844e8bff2fae2e3f949ecd3161dbd5ad8a9e0053eb05a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pipen_deprecated-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8a5af2e3e38fba64b1a1b339e006850c27144e32d7ad2e5e964fc6a8e62496eb
MD5 2dea2f3d2c29d4ecdc2745840d344cec
BLAKE2b-256 cd29cd303eb7b1c66f985335b3b17ac39cbf95b8dc905236d0d2ebb0ab270bd7

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