content: [build-system]
  requires = ["poetry-core>=1.0.0"]
  build-backend = "poetry.core.masonry.api"
  
  [tool.poetry]
  name = "nuts"
  version = "3.5.0"
  description = "Network Unit Testing System"
  authors = [
      "Lukas Murer, Méline Sieber, Urs Baumann, Matthias Gabriel, Florian Bruhin",
      "Marco Martinez",
      "Severin Grimm",
  ]
  maintainers = [
      "Marco Martinez <marco.maritnez@ost.ch>",
      "Urs Baumann <github@m.ubaumann.ch>",
  ]
  classifiers = ["Framework :: Pytest", "Topic :: System :: Networking"]
  homepage = "https://github.com/network-unit-testing-system/nuts"
  repository = "https://github.com/network-unit-testing-system/nuts"
  license = "MIT"
  readme = "README.md"
  
  [tool.poetry.dependencies]
  python = "^3.9"
  pytest = "^7"
  PyYAML = "^6.0"
  nornir = "^3.3.0"
  nornir-napalm = "^0.5.0"
  nornir-netmiko = "^1.0.0"
  nornir-utils = "^0.2.0"
  rich = "^14.0.0"
  typer = "^0.15.3"
  ruamel-yaml = "^0.18.10"
  
  [tool.poetry.dev-dependencies]
  tox = "^4.4.11"
  pytest-cov = "^4.0.0"
  black = "^25.1.0"
  sphinx = "^7"
  mypy = "^1.0.1"
  flake8 = "^7.0.0"
  types-PyYAML = "*"
  types-setuptools = "*"
  types-toml = "*"
  
  [tool.poetry.scripts]
  nuts-init = 'nuts.nuts_init:run'
  
  [tool.poetry.plugins."pytest11"]
  "nuts" = "nuts.plugin"
  # why "pytest11": https://github.com/pytest-dev/pytest/commit/ed03eef81b220199a819632a27f9c452b8e1fb81
  # https://docs.pytest.org/en/latest/how-to/writing_plugins.html#making-your-plugin-installable-by-others
  
  [tool.black]
  line-length = 88
  
  [tool.pytest.ini_options]
  testpaths = "tests"
  filterwarnings = [
      "error",
      "ignore:Using or importing the ABCs from 'collections':DeprecationWarning:napalm\\.base\\.helpers",
      "ignore:Using or importing the ABCs from 'collections':DeprecationWarning:jnpr\\.junos\\.factcache",
      "ignore:NutsYamlFile\\.fspath is deprecated and will be replaced by NutsYamlFile\\.path\\.",
      "ignore:.*pkg_resources.*:DeprecationWarning",
      "ignore:.*telnetlib.*:DeprecationWarning"
  ]
  markers = ["nuts_test_ctx: A NutsContext to be used in tests."]
  norecursedirs = "mock_project"
  
  [tool.mypy]
  python_version = "3.9"
  
  ### --strict
  warn_unused_configs = true
  disallow_any_generics = true
  disallow_subclassing_any = true
  # disallow_untyped_calls = true
  # disallow_untyped_defs = true
  disallow_incomplete_defs = true
  check_untyped_defs = true
  disallow_untyped_decorators = true
  # no_implicit_optional = true
  warn_redundant_casts = true
  warn_unused_ignores = true
  # warn_return_any = true
  # no_implicit_reexport = true
  # strict_equality = true
  
  ### Other strictness flags
  warn_unreachable = true
  disallow_any_unimported = true
  
  ### Output
  show_error_codes = true
  show_error_context = true
  pretty = true
  
  [[tool.mypy.overrides]]
  module = "ruamel.*"
  ignore_missing_imports = true
  
  [[tool.mypy.overrides]]
  
  module = "nornir_napalm.*"
  ignore_missing_imports = true
  
  [[tool.mypy.overrides]]
  module = "nornir_netmiko.*"
  ignore_missing_imports = true
  
  [[tool.mypy.overrides]]
  module = "napalm.*"
  ignore_missing_imports = true
  
  
  [tool.tox]
  legacy_tox_ini = """
  [tox]
  isolated_build = True
  envlist = py,black,mypy,flake8,docs
  testpaths = "tests"
  
  [testenv]
  description = Run pytest and generate report
  deps =
      pytest >= 7.3.0
      pytest-cov >= 4.0.0
  commands = pytest {posargs} --junitxml=test-reports/pytest.xml --cov="{envsitepackagesdir}/nuts" --cov=tests --cov-report xml:test-reports/coverage.xml
  # envsitepackagesdir see: https://tox.readthedocs.io/en/latest/example/pytest.html
  
  
  [testenv:black]
  description = Check formatting with black
  skip_install = true
  deps = black >= 23.3.0
  commands = black --check {posargs} .
  
  [testenv:mypy]
  description = Check typing with mypy
  deps = mypy >= 1.0.1
         types-PyYAML >= 6.0.12.9
  passenv = TERM
  commands = mypy {posargs} nuts tests
  
  [testenv:docs]
  description = Build docs with sphinx
  deps = sphinx >= 6.1.3
  changedir = docs/
  commands = sphinx-build {posargs} source build
  
  [testenv:flake8]
  description = Enforce style with Flake8
  deps = flake8 >= 6.0.0
  commands = flake8 --max-line-length 88 nuts/ tests/
  
  [testenv:pytest-main]
  description = Run project tests against pytest-main branch
  deps =
      git+https://github.com/pytest-dev/pytest.git#main
      pytest-cov >= 4.0.0
  commands = pytest {posargs} --junitxml=test-reports/pytest.xml --cov="{envsitepackagesdir}/nuts" --cov=tests --cov-report xml:test-reports/coverage.xml
  # envsitepackagesdir see: https://tox.readthedocs.io/en/latest/example/pytest.html
  
  """
  