volopivoshenko/poetry-plugin-dotenv

View on GitHub
pyproject.toml

Summary

Maintainability
Test Coverage
[tool.poetry]
name = "poetry-plugin-dotenv"
version = "2.4.0"
description = "poetry-plugin-dotenv - is the plugin that automatically loads environment variables from a dotenv file into the environment before poetry commands are run."
license = "MIT"
authors = ["Volodymyr Pivoshenko <volodymyr.pivoshenko@gmail.com>"]
maintainers = ["Volodymyr Pivoshenko <volodymyr.pivoshenko@gmail.com>"]
keywords = [
  "python",
  "pypi",
  "poetry",
  "plugin",
  "plugins",
  "poetry-plugin",
  "poetry-plugins",
  "env",
  "dotenv",
  "config",
  "configuration",
  "configuration-management",
  "cross-platform",
  "hacktoberfest"
]
homepage = "https://github.com/pivoshenko/poetry-plugin-dotenv"
documentation = "https://github.com/pivoshenko/poetry-plugin-dotenv"
repository = "https://github.com/pivoshenko/poetry-plugin-dotenv"
readme = "README.md"
classifiers = [
  "Development Status :: 5 - Production/Stable",
  "License :: OSI Approved :: MIT License",
  "Operating System :: OS Independent",
  "Environment :: Other Environment",
  "Programming Language :: Python",
  "Programming Language :: Python :: 3",
  "Programming Language :: Python :: 3.8",
  "Programming Language :: Python :: 3.9",
  "Programming Language :: Python :: 3.10",
  "Programming Language :: Python :: 3.11",
  "Programming Language :: Python :: 3.12",
  "Intended Audience :: Developers",
  "Intended Audience :: Information Technology",
  "Topic :: Software Development",
  "Topic :: Software Development :: Libraries",
  "Topic :: Software Development :: Libraries :: Python Modules",
  "Topic :: Scientific/Engineering",
  "Natural Language :: English"
]
packages = [{ include = "poetry_plugin_dotenv", from = "src" }]

[tool.poetry.urls]
"Issues" = "https://github.com/pivoshenko/poetry-plugin-dotenv/issues"
"Releases" = "https://github.com/pivoshenko/poetry-plugin-dotenv/releases"
"Say Thanks!" = "https://www.buymeacoffee.com/pivoshenko"

[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
poetry = ">=1.5.0"

[tool.poetry.group.dev.dependencies]
pre-commit = ">=3.5.0"
poethepoet = ">=0.28.0"
ipdb = ">=0.13.13"
ipython = "8.12.3"

[tool.poetry.group.formatters.dependencies]
isort = ">=5.13.2"
ruff = ">=0.6.5"
pyupgrade = ">=3.16.0"

[tool.poetry.group.linters.dependencies]
mypy = ">=1.11.2"
ruff = ">=0.6.5"
deptry = ">=0.20.0"
codespell = ">=2.3.0"
commitizen = ">=3.29.0"

[tool.poetry.group.lsp.dependencies]
python-lsp-server = { extras = ["all"], version = ">=1.12.0" }
ruff-lsp = ">=0.0.56"
pylsp-mypy = ">=0.6.9"
pylsp-rope = ">=0.1.16"
python-lsp-isort = ">=0.1"

[tool.poetry.group.tests.dependencies]
# pytest version should be fixed due to the next issues
# https://github.com/pytest-dev/pytest/issues/11890
# https://github.com/TvoroG/pytest-lazy-fixture/issues/65
pytest = "7.4.4"
xdoctest = ">=1.2.0"
pytest-lazy-fixture = ">=0.6.3"
pytest-codeblocks = ">=0.17.0"
pytest-mock = ">=3.14.0"
pytest-cov = ">=5.0.0"
pytest-sugar = ">=1.0.0"
coverage = { version = ">=7.6.1", extras = ["toml"] }
sh = ">=2.0.7"

[tool.poetry.group.ci.dependencies]
python-semantic-release = ">=9.8.8"

[tool.poetry.plugins."poetry.application.plugin"]
poetry-plugin-dotenv = "poetry_plugin_dotenv.plugin:DotenvPlugin"

[tool.semantic_release]
logging_use_named_masks = true
changelog_file = "CHANGELOG.md"
version_toml = ["pyproject.toml:tool.poetry.version"]
version_variables = ["src/poetry_plugin_dotenv/__init__.py:__version__"]
commit_author = "github-actions <github-actions@github.com>"
exclude_commit_patterns = ["Merge pull request"]

[tool.semantic_release.commit_parser_options]
major_tags = ["feat"]
minor_tags = ["fix", "perf", "refactor"]
patch_tags = ["docs", "style"]

[tool.semantic_release.changelog]
exclude_commit_patterns = [
  '''Merged? .*''',
  '''Initial Commit.*''',
  '''^\d+\.\d+\.\d+''',
]

[tool.commitizen]
allowed_prefixes = ["build", "tests", "Merge", "Initial", "0", "1", "2"]

[tool.isort]
profile = "black"
line_length = 100
lines_after_imports = 2
lines_between_types = 1
color_output = true
force_single_line = true
length_sort_straight = true
force_alphabetical_sort_within_sections = true

[tool.mypy]
python_version = "3.12"
strict = true
warn_unused_configs = true
show_error_codes = true
namespace_packages = true

[tool.ruff]
target-version = "py312"
line-length = 100

[tool.ruff.lint]
select = ["ALL"]
ignore = ["ANN101", "D202", "FIX002", "I001", "TD003"]

[tool.ruff.lint.per-file-ignores]
"tests/*.*" = ["INP001", "PTH", "S101"]
"src/poetry_plugin_dotenv/__init__.py" = ["E501"]
"src/poetry_plugin_dotenv/plugin.py" = ["ANN002", "ANN003", "ARG002", "G004", "PTH"]
"src/poetry_plugin_dotenv/config.py" = ["PTH"]
"src/poetry_plugin_dotenv/dotenv/core.py" = ["PTH"]
"src/poetry_plugin_dotenv/dotenv/variables.py" = ["ANN002", "ANN003", "ARG002"]

[tool.ruff.lint.isort]
lines-after-imports = 2
lines-between-types = 1
order-by-type = false
force-single-line = true
force-sort-within-sections = true
length-sort-straight = true
required-imports = ["from __future__ import annotations"]

[tool.codespell]
skip = ["poetry.lock"]
ignore-words-list = ["redunant", "resovle", "socio-economic"]

[tool.deptry.per_rule_ignores]
DEP002 = ["poetry"]
DEP003 = ["cleo", "poetry_plugin_dotenv", "tomlkit"]

[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = [
  "-l",
  "-vv",
  "-rx",
  "--xdoc",
  "--color=yes",
  "--cov=src",
  "--cov-report=term-missing",
  "--cov-report=xml",
  "--basetemp=tests/fixtures"
]

[tool.coverage.run]
omit = ["*/__init__.py"]

[tool.poe]
poetry_command = ""

[tool.poe.tasks.format]
help = "Run formatters"
args = { dir = { options = ["--directory", "-d"], default = ".", help = "Target directory" } }
sequence = [
  { shell = "find src -type f -name '*.py' | xargs pyupgrade --py312-plus", help = "Run annotations formatter" },
  { shell = "find tests -type f -name '*.py' | xargs pyupgrade --py312-plus", help = "Run annotations formatter" },
  { shell = "isort ${dir}", help = "Run imports formatter" },
  { shell = "ruff format ${dir}", help = "Run code formatter" }
]

[tool.poe.tasks.lint]
help = "Run linters"
args = { dir = { options = ["--directory", "-d"], default = ".", help = "Target directory" } }
sequence = [
  { shell = "deptry ${dir}", help = "Run dependencies linter" },
  { shell = "mypy ${dir}", help = "Run types linter" },
  { shell = "ruff check ${dir}", help = "Run code linter" },
  { shell = "codespell ${dir}", help = "Run spell linter" },
  { shell = "cz check --rev-range .", help = "Run commits linter" }
]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"