delfino-core


Namedelfino-core JSON
Version 8.1.1 PyPI version JSON
download
home_pagehttps://github.com/radeklat/delfino-core
SummaryDelfino core plugin
upload_time2024-09-23 13:29:17
maintainerNone
docs_urlNone
authorRadek Lát
requires_python<4.0.0,>=3.8.1
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center" style="border-bottom: none;"> 🔌&nbsp;&nbsp;Delfino Core&nbsp;&nbsp; 🔌</h1>
<h3 align="center">A <a href="https://github.com/radeklat/delfino">Delfino</a> plugin with core functionality.</h3>

<p align="center">
    <a href="https://app.circleci.com/pipelines/github/radeklat/delfino-core?branch=main">
        <img alt="CircleCI" src="https://img.shields.io/circleci/build/github/radeklat/delfino-core">
    </a>
    <a href="https://app.codecov.io/gh/radeklat/delfino-core/">
        <img alt="Codecov" src="https://img.shields.io/codecov/c/github/radeklat/delfino-core">
    </a>
    <a href="https://github.com/radeklat/delfino-core/tags">
        <img alt="GitHub tag (latest SemVer)" src="https://img.shields.io/github/tag/radeklat/delfino-core">
    </a>
    <img alt="Maintenance" src="https://img.shields.io/maintenance/yes/2024">
    <a href="https://github.com/radeklat/delfino-core/commits/main">
        <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/radeklat/delfino-core">
    </a>
    <a href="https://www.python.org/doc/versions/">
        <img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/delfino-core">
    </a>
    <a href="https://pypistats.org/packages/delfino-core">
        <img alt="Downloads" src="https://img.shields.io/pypi/dm/delfino-core">
    </a>
</p>

# Commands
  
| Command               | Description                                                            |
|-----------------------|------------------------------------------------------------------------|
| black                 | Runs black.                                                            |
| coverage-open         | Open coverage results in default browser.                              |
| coverage-report       | Analyse coverage and generate a term/HTML report.                      |
| dependencies-update   | Manages the process of updating dependencies.                          |
| ensure-pre-commit     | Ensures pre-commit is installed and enabled.                           |
| format                | Runs ensure-pre-commit, pyupgrade, isort, black.                       |
| gh                    | Extends `gh` or passes through.                                        |
| glab                  | Extends `glab` or passes through.                                      |
| isort                 | Runs isort.                                                            |
| lint                  | Runs ruff, pylint, pycodestyle, pydocstyle.                            |
| mypy                  | Run type checking on source code.                                      |
| pre-commit            | Run all pre-commit stages in the current project...                    |
| pycodestyle           | Run PEP8 checking on code.                                             |
| pydocstyle            | Run docstring linting on source code.                                  |
| pylint                | Run pylint on code.                                                    |
| pytest                | Runs pytest for individual test suites.                                |
| pytest-integration    | Run integration tests.                                                 |
| pytest-unit           | Run unit tests.                                                        |
| pyupgrade             | Runs pyupgrade with automatic version discovery.                       |
| ruff                  | Run ruff.                                                              |
| switch-python-version | Switches Python venv to a different Python version.                    |
| test                  | Runs pytest, coverage-report.                                          |
| vcs                   | Alias for `gh`/`glab` with auto-detection.                             |
| verify                | Runs format, lint, mypy, test.                                         |

# Installation

- pip: `pip install delfino-core`
- Poetry: `poetry add -D delfino-core`
- Pipenv: `pipenv install -d delfino-core`

## Optional dependencies

Each project may use different sub-set of [commands](#commands). Therefore, dependencies of all commands are optional and checked only when the command is executed.

Using `[all]` installs all the [optional dependencies](https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#optional-dependencies) used by all the commands. If you want only a sub-set of those dependencies, there are finer-grained groups available:

- For individual commands (matches the command names):
  - `mypy`
  - `format`
  - `dependencies-update`
  - `pre-commit`
  - `vsc`
- For groups of commands:
  - `test` - for testing and coverage commands
  - `lint` - for all the linting commands
- For groups of groups:
  - `verify` - same as `[mypy,format,test,lint]`
  - `all` - all optional packages

# Configuration

Delfino doesn't load any plugins by default. To enable this plugin, add the following config into `pyproject.toml`:

```toml
[tool.delfino.plugins.delfino-core]

```

## Plugin configuration

This plugin has several options. All the values are optional and defaults are shown below: 

```toml
[tool.delfino.plugins.delfino-core]
# Source files - may have different rules than tests (usually stricter)
sources_directory = "src"

# Test files
tests_directory = "tests"

# Where to store reports generated by various tools
reports_directory = "reports"

# Types of tests you have nested under the `tests_directory`. Will be executed in given order.
test_types = ["unit", "integration"]

# One or more module to wrap `pytest` in, executing it as `python -m <MODULE> pytest ...`
pytest_modules = []

# Coommand groups and commands to run as a quality gate in given order.
verify_commands = ["format", "lint", "mypy", "test"]
format_commands = ["ensure-pre-commit", "pyupgrade", "isort", "black"]
lint_commands = ["ruff", "pylint", "pycodestyle", "pydocstyle"]
test_commands = ["pytest", "coverage-report"]

# Do not install pre-commit if this is set to true.
disable_pre_commit = false
```

## Commands configuration

Several commands have their own configuration as well.

### `mypy`

```toml
[tool.delfino.plugins.delfino-core.mypy]
# One or more directories where type hint will be required. By default they are optional.
strict_directories = []  
```

### `vcs`

```toml
[tool.delfino.plugins.delfino-core.vcs]
# Enable to manually specify the branch prefix. By default it is set to git username.
# branch_prefix = ""

[tool.delfino.plugins.delfino-core.vcs.issue_tracking]
# Prefix for issue numbers, including a trailing hyphen if used. If not set, just the issue numbers will be used.
# issue_prefix = "ISSUE-"

# URL for the issue tracker. If not set, issue tracker integration will be disabled.
# Implemented trackers: Jira.
# tracker_url = "https://<SUBDOMAIN>.atlassian.net"

# Environment variable name for the issue tracking username. If not set, 'ISSUE_TRACKER_USERNAME' will be used by default.
# username_env_var = ""

# Environment variable name for the issue tracking API key. If not set, 'ISSUE_TRACKER_API_KEY' will be used by default.
# api_key_env_var = ""
```


# Usage

Run `delfino --help`.

# Development

To develop against editable `delfino` sources:

1. Make sure `delfino` sources are next to this plugin:
    ```shell
    cd ..
    git clone https://github.com/radeklat/delfino.git
    ```
2. Install `delfino` as editable package:
    ```shell
    pip install -e ../delfino
    ```
   Note that poetry will reset this to the released package when you install/update anything.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/radeklat/delfino-core",
    "name": "delfino-core",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0.0,>=3.8.1",
    "maintainer_email": null,
    "keywords": null,
    "author": "Radek L\u00e1t",
    "author_email": "radek.lat@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f3/e8/28f4e790920c6e34c6897098152520404cdd1d7fcd7203cbf6ad0159afe9/delfino_core-8.1.1.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\" style=\"border-bottom: none;\"> \ud83d\udd0c&nbsp;&nbsp;Delfino Core&nbsp;&nbsp; \ud83d\udd0c</h1>\n<h3 align=\"center\">A <a href=\"https://github.com/radeklat/delfino\">Delfino</a> plugin with core functionality.</h3>\n\n<p align=\"center\">\n    <a href=\"https://app.circleci.com/pipelines/github/radeklat/delfino-core?branch=main\">\n        <img alt=\"CircleCI\" src=\"https://img.shields.io/circleci/build/github/radeklat/delfino-core\">\n    </a>\n    <a href=\"https://app.codecov.io/gh/radeklat/delfino-core/\">\n        <img alt=\"Codecov\" src=\"https://img.shields.io/codecov/c/github/radeklat/delfino-core\">\n    </a>\n    <a href=\"https://github.com/radeklat/delfino-core/tags\">\n        <img alt=\"GitHub tag (latest SemVer)\" src=\"https://img.shields.io/github/tag/radeklat/delfino-core\">\n    </a>\n    <img alt=\"Maintenance\" src=\"https://img.shields.io/maintenance/yes/2024\">\n    <a href=\"https://github.com/radeklat/delfino-core/commits/main\">\n        <img alt=\"GitHub last commit\" src=\"https://img.shields.io/github/last-commit/radeklat/delfino-core\">\n    </a>\n    <a href=\"https://www.python.org/doc/versions/\">\n        <img alt=\"PyPI - Python Version\" src=\"https://img.shields.io/pypi/pyversions/delfino-core\">\n    </a>\n    <a href=\"https://pypistats.org/packages/delfino-core\">\n        <img alt=\"Downloads\" src=\"https://img.shields.io/pypi/dm/delfino-core\">\n    </a>\n</p>\n\n# Commands\n  \n| Command               | Description                                                            |\n|-----------------------|------------------------------------------------------------------------|\n| black                 | Runs black.                                                            |\n| coverage-open         | Open coverage results in default browser.                              |\n| coverage-report       | Analyse coverage and generate a term/HTML report.                      |\n| dependencies-update   | Manages the process of updating dependencies.                          |\n| ensure-pre-commit     | Ensures pre-commit is installed and enabled.                           |\n| format                | Runs ensure-pre-commit, pyupgrade, isort, black.                       |\n| gh                    | Extends `gh` or passes through.                                        |\n| glab                  | Extends `glab` or passes through.                                      |\n| isort                 | Runs isort.                                                            |\n| lint                  | Runs ruff, pylint, pycodestyle, pydocstyle.                            |\n| mypy                  | Run type checking on source code.                                      |\n| pre-commit            | Run all pre-commit stages in the current project...                    |\n| pycodestyle           | Run PEP8 checking on code.                                             |\n| pydocstyle            | Run docstring linting on source code.                                  |\n| pylint                | Run pylint on code.                                                    |\n| pytest                | Runs pytest for individual test suites.                                |\n| pytest-integration    | Run integration tests.                                                 |\n| pytest-unit           | Run unit tests.                                                        |\n| pyupgrade             | Runs pyupgrade with automatic version discovery.                       |\n| ruff                  | Run ruff.                                                              |\n| switch-python-version | Switches Python venv to a different Python version.                    |\n| test                  | Runs pytest, coverage-report.                                          |\n| vcs                   | Alias for `gh`/`glab` with auto-detection.                             |\n| verify                | Runs format, lint, mypy, test.                                         |\n\n# Installation\n\n- pip: `pip install delfino-core`\n- Poetry: `poetry add -D delfino-core`\n- Pipenv: `pipenv install -d delfino-core`\n\n## Optional dependencies\n\nEach project may use different sub-set of [commands](#commands). Therefore, dependencies of all commands are optional and checked only when the command is executed.\n\nUsing `[all]` installs all the [optional dependencies](https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#optional-dependencies) used by all the commands. If you want only a sub-set of those dependencies, there are finer-grained groups available:\n\n- For individual commands (matches the command names):\n  - `mypy`\n  - `format`\n  - `dependencies-update`\n  - `pre-commit`\n  - `vsc`\n- For groups of commands:\n  - `test` - for testing and coverage commands\n  - `lint` - for all the linting commands\n- For groups of groups:\n  - `verify` - same as `[mypy,format,test,lint]`\n  - `all` - all optional packages\n\n# Configuration\n\nDelfino doesn't load any plugins by default. To enable this plugin, add the following config into `pyproject.toml`:\n\n```toml\n[tool.delfino.plugins.delfino-core]\n\n```\n\n## Plugin configuration\n\nThis plugin has several options. All the values are optional and defaults are shown below: \n\n```toml\n[tool.delfino.plugins.delfino-core]\n# Source files - may have different rules than tests (usually stricter)\nsources_directory = \"src\"\n\n# Test files\ntests_directory = \"tests\"\n\n# Where to store reports generated by various tools\nreports_directory = \"reports\"\n\n# Types of tests you have nested under the `tests_directory`. Will be executed in given order.\ntest_types = [\"unit\", \"integration\"]\n\n# One or more module to wrap `pytest` in, executing it as `python -m <MODULE> pytest ...`\npytest_modules = []\n\n# Coommand groups and commands to run as a quality gate in given order.\nverify_commands = [\"format\", \"lint\", \"mypy\", \"test\"]\nformat_commands = [\"ensure-pre-commit\", \"pyupgrade\", \"isort\", \"black\"]\nlint_commands = [\"ruff\", \"pylint\", \"pycodestyle\", \"pydocstyle\"]\ntest_commands = [\"pytest\", \"coverage-report\"]\n\n# Do not install pre-commit if this is set to true.\ndisable_pre_commit = false\n```\n\n## Commands configuration\n\nSeveral commands have their own configuration as well.\n\n### `mypy`\n\n```toml\n[tool.delfino.plugins.delfino-core.mypy]\n# One or more directories where type hint will be required. By default they are optional.\nstrict_directories = []  \n```\n\n### `vcs`\n\n```toml\n[tool.delfino.plugins.delfino-core.vcs]\n# Enable to manually specify the branch prefix. By default it is set to git username.\n# branch_prefix = \"\"\n\n[tool.delfino.plugins.delfino-core.vcs.issue_tracking]\n# Prefix for issue numbers, including a trailing hyphen if used. If not set, just the issue numbers will be used.\n# issue_prefix = \"ISSUE-\"\n\n# URL for the issue tracker. If not set, issue tracker integration will be disabled.\n# Implemented trackers: Jira.\n# tracker_url = \"https://<SUBDOMAIN>.atlassian.net\"\n\n# Environment variable name for the issue tracking username. If not set, 'ISSUE_TRACKER_USERNAME' will be used by default.\n# username_env_var = \"\"\n\n# Environment variable name for the issue tracking API key. If not set, 'ISSUE_TRACKER_API_KEY' will be used by default.\n# api_key_env_var = \"\"\n```\n\n\n# Usage\n\nRun `delfino --help`.\n\n# Development\n\nTo develop against editable `delfino` sources:\n\n1. Make sure `delfino` sources are next to this plugin:\n    ```shell\n    cd ..\n    git clone https://github.com/radeklat/delfino.git\n    ```\n2. Install `delfino` as editable package:\n    ```shell\n    pip install -e ../delfino\n    ```\n   Note that poetry will reset this to the released package when you install/update anything.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Delfino core plugin",
    "version": "8.1.1",
    "project_urls": {
        "Homepage": "https://github.com/radeklat/delfino-core"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1e2eb1c15bcc61a1ce4fa6bc1d31601ebfca268b72288a9bb61fd62352f672ff",
                "md5": "126c58516c94a2d542624c96a07e0e1e",
                "sha256": "6926aac3cc33fa0294d0f10b727a57f14ae0511fbe1f1df57e75745c1ed1ee52"
            },
            "downloads": -1,
            "filename": "delfino_core-8.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "126c58516c94a2d542624c96a07e0e1e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0.0,>=3.8.1",
            "size": 30699,
            "upload_time": "2024-09-23T13:29:16",
            "upload_time_iso_8601": "2024-09-23T13:29:16.388121Z",
            "url": "https://files.pythonhosted.org/packages/1e/2e/b1c15bcc61a1ce4fa6bc1d31601ebfca268b72288a9bb61fd62352f672ff/delfino_core-8.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f3e828f4e790920c6e34c6897098152520404cdd1d7fcd7203cbf6ad0159afe9",
                "md5": "7aa1850de44e8e65a2a64762988b79d6",
                "sha256": "9649635d7df124426c9027d6e81b48668c8a4695a4f9eb6070da517d4fd9b6ae"
            },
            "downloads": -1,
            "filename": "delfino_core-8.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "7aa1850de44e8e65a2a64762988b79d6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0.0,>=3.8.1",
            "size": 25899,
            "upload_time": "2024-09-23T13:29:17",
            "upload_time_iso_8601": "2024-09-23T13:29:17.936650Z",
            "url": "https://files.pythonhosted.org/packages/f3/e8/28f4e790920c6e34c6897098152520404cdd1d7fcd7203cbf6ad0159afe9/delfino_core-8.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-23 13:29:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "radeklat",
    "github_project": "delfino-core",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "circle": true,
    "lcname": "delfino-core"
}
        
Elapsed time: 0.35080s