# Not an installable distribution: no [project] table and no build backend. # Development environment (pip 25.1 or newer reads PEP 735 dependency groups): # python3 -m venv .venv && .venv/bin/pip install --group dev # The plugin itself needs only the Python standard library; numpy and scipy are installed # at the user's request by `modell/kjor.py miljo --opprett` (pins in modell/requirements.txt). [dependency-groups] dev = [ "numpy==2.5.4", "scipy==1.18.1", "pytest==9.2.0", "ruff==0.17.4", "mypy==2.4.1", ] [tool.ruff] target-version = "py39" # kjor.py and kontroll.py must run on Python 3.9 line-length = 120 extend-exclude = ["modell/kjerne"] # unmodified copy of the note's code: never linted or reformatted [tool.ruff.lint] select = ["ALL"] ignore = [ "T201", # a command-line tool that talks to the user with print() "S603", # subprocess is always called with a fixed argument list, never through a shell "INP001", # modell/ and tests/ are folders of scripts, not packages "N818", # exception names are Norwegian (Bruksfeil already ends in "feil", error) "D401", # docstrings are Norwegian; the imperative-mood check only knows English verbs ] [tool.ruff.lint.pydocstyle] convention = "pep257" [tool.ruff.lint.per-file-ignores] "tests/*" = [ "S101", # pytest uses assert "PLR2004", # exit codes and counts are compared as literals in tests "D103", # test names describe the behaviour under test; a docstring would repeat them ] [tool.mypy] strict = true files = ["modell", "tests"] mypy_path = "modell" exclude = ['^modell/kjerne/', '^\.venv/'] # mypy 2.x cannot target Python 3.9 (it requires 3.10 or newer); Python 3.9 compatibility of # kjor.py and kontroll.py is checked by ruff (target-version) and by a test that runs them on 3.9. [tool.pytest.ini_options] testpaths = ["tests"] pythonpath = ["modell"] addopts = "-m 'not treg'" markers = [ "treg: runs sim.py in full (about 1-2 minutes); deselected by default, run with -m treg", ]