-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
68 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,9 @@ requires = [ | |
[project] | ||
name = "jinjanator-plugin-ansible" | ||
description = "Plugin which provides Ansible filters and tests to the jinjanator tool" | ||
license = { text="Apache-2.0" } | ||
license = { text = "Apache-2.0" } | ||
authors = [ | ||
{ name="Kevin P. Fleming", email="[email protected]" }, | ||
{ name = "Kevin P. Fleming", email = "[email protected]" }, | ||
] | ||
requires-python = ">=3.9" | ||
classifiers = [ | ||
|
@@ -36,11 +36,9 @@ dependencies = [ | |
"ansible-core", | ||
"jinjanator-plugins==24.1.*", | ||
] | ||
[project.urls] | ||
"Bug Tracker" = "https://github.com/kpfleming/jinjanator-plugin-ansible/issues" | ||
"Homepage" = "https://github.com/kpfleming/jinjanator-plugin-ansible" | ||
[project.entry-points.jinjanator] | ||
ansible = "jinjanator_plugin_ansible.plugin" | ||
urls."Bug Tracker" = "https://github.com/kpfleming/jinjanator-plugin-ansible/issues" | ||
urls."Homepage" = "https://github.com/kpfleming/jinjanator-plugin-ansible" | ||
entry-points.jinjanator.ansible = "jinjanator_plugin_ansible.plugin" | ||
|
||
[tool.hatch.envs.changelog] | ||
skip-install = true | ||
|
@@ -69,66 +67,66 @@ exclude = [ | |
|
||
[tool.hatch.build.targets.sdist] | ||
include = [ | ||
"src", | ||
"tests", | ||
"*.md", | ||
"src", | ||
"tests", | ||
"*.md", | ||
] | ||
|
||
[tool.hatch.build.targets.wheel] | ||
packages = [ | ||
"src/jinjanator_plugin_ansible", | ||
"src/jinjanator_plugin_ansible", | ||
] | ||
|
||
[tool.hatch.envs.default] | ||
python = "3.12" | ||
|
||
[tool.hatch.envs.lint] | ||
dependencies = [ | ||
"ruff>=0.2.0", | ||
"mypy", | ||
"pyproject-fmt", | ||
"ruff>=0.2.0", | ||
"mypy", | ||
"pyproject-fmt", | ||
] | ||
|
||
[tool.hatch.envs.lint.scripts] | ||
lint = [ | ||
"ruff format", | ||
"ruff check --output-format=full --fix --show-fixes", | ||
"mypy --package jinjanator_plugin_ansible", | ||
"mypy tests", | ||
"shellcheck workflow-support/*.sh", | ||
"pyproject-fmt pyproject.toml", | ||
"ruff format", | ||
"ruff check --output-format=full --fix --show-fixes", | ||
"mypy --package jinjanator_plugin_ansible", | ||
"mypy tests", | ||
"shellcheck workflow-support/*.sh", | ||
"pyproject-fmt pyproject.toml", | ||
] | ||
lint-action = [ | ||
"ruff format --check --diff", | ||
"ruff check --output-format=github", | ||
"mypy --package jinjanator_plugin_ansible", | ||
"mypy tests", | ||
"shellcheck workflow-support/*.sh", | ||
"pyproject-fmt --check pyproject.toml", | ||
"ruff format --check --diff", | ||
"ruff check --output-format=github", | ||
"mypy --package jinjanator_plugin_ansible", | ||
"mypy tests", | ||
"shellcheck workflow-support/*.sh", | ||
"pyproject-fmt --check pyproject.toml", | ||
] | ||
|
||
[tool.hatch.envs.ci] | ||
dependencies = [ | ||
"coverage[toml]", | ||
"pytest", | ||
"pytest-cov", | ||
"pytest-icdiff", | ||
"coverage[toml]", | ||
"pytest", | ||
"pytest-cov", | ||
"pytest-icdiff", | ||
] | ||
|
||
[[tool.hatch.envs.ci.matrix]] | ||
python = [ | ||
"3.9", | ||
"3.10", | ||
"3.11", | ||
"3.12", | ||
"3.13", | ||
"3.9", | ||
"3.10", | ||
"3.11", | ||
"3.12", | ||
"3.13", | ||
] | ||
|
||
[tool.hatch.envs.ci.scripts] | ||
ci = [ | ||
"rm -f .coverage", | ||
"pytest --verbose --cov-append --cov-branch --cov=jinjanator_plugin_ansible", | ||
"coverage report --show-missing --fail-under=100", | ||
"rm -f .coverage", | ||
"pytest --verbose --cov-append --cov-branch --cov=jinjanator_plugin_ansible", | ||
"coverage report --show-missing --fail-under=100", | ||
] | ||
|
||
[tool.hatch.metadata] | ||
|
@@ -173,44 +171,46 @@ pattern = "#(\\d+)" | |
replacement = "[#\\1](https://github.com/kpfleming/jinjanator-plugin-ansible/issues/\\1)" | ||
|
||
[tool.ruff] | ||
src = ["src", "tests"] | ||
line-length = 100 | ||
|
||
[tool.ruff.lint] | ||
ignore-init-module-imports = true | ||
select = ["ALL"] | ||
ignore = [ | ||
"ANN", # Mypy is better at this. | ||
"COM812", # conflicts with formatter | ||
"C901", # Leave complexity to me. | ||
"D", # We have different ideas about docstrings. | ||
"ISC001", # conflicts with formatter | ||
"PLR0912", # Leave complexity to me. | ||
"TRY301", # Raise in try blocks can totally make sense. | ||
src = [ | ||
"src", | ||
"tests", | ||
] | ||
unfixable = ["F401"] | ||
|
||
[tool.ruff.lint.per-file-ignores] | ||
"tests/*" = [ | ||
lint.select = [ | ||
"ALL", | ||
] | ||
lint.per-file-ignores."tests/*" = [ | ||
"PLC1901", # empty strings are falsey, but are less specific in tests | ||
"PT005", # we use always underscores and explicit names | ||
"S101", # assert | ||
"SIM300", # Yoda rocks in tests | ||
] | ||
|
||
[tool.ruff.lint.isort] | ||
lines-between-types = 1 | ||
lines-after-imports = 2 | ||
lint.unfixable = [ | ||
"F401", | ||
] | ||
lint.isort.lines-after-imports = 2 | ||
lint.isort.lines-between-types = 1 | ||
lint.ignore = [ | ||
"ANN", # Mypy is better at this. | ||
"C901", # Leave complexity to me. | ||
"COM812", # conflicts with formatter | ||
"D", # We have different ideas about docstrings. | ||
"ISC001", # conflicts with formatter | ||
"PLR0912", # Leave complexity to me. | ||
"TRY301", # Raise in try blocks can totally make sense. | ||
] | ||
lint.ignore-init-module-imports = true | ||
|
||
[tool.pytest.ini_options] | ||
minversion = "6.0" | ||
xfail_strict = true | ||
testpaths = [ | ||
"tests", | ||
"tests", | ||
] | ||
addopts = [ | ||
"-ra", | ||
"--strict-markers", | ||
"-ra", | ||
"--strict-markers", | ||
] | ||
|
||
[tool.towncrier] | ||
|
@@ -222,7 +222,11 @@ start_string = "<!-- towncrier release notes start -->\n" | |
template = "changelog.d/towncrier_template.md.jinja" | ||
title_format = "" | ||
issue_format = "[#{issue}](https://github.com/kpfleming/jinjanator-plugin-ansible/issues/{issue})" | ||
underlines = ["", "", ""] | ||
underlines = [ | ||
"", | ||
"", | ||
"", | ||
] | ||
|
||
[[tool.towncrier.section]] | ||
path = "" | ||
|