[build-system] requires = ["hatchling>=1.18", "hatch-regex-commit>=0.0.3"] build-backend = "hatchling.build" [project] name = "octodns-netbox-dns" 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", ] dependencies = [ "pynetbox>=7.2.0", "dnspython>=2.4.2", ] [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" [tool.hatch.version] source = "regex_commit" path = "src/octodns_netbox_dns/__about__.py" tag_sign = false [tool.hatch.build] ignore-vcs = true [tool.hatch.build.targets.sdist] packages = ["src/octodns_netbox_dns"] [tool.hatch.build.targets.wheel] packages = ["src/octodns_netbox_dns"] ### envs [tool.hatch.envs.default] python = "3.11" dependencies = [ "pytest==7.4.3", "coverage==7.3.2", ] [tool.hatch.envs.default.scripts] test = "pytest {args:tests}" test-cov = ["coverage erase", "coverage run -m pytest {args:tests}"] cov-report = ["- coverage combine", "coverage report", "coverage xml"] cov = ["test-cov", "cov-report"] [tool.hatch.envs.lint] python = "3.11" detached = true dependencies = [ "mypy==1.7.1", "ruff==0.1.7", ] [tool.hatch.envs.lint.scripts] typing = "mypy --non-interactive --install-types {args:src/octodns_netbox_dns}" style = ["ruff check --diff {args:.}", "ruff format --check --diff {args:.}"] fmt = ["ruff format {args:.}", "ruff check --fix {args:.}", "style"] all = ["style", "typing"] ### ruff [tool.ruff] target-version = "py311" line-length = 100 indent-width = 4 fix = true show-fixes = true ignore-init-module-imports = 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", ] [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", ] ignore = ["E501", "D103", "D100", "D102", "PLR2004", "D403", "ISC001", "FBT001", "FBT002", "FBT003"] unfixable = ["F401"] [tool.ruff.format] quote-style = "double" indent-style = "space" skip-magic-trailing-comma = false line-ending = "lf" [tool.ruff.per-file-ignores] "__init__.py" = ["D104"] "__about__.py" = ["D104", "F841"] "tests/**/*" = ["PLR2004", "S101", "TID252"] [tool.ruff.pyupgrade] keep-runtime-typing = true [tool.ruff.isort] lines-after-imports = 2 known-first-party = ["octodns_netbox_dns"] [tool.ruff.flake8-tidy-imports] ban-relative-imports = "all" [tool.ruff.pylint] max-branches = 24 max-returns = 12 max-statements = 100 max-args = 15 allow-magic-value-types = ["str", "bytes", "complex", "float", "int"] [tool.ruff.mccabe] max-complexity = 15 [tool.ruff.pydocstyle] convention = "google" [tool.ruff.pycodestyle] max-doc-length = 100 ### mypy [tool.mypy] #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 ignore_missing_imports = true warn_return_any = true pretty = true show_column_numbers = true show_error_codes = true show_error_context = true #[tool.pydantic-mypy] #init_forbid_extra = true #init_typed = true #warn_required_dynamic_aliases = true ### pytest [tool.pytest.ini_options] pythonpath = ["src"] addopts = "--color=yes --exitfirst --verbose -ra" #addopts = "--color=yes --exitfirst --verbose -ra --capture=tee-sys" filterwarnings = [ 'ignore:Jupyter is migrating its paths to use standard platformdirs:DeprecationWarning', ] ### coverage [tool.coverage.run] source_pkgs = ["octodns_netbox_dns", "tests"] branch = true parallel = true omit = ["src/octodns_netbox_dns/__about__.py"] [tool.coverage.paths] testproj = ["src/octodns_netbox_dns", "*/octodns_netbox_dns/src/octodns_netbox_dns"] tests = ["tests", "*/octodns_netbox_dns/tests"] [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