Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

delfino-core

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

delfino-core

Delfino core plugin

  • 8.1.1
  • PyPI
  • Socket score

Maintainers
1

🔌  Delfino Core   🔌

A Delfino plugin with core functionality.

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

Commands

CommandDescription
blackRuns black.
coverage-openOpen coverage results in default browser.
coverage-reportAnalyse coverage and generate a term/HTML report.
dependencies-updateManages the process of updating dependencies.
ensure-pre-commitEnsures pre-commit is installed and enabled.
formatRuns ensure-pre-commit, pyupgrade, isort, black.
ghExtends gh or passes through.
glabExtends glab or passes through.
isortRuns isort.
lintRuns ruff, pylint, pycodestyle, pydocstyle.
mypyRun type checking on source code.
pre-commitRun all pre-commit stages in the current project...
pycodestyleRun PEP8 checking on code.
pydocstyleRun docstring linting on source code.
pylintRun pylint on code.
pytestRuns pytest for individual test suites.
pytest-integrationRun integration tests.
pytest-unitRun unit tests.
pyupgradeRuns pyupgrade with automatic version discovery.
ruffRun ruff.
switch-python-versionSwitches Python venv to a different Python version.
testRuns pytest, coverage-report.
vcsAlias for gh/glab with auto-detection.
verifyRuns 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. 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
    • 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:

[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 = ["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

[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.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc