Skip to main content

Delfino core plugin

Project description

🔌  Delfino Core   🔌

A Delfino plugin with core functionality.

CircleCI Codecov GitHub tag (latest SemVer) Maintenance GitHub last commit PyPI - Python Version Downloads

Commands

Command Description
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.
gh Extends gh or passes through.
glab Extends glab or passes through.
mypy Run type checking on source code.
pre-commit Run all pre-commit stages in the current project...
pytest Runs pytest for individual test suites.
pytest-integration Run integration tests.
pytest-unit Run unit tests.
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 ensure-pre-commit, ruff, 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. Therefore, dependencies of all commands are optional and checked only when the command is executed.

Using [all] installs all the 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
    • ruff
    • dependencies-update
    • pre-commit
    • vsc
  • For groups of commands:
    • test - for testing and coverage commands
  • For groups of groups:
    • verify - same as [mypy,ruff]
    • all - all optional packages

Configuration

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

[tool.delfino.plugins.delfino-core]

Plugin configuration

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

[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 = ["ensure-pre-commit", "ruff", "mypy", "test"]
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

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

vcs

[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:
    cd ..
    git clone https://github.com/radeklat/delfino.git
    
  2. Install delfino as editable package:
    pip install -e ../delfino
    
    Note that poetry will reset this to the released package when you install/update anything.

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

delfino_core-9.0.0.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

delfino_core-9.0.0-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file delfino_core-9.0.0.tar.gz.

File metadata

  • Download URL: delfino_core-9.0.0.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.9.21 Linux/6.8.0-1024-aws

File hashes

Hashes for delfino_core-9.0.0.tar.gz
Algorithm Hash digest
SHA256 5d9ea730161025d23885d5de6e5f6ea6b64eee19de5cfbe2b034ab664f87f1a9
MD5 86b56db9145e776c7f6bab613414249c
BLAKE2b-256 bd645885117f6636f89e9d9e0fca6cace5af8c7af4fb51488a60178f7716efa6

See more details on using hashes here.

File details

Details for the file delfino_core-9.0.0-py3-none-any.whl.

File metadata

  • Download URL: delfino_core-9.0.0-py3-none-any.whl
  • Upload date:
  • Size: 26.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.9.21 Linux/6.8.0-1024-aws

File hashes

Hashes for delfino_core-9.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5db32fb6c6ad0585cdb55a9bb2bf992b1324091b77ff9269e10cf07de8c9c820
MD5 c1e0fd72a472f53824ff8ab97614a852
BLAKE2b-256 3133cac20d2076c4ffb03db984207ac1c03412857513ea6b0ab16fcbd98f34b5

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