2023-11-09 13:08:03 +01:00
|
|
|
[build-system]
|
|
|
|
requires = ["hatchling>=1.18", "hatch-regex-commit>=0.0.3"]
|
|
|
|
build-backend = "hatchling.build"
|
2022-05-02 04:23:21 +02:00
|
|
|
|
2023-11-09 13:08:03 +01:00
|
|
|
[project]
|
2024-01-25 10:51:42 +01:00
|
|
|
name = "octodns-netbox-dns"
|
2023-11-09 13:08:03 +01:00
|
|
|
description = "octodns netbox-dns provider"
|
|
|
|
readme = "README.md"
|
|
|
|
license = "MIT"
|
|
|
|
requires-python = ">=3.11"
|
|
|
|
dynamic = ["version"]
|
|
|
|
authors = [
|
|
|
|
{ name = "Jeffrey C. Ollie", email = "" },
|
|
|
|
{ name = "Ivan Schaller", email = "ivan@schaller.sh" }
|
|
|
|
]
|
|
|
|
classifiers = [
|
|
|
|
"License :: OSI Approved :: MIT License",
|
|
|
|
"Natural Language :: English",
|
|
|
|
"Operating System :: OS Independent",
|
|
|
|
"Programming Language :: Python :: 3.11",
|
|
|
|
]
|
2024-01-23 14:30:15 +01:00
|
|
|
dependencies = [
|
|
|
|
"pynetbox>=7.2.0",
|
|
|
|
"dnspython>=2.4.2",
|
|
|
|
]
|
2022-05-02 04:23:21 +02:00
|
|
|
|
2023-11-09 13:08:03 +01:00
|
|
|
[project.urls]
|
|
|
|
Homepage = "https://github.com/olofvndrhr/octodns-netbox-dns"
|
|
|
|
History = "https://github.com/olofvndrhr/octodns-netbox-dns/commits/master"
|
|
|
|
Tracker = "https://github.com/olofvndrhr/octodns-netbox-dns/issues"
|
|
|
|
Source = "https://github.com/olofvndrhr/octodns-netbox-dns"
|
2022-05-02 04:23:21 +02:00
|
|
|
|
2023-11-09 13:08:03 +01:00
|
|
|
[tool.hatch.version]
|
|
|
|
source = "regex_commit"
|
|
|
|
path = "src/octodns_netbox_dns/__about__.py"
|
|
|
|
tag_sign = false
|
|
|
|
|
|
|
|
[tool.hatch.build.targets.sdist]
|
|
|
|
packages = ["src/octodns_netbox_dns"]
|
|
|
|
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
|
|
packages = ["src/octodns_netbox_dns"]
|
|
|
|
|
2024-02-21 14:48:11 +01:00
|
|
|
###
|
2023-11-09 13:08:03 +01:00
|
|
|
### envs
|
2024-02-21 14:48:11 +01:00
|
|
|
###
|
2023-11-09 13:08:03 +01:00
|
|
|
|
|
|
|
[tool.hatch.envs.default]
|
2024-01-09 22:12:25 +01:00
|
|
|
python = "3.11"
|
2023-11-09 13:08:03 +01:00
|
|
|
dependencies = [
|
2024-03-04 20:16:48 +01:00
|
|
|
"pytest==8.0.2",
|
2024-02-21 14:48:11 +01:00
|
|
|
"coverage==7.4.2",
|
2024-02-29 08:18:33 +01:00
|
|
|
"octodns==1.5.0",
|
2024-02-21 14:59:19 +01:00
|
|
|
"octodns-spf==0.0.2",
|
2023-11-09 13:08:03 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
[tool.hatch.envs.default.scripts]
|
2024-01-09 22:12:25 +01:00
|
|
|
test = "pytest {args:tests}"
|
|
|
|
test-cov = ["coverage erase", "coverage run -m pytest {args:tests}"]
|
2023-11-09 13:08:03 +01:00
|
|
|
cov-report = ["- coverage combine", "coverage report", "coverage xml"]
|
|
|
|
cov = ["test-cov", "cov-report"]
|
|
|
|
|
2024-02-21 16:08:53 +01:00
|
|
|
sync = ["cd dev && octodns-sync --debug --config-file sync.yml --force {args}"]
|
|
|
|
dump = ["cd dev && octodns-dump --debug --config-file sync.yml --output-dir output {args} '*' netbox"]
|
|
|
|
validate = ["cd dev && octodns-validate --debug --config-file sync.yml {args}"]
|
|
|
|
|
2023-11-09 13:08:03 +01:00
|
|
|
[tool.hatch.envs.lint]
|
|
|
|
python = "3.11"
|
|
|
|
detached = true
|
|
|
|
dependencies = [
|
2024-02-21 14:48:11 +01:00
|
|
|
"mypy==1.8.0",
|
|
|
|
"ruff==0.2.2",
|
2023-11-09 13:08:03 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
[tool.hatch.envs.lint.scripts]
|
|
|
|
typing = "mypy --non-interactive --install-types {args:src/octodns_netbox_dns}"
|
2024-02-21 14:48:11 +01:00
|
|
|
style = [
|
|
|
|
"ruff check --diff {args:.}",
|
|
|
|
"ruff format --check --diff {args:.}"
|
|
|
|
]
|
|
|
|
fmt = [
|
|
|
|
"ruff check --fix {args:.}",
|
|
|
|
"ruff format {args:.}",
|
|
|
|
"style"
|
|
|
|
]
|
2023-11-09 13:08:03 +01:00
|
|
|
all = ["style", "typing"]
|
|
|
|
|
2024-02-21 14:48:11 +01:00
|
|
|
###
|
2023-11-09 13:08:03 +01:00
|
|
|
### ruff
|
2024-02-21 14:48:11 +01:00
|
|
|
###
|
2023-11-09 13:08:03 +01:00
|
|
|
|
|
|
|
[tool.ruff]
|
|
|
|
target-version = "py311"
|
|
|
|
line-length = 100
|
|
|
|
indent-width = 4
|
|
|
|
fix = true
|
|
|
|
show-fixes = true
|
|
|
|
respect-gitignore = true
|
|
|
|
src = ["src", "tests"]
|
|
|
|
exclude = [
|
|
|
|
".direnv",
|
|
|
|
".git",
|
|
|
|
".mypy_cache",
|
|
|
|
".ruff_cache",
|
|
|
|
".svn",
|
|
|
|
".tox",
|
|
|
|
".nox",
|
|
|
|
".venv",
|
|
|
|
"venv",
|
|
|
|
"__pypackages__",
|
|
|
|
"build",
|
|
|
|
"dist",
|
|
|
|
"node_modules",
|
|
|
|
"venv",
|
2024-02-21 16:08:53 +01:00
|
|
|
"dev"
|
2023-11-09 13:08:03 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
[tool.ruff.lint]
|
|
|
|
select = [
|
|
|
|
"A",
|
|
|
|
"ARG",
|
|
|
|
"B",
|
|
|
|
"C",
|
|
|
|
"DTZ",
|
|
|
|
"E",
|
|
|
|
"EM",
|
|
|
|
"F",
|
|
|
|
"FBT",
|
|
|
|
"I",
|
|
|
|
"ICN",
|
|
|
|
"ISC",
|
|
|
|
"N",
|
|
|
|
"PLC",
|
|
|
|
"PLE",
|
|
|
|
"PLR",
|
|
|
|
"PLW",
|
|
|
|
"Q",
|
|
|
|
"RUF",
|
|
|
|
"S",
|
|
|
|
"T",
|
|
|
|
"TID",
|
|
|
|
"UP",
|
|
|
|
"W",
|
|
|
|
"YTT",
|
|
|
|
]
|
2024-02-21 14:48:11 +01:00
|
|
|
ignore-init-module-imports = true
|
2024-01-09 22:12:25 +01:00
|
|
|
ignore = ["E501", "D103", "D100", "D102", "PLR2004", "D403", "ISC001", "FBT001", "FBT002", "FBT003"]
|
2023-11-09 13:08:03 +01:00
|
|
|
unfixable = ["F401"]
|
|
|
|
|
|
|
|
[tool.ruff.format]
|
|
|
|
quote-style = "double"
|
|
|
|
indent-style = "space"
|
|
|
|
skip-magic-trailing-comma = false
|
|
|
|
line-ending = "lf"
|
2024-02-21 14:48:11 +01:00
|
|
|
docstring-code-format = true
|
2023-11-09 13:08:03 +01:00
|
|
|
|
2024-02-21 14:48:11 +01:00
|
|
|
[tool.ruff.lint.per-file-ignores]
|
2023-11-09 13:08:03 +01:00
|
|
|
"__init__.py" = ["D104"]
|
|
|
|
"__about__.py" = ["D104", "F841"]
|
|
|
|
"tests/**/*" = ["PLR2004", "S101", "TID252"]
|
|
|
|
|
2024-02-21 14:48:11 +01:00
|
|
|
[tool.ruff.lint.pyupgrade]
|
2023-11-09 13:08:03 +01:00
|
|
|
keep-runtime-typing = true
|
|
|
|
|
2024-02-21 14:48:11 +01:00
|
|
|
[tool.ruff.lint.isort]
|
2023-11-09 13:08:03 +01:00
|
|
|
lines-after-imports = 2
|
|
|
|
known-first-party = ["octodns_netbox_dns"]
|
|
|
|
|
2024-02-21 14:48:11 +01:00
|
|
|
[tool.ruff.lint.flake8-tidy-imports]
|
2023-11-09 13:08:03 +01:00
|
|
|
ban-relative-imports = "all"
|
|
|
|
|
2024-02-21 14:48:11 +01:00
|
|
|
[tool.ruff.lint.pylint]
|
2023-11-09 13:08:03 +01:00
|
|
|
max-branches = 24
|
|
|
|
max-returns = 12
|
|
|
|
max-statements = 100
|
|
|
|
max-args = 15
|
|
|
|
allow-magic-value-types = ["str", "bytes", "complex", "float", "int"]
|
|
|
|
|
2024-02-21 14:48:11 +01:00
|
|
|
[tool.ruff.lint.mccabe]
|
2023-11-09 13:08:03 +01:00
|
|
|
max-complexity = 15
|
|
|
|
|
2024-02-21 14:48:11 +01:00
|
|
|
[tool.ruff.lint.pydocstyle]
|
2023-11-09 13:08:03 +01:00
|
|
|
convention = "google"
|
|
|
|
|
2024-02-21 14:48:11 +01:00
|
|
|
[tool.ruff.lint.pycodestyle]
|
2023-11-09 13:08:03 +01:00
|
|
|
max-doc-length = 100
|
|
|
|
|
2024-02-21 14:48:11 +01:00
|
|
|
###
|
2023-11-09 13:08:03 +01:00
|
|
|
### mypy
|
2024-02-21 14:48:11 +01:00
|
|
|
###
|
2023-11-09 13:08:03 +01:00
|
|
|
|
|
|
|
[tool.mypy]
|
2024-01-09 22:12:25 +01:00
|
|
|
#plugins = ["pydantic.mypy"]
|
|
|
|
follow_imports = "silent"
|
|
|
|
warn_redundant_casts = true
|
|
|
|
warn_unused_ignores = true
|
|
|
|
disallow_any_generics = true
|
|
|
|
check_untyped_defs = true
|
|
|
|
no_implicit_reexport = true
|
2023-11-09 13:08:03 +01:00
|
|
|
ignore_missing_imports = true
|
2024-01-09 22:12:25 +01:00
|
|
|
warn_return_any = true
|
2023-11-09 13:08:03 +01:00
|
|
|
pretty = true
|
|
|
|
show_column_numbers = true
|
|
|
|
show_error_codes = true
|
2024-01-09 22:12:25 +01:00
|
|
|
show_error_context = true
|
|
|
|
|
|
|
|
#[tool.pydantic-mypy]
|
|
|
|
#init_forbid_extra = true
|
|
|
|
#init_typed = true
|
|
|
|
#warn_required_dynamic_aliases = true
|
|
|
|
|
2024-02-21 14:48:11 +01:00
|
|
|
###
|
2024-01-09 22:12:25 +01:00
|
|
|
### pytest
|
2024-02-21 14:48:11 +01:00
|
|
|
###
|
|
|
|
|
2024-01-09 22:12:25 +01:00
|
|
|
[tool.pytest.ini_options]
|
|
|
|
pythonpath = ["src"]
|
|
|
|
addopts = "--color=yes --exitfirst --verbose -ra"
|
|
|
|
filterwarnings = [
|
|
|
|
'ignore:Jupyter is migrating its paths to use standard platformdirs:DeprecationWarning',
|
|
|
|
]
|
2023-11-09 13:08:03 +01:00
|
|
|
|
2024-02-21 14:48:11 +01:00
|
|
|
###
|
2023-11-09 13:08:03 +01:00
|
|
|
### coverage
|
2024-02-21 14:48:11 +01:00
|
|
|
###
|
2023-11-09 13:08:03 +01:00
|
|
|
|
|
|
|
[tool.coverage.run]
|
|
|
|
source_pkgs = ["octodns_netbox_dns", "tests"]
|
|
|
|
branch = true
|
|
|
|
parallel = true
|
|
|
|
omit = ["src/octodns_netbox_dns/__about__.py"]
|
|
|
|
|
|
|
|
[tool.coverage.paths]
|
2024-02-21 14:48:11 +01:00
|
|
|
octodns_netbox_dns = ["src/octodns_netbox_dns", "*/octodns-netbox-dns/src/octodns_netbox_dns"]
|
|
|
|
tests = ["tests", "*/octodns-netbox-dns/tests"]
|
2023-11-09 13:08:03 +01:00
|
|
|
|
|
|
|
[tool.coverage.report]
|
|
|
|
# Regexes for lines to exclude from consideration
|
|
|
|
exclude_lines = [
|
|
|
|
# Have to re-enable the standard pragma
|
|
|
|
"pragma: no cover",
|
|
|
|
# Don't complain about missing debug-only code:
|
|
|
|
"def __repr__",
|
|
|
|
"if self.debug",
|
|
|
|
# Don't complain if tests don't hit defensive assertion code:
|
|
|
|
"raise AssertionError",
|
|
|
|
"raise NotImplementedError",
|
|
|
|
# Don't complain if non-runnable code isn't run:
|
|
|
|
"if 0:",
|
|
|
|
"if __name__ == .__main__.:",
|
|
|
|
# Don't complain about abstract methods, they aren't run:
|
|
|
|
"@(abc.)?abstractmethod",
|
|
|
|
"no cov",
|
|
|
|
"if TYPE_CHECKING:",
|
|
|
|
]
|
|
|
|
# ignore_errors = true
|