Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,33 @@ repos:
- id: check-merge-conflict
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.15.13"
rev: "v0.16.7"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v2.1.0"
rev: "v2.3.1"
hooks:
- id: mypy
additional_dependencies:
[types-requests, types-PyYAML]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.44.0
rev: v0.49.1
hooks:
- id: markdownlint
args: ["--disable", "MD013", "--disable", "MD025", "--"]

- repo: https://github.com/codespell-project/codespell
rev: v2.4.2
rev: v2.4.3
hooks:
- id: codespell
name: Check common misspellings in text files with codespell.
additional_dependencies:
- tomli

- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.21.2
rev: v2.29.4
hooks:
- id: pyproject-fmt
name: Apply a consistent format to pyproject.toml
Expand Down
1 change: 1 addition & 0 deletions docs/parameters_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ There may be cases where you want to change existing parameter groups, such as i
```python
from swmmanywhere.parameters import register_parameter_group, TopologyDerivation, Field


@register_parameter_group("topology_derivation")
class NewTopologyDerivation(TopologyDerivation):
new_weight_scaling: float = Field(
Expand Down
37 changes: 20 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: GIS",
"Typing :: Typed",
Expand Down Expand Up @@ -91,15 +92,15 @@ urls.Issues = "https://github.com/ImperialCollegeLondon/SWMManywhere/issues"
urls.Source = "https://github.com/ImperialCollegeLondon/SWMManywhere"

[tool.hatch]
version.source = "vcs"
metadata.license = "BSD-3-clause" # Or your primary license name
metadata.license-files = [ "LICENSE", "src/netcomp/LICENSE.txt" ]
build.hooks.vcs.version-file = "_version.py"
build.targets.sdist.exclude = [
"*.zip",
]
build.targets.wheel.only-include = [ "src" ]
build.targets.wheel.sources = [ "src" ]
metadata.license = "BSD-3-clause" # Or your primary license name
metadata.license-files = [ "LICENSE", "src/netcomp/LICENSE.txt" ]
version.source = "vcs"

[tool.ruff]
lint.select = [ "D", "E", "F", "I" ] # pydocstyle, pycodestyle, Pyflakes, isort
Expand All @@ -111,46 +112,48 @@ lint.isort.required-imports = [ "from __future__ import annotations" ]
lint.pydocstyle.convention = "google"

[tool.codespell]
skip = "src/swmmanywhere/defs/iso_converter.yml,*.inp,docs/paper/*"
ignore-words-list = "gage,gages,Carrer,anc"
skip = "src/swmmanywhere/defs/iso_converter.yml,*.inp,docs/paper/*"

[tool.mypy]
exclude = [ ".venv/" ]
disallow_any_explicit = false
disallow_any_generics = false
warn_unreachable = true
warn_unused_ignores = false
disallow_untyped_defs = false
exclude = [ ".venv/" ]
warn_unused_ignores = false
warn_unreachable = true
overrides = [ { module = "tests.*", disallow_untyped_defs = false } ]

[tool.pytest]
ini_options.addopts = "-v --cov=src/swmmanywhere --cov-report=xml --doctest-modules --ignore=src/swmmanywhere/logging.py"
ini_options.addopts = """\
-v --cov=src/swmmanywhere --cov-report=xml --doctest-modules --ignore=src/swmmanywhere/logging.py\
"""
ini_options.markers = [
"downloads: mark a test as requiring downloads",
]

[tool.coverage]
run.branch = true
run.omit = [
"**/__init__.py",
]
run.source = [
"swmmanywhere",
]
run.omit = [
"**/__init__.py",
]
run.branch = true
paths.omit = [
"**/__init__.py",
]
paths.source = [ "src", "*/site-packages" ]
report.omit = [
"**/__init__.py",
]
report.exclude_lines = [
"if TYPE_CHECKING:",
]
report.ignore_errors = true
report.omit = [
"**/__init__.py",
]

[tool.refurb]
ignore = [
184, # Because some frankly bizarre suggestions
109, # Because pyyaml doesn't support tuples
184, # Because some frankly bizarre suggestions
109, # Because pyyaml doesn't support tuples
]
Loading