pdm-pfsc


Namepdm-pfsc JSON
Version 0.12.2 PyPI version JSON
download
home_pagehttps://github.com/carstencodes/pdm-pfsc
SummaryCore functionPlug-In Foundation Service Collection)
upload_time2024-08-21 16:59:06
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Plug-In Foundation Services Collection

The [Python Development Master](https://pdm-project.org) offers various extension points.

You can either add plug-ins or signals. Some parts are not very intuitive for the
experienced python developer who are used to work with python standard libraries like logging or
is hard to test as there are some points that are not that easy to test.

This collection offers a set of services helping to write better plug-ins.

## `abstractions`

This module provides three protocols, that will abstract PDM core and PDM project classes, so
that they can easily mocked in unit tests.

## `actions`

Actions are a collection of actions to run. This can be useful, if you
want to add different verbal commands.

Each of this action can add options to the parser. They all can be
registered in an `ActionRegistry`. This provides an instance method called `register`
which can be used to decorate implementations of `ActionBase`.

## `config`

The configuration section is unstable.

## `hook`

Hooks surround `actions` by hooks - an action can provide an implementation of
the `HookGenerator` protocol, that must emit instances of `HookInfo`, a dataclass
that gives information about the `HookBase` class to instantiate and run
before and after the action is executed itself.

## `logging`

The `logging` module provides a logger based on the python standard logging facilities.

The `TermUIHandler` uses `pdm.core.ui.echo` to write data to a log. The `TracingLogger` is
created to add a log-level called `TRACE` to the logging, which is later used by `traced_function`.

The default instance for the logging is added in the `logger` variable. It's default value
can be set using `setup_logger`. The value passed is identical to the `verbose` level
of the `pdm` invocation arguments.

The decorator `traced_function` can be used to decorate a function for tracing the sequence of
events - just like `set -x` does in POSIX scripts.

## `proc`

The `CliRunnerMixin` allows you to run child-processes from your plug-in or signal.
It offers a class-var called `run_process`, that has the same signature like
`subprocess.run` from the python standard library, but can be overwritten for your tests.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/carstencodes/pdm-pfsc",
    "name": "pdm-pfsc",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Carsten Igel <cig@bite-that-bit.de>",
    "download_url": null,
    "platform": null,
    "description": "# Plug-In Foundation Services Collection\n\nThe [Python Development Master](https://pdm-project.org) offers various extension points.\n\nYou can either add plug-ins or signals. Some parts are not very intuitive for the\nexperienced python developer who are used to work with python standard libraries like logging or\nis hard to test as there are some points that are not that easy to test.\n\nThis collection offers a set of services helping to write better plug-ins.\n\n## `abstractions`\n\nThis module provides three protocols, that will abstract PDM core and PDM project classes, so\nthat they can easily mocked in unit tests.\n\n## `actions`\n\nActions are a collection of actions to run. This can be useful, if you\nwant to add different verbal commands.\n\nEach of this action can add options to the parser. They all can be\nregistered in an `ActionRegistry`. This provides an instance method called `register`\nwhich can be used to decorate implementations of `ActionBase`.\n\n## `config`\n\nThe configuration section is unstable.\n\n## `hook`\n\nHooks surround `actions` by hooks - an action can provide an implementation of\nthe `HookGenerator` protocol, that must emit instances of `HookInfo`, a dataclass\nthat gives information about the `HookBase` class to instantiate and run\nbefore and after the action is executed itself.\n\n## `logging`\n\nThe `logging` module provides a logger based on the python standard logging facilities.\n\nThe `TermUIHandler` uses `pdm.core.ui.echo` to write data to a log. The `TracingLogger` is\ncreated to add a log-level called `TRACE` to the logging, which is later used by `traced_function`.\n\nThe default instance for the logging is added in the `logger` variable. It's default value\ncan be set using `setup_logger`. The value passed is identical to the `verbose` level\nof the `pdm` invocation arguments.\n\nThe decorator `traced_function` can be used to decorate a function for tracing the sequence of\nevents - just like `set -x` does in POSIX scripts.\n\n## `proc`\n\nThe `CliRunnerMixin` allows you to run child-processes from your plug-in or signal.\nIt offers a class-var called `run_process`, that has the same signature like\n`subprocess.run` from the python standard library, but can be overwritten for your tests.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Core functionPlug-In Foundation Service Collection)",
    "version": "0.12.2",
    "project_urls": {
        "Homepage": "https://github.com/carstencodes/pdm-pfsc"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "66fb2f3e16fa11a01277db77426c910fdeaf7bdf3211c02c6f196aa2ceaedae3",
                "md5": "a23f0bc5b6c43bb2f41d3425328df6de",
                "sha256": "fc1872e325ca61d2d98b98a87a3d22a663d4349493835801a4d3a26f24ff86dc"
            },
            "downloads": -1,
            "filename": "pdm_pfsc-0.12.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a23f0bc5b6c43bb2f41d3425328df6de",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 14294,
            "upload_time": "2024-08-21T16:59:06",
            "upload_time_iso_8601": "2024-08-21T16:59:06.389223Z",
            "url": "https://files.pythonhosted.org/packages/66/fb/2f3e16fa11a01277db77426c910fdeaf7bdf3211c02c6f196aa2ceaedae3/pdm_pfsc-0.12.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-21 16:59:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "carstencodes",
    "github_project": "pdm-pfsc",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pdm-pfsc"
}
        
Elapsed time: 0.50838s