-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
88 lines (77 loc) · 2.8 KB
/
Copy pathpyproject.toml
File metadata and controls
88 lines (77 loc) · 2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/cit"]
[project.scripts]
cit = "cit.__main__:main"
[project]
name = "confluence-contracts"
version = "0.1.0"
description = "A tool to support Confluence development testing"
authors = [
{ name = "Nikki Tebaldi", email = "ntebaldi@uchicago.edu" }
]
license = "BSD-3-Clause"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"netcdf4>=1.7.4",
"numpy>=2.4.6",
"pydantic>=2.13.4",
"pyyaml>=6.0.3",
]
[project.urls]
Repository = "https://github.com/SWOT-Confluence/confluence-contracts"
Issues = "https://github.com/SWOT-Confluence/confluence-contracts/issues"
[tool.uv]
# install the test tooling on a plain `uv sync` / `uv run` so ruff & pytest are always present
default-groups = ["test"]
[dependency-groups]
test = [
"openpyxl>=3.1.5",
"pytest>=9.1.1",
"ruff>=0.15.22",
]
[tool.ruff]
line-length = 100
[tool.ruff.lint]
extend-select = [
# by default, ruff enables all F and a subset of E rules
# for a description of rulesets and examples, see:
# https://docs.astral.sh/ruff/rules/
"ANN", # flake8-annotations - type annotations, some ignored
"B", # bugbear - identifies likely bugs
"C4", # flake8-comprehensions - identifies redundant calls in comprehensions
"D", # pydocstyle - requires docstrings on all public modules/functions/classes
"I", # isort
"N801", # pep8-naming - enforce ClassNamesStyle
"N804", # pep8-naming - first arg of classmethod should be cls
"N805", # pep8-naming - first arg of method should be self
"PD", # pandas-vet
"PLR2004",# Pylint no magic values!
"PTH", # prefer pathlib over os.path as seems to be the consensus
"Q", # flake8-quotes - double quotes preferred (like black)
"S", # flake8-bandit - security checks
"UP", # pyupgrade - requires preferred syntax in newer python versions
"YTT", # flake8-2020 - corrects code that doesn't anticipate 2 digit python minor version
]
ignore = [
"D415", # allow first line of doctstrings to end without punctuation
"ANN002", # missing type on *args
"ANN003", # missing type on **kwargs
"B905", # won't work on python <3.10
"S101", # allow assertions
]
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = [
"ANN001", # missing type annotation for function arguments
"ANN201", # missing return type annotation for public functions
"ANN202", # missing return type annotation for private functions
"ANN204", # missing return type annotation for special methods (e.g. __enter__, __exit__)
"D102", # missing docstring in public method
"D103", # missing docstring in public function (test functions)
"PLR2004",# magic values in test assertions are expected
]
[tool.ruff.lint.pydocstyle]
convention = "google"