Delfino core plugin
Project description
🔌 Delfino Core 🔌
A Delfino plugin with core functionality.
Commands
Command | Description |
---|---|
build-docker | Build and push a docker image. |
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. |
format | Runs black code formatter and isort on source code. |
lint | Run linting on the entire code base. |
lint-pycodestyle | Run PEP8 checking on code. |
lint-pydocstyle | Run docstring linting on source code. |
lint-pylint | Run pylint on code. |
switch-python-version | Switches Python venv to a different Python version. |
test-all | Run all tests, and generate coverage report. |
test-integration | Run integration tests. |
test-unit | Run unit tests. |
typecheck | Run type checking on source code. |
upload-to-pypi | Upload package to a public Pypi repository. |
verify-all | Runs all verification commands. |
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):
upload-to-pypi
build-docker
typecheck
format
dependencies-update
- For groups of commands:
test
- for testing and coverage commandslint
- for all the linting commands
- For groups of groups:
verify-all
- same as[typecheck,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
:
[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"]
# Commands to run as a quality gate in given order.
verify_commands = ["format", "lint", "typecheck", "test-all"]
# 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:
[tool.delfino.plugins.delfino-core.dockerhub]
# User name for logging in into dockerhub
username = ""
# Platforms to build with dockerx
build_for_platforms = [
"linux/arm/v7",
"linux/arm64",
"linux/amd64",
]
[tool.delfino.plugins.delfino-core.typecheck]
# One or more directories where type hint will be required. By default they are optional.
strict_directories = []
Usage
Run delfino --help
.
Development
To develop against editable delfino
sources:
- Make sure
delfino
sources are next to this plugin:cd .. git clone https://github.com/radeklat/delfino.git
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for delfino_core-3.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5d2997aa295b8269cd786561ab85c264136d1ebe66d41c3dd63559d6f8ee2e7 |
|
MD5 | b650d92373216b7fdd30eb7dfef13cea |
|
BLAKE2b-256 | 3a39257ebd4a5f00c8de30f928ec8818cbfdf16e5f84caca8febfa259e758958 |