-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathpyproject.toml
More file actions
143 lines (129 loc) · 3.97 KB
/
Copy pathpyproject.toml
File metadata and controls
143 lines (129 loc) · 3.97 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
[dependency-groups]
test = ["pytest>=8.3.4", "pytest-cov>=6.2"]
test-third-party = [
{ include-group = "test" },
"geff[spatial-graph,ctc,rx,pandas]",
"lxml>=6.0.0",
]
dev = [
{ include-group = "test-third-party" },
"ipython>=8.37.0",
"mypy>=1.17.0",
"pre-commit>=4.2.0",
"pyright>=1.1.403",
"ruff>=0.12.5",
"types-networkx>=3.5.0.20250728",
"types-pyyaml>=6.0.12.20250516",
]
docs = [
"mike>=2.1.3",
"mkdocs-api-autonav>=0.3.0",
"mkdocs-include-markdown-plugin>=7.1.6",
"mkdocs-material>=9.6.16",
"mkdocstrings-python>=1.16.12",
"mkdocs-typer>=0.0.3",
"typer>=0.14.0,<0.17.0",
"ruff>=0.12.5",
"typing-extensions>=4.14.1",
"mkdocs-autorefs>=1.0",
"griffe-fieldz",
]
bench = [
{ include-group = "test" },
"pytest-codspeed>=4.0.0",
"geff[rx, spatial-graph]",
]
[tool.uv]
package = false
[tool.uv.sources]
geff = { workspace = true }
geff-spec = { workspace = true }
# define this root as a workspace
[tool.uv.workspace]
members = ["packages/*"]
# https://docs.astral.sh/ruff/rules/
[tool.ruff]
line-length = 100
target-version = "py310"
fix = true
src = ["packages/**/src"]
[tool.ruff.lint]
pydocstyle = { convention = "google" }
extend-select = [
"E", # style errors
"W", # style warnings
"F", # flakes
"I", # isort
"UP", # pyupgrade
"C4", # flake8-comprehensions
"B", # flake8-bugbear
"A001", # flake8-builtins
"ANN", # flake8-annotations
"RUF", # ruff-specific rules
"TID", # tidy imports
"TC", # type checking
"T201", # print statements
"D102", # undocumented public method
"D103", # undocumented public function
"D300", # enforces triple double quotes on docstrings
"D414", # empty/missing docstring section
"D417", # undocumented parameter
]
ignore = [
"ANN401", # disallow Any
"PLC0105", # TypeVar name doesn't reflect covariance
"PT031", # `pytest.warns()` block should contain a single simple statement
]
[tool.ruff.lint.per-file-ignores]
"**/tests/*.py" = ["D", "ANN"]
"scripts/*.py" = ["D"]
"src/geff/_cli.py" = ["T201", ] # allow print statements in CLI
# https://docs.pytest.org/en/6.2.x/customize.html
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["packages"]
pythonpath = ["tests"]
filterwarnings = [
"error",
"ignore:'cgi' is deprecated and slated for removal in Python 3.13",
# if needed, add global ignores here, for example:
# "ignore:Some message:SomeCategory",
"ignore:.*skipping conversion test:ImportWarning:networkx",
"ignore:In the future `np.bool` will be defined as the corresponding NumPy scalar.",
"ignore:(?s).*Pyarrow will become a required dependency:DeprecationWarning",
"ignore:invalid value encountered in cast:RuntimeWarning",
# typer imports click.utils.get_binary_stream, which newer click releases
# (>=8.3) deprecate ahead of removal in Click 9.0; nothing to fix on our end.
"ignore:'click.utils.get_binary_stream' is deprecated.*:DeprecationWarning",
"ignore:'click.utils.get_text_stream' is deprecated.*:DeprecationWarning",
]
# https://mypy.readthedocs.io/en/stable/config_file.html
[tool.mypy]
files = "packages/**/src/**/"
strict = true
disallow_any_generics = false
disallow_subclassing_any = false
show_error_codes = true
pretty = true
plugins = ["pydantic.mypy"]
[tool.pydantic-mypy]
init_forbid_extra = true
[tool.pyright]
include = ["packages/geff/src", "packages/geff-spec/src"]
venv = ".venv"
# https://coverage.readthedocs.io/en/6.4/config.html
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"@overload",
"except ImportError",
"raise NotImplementedError()",
"pass",
'^\s*\.\.\.\s*$', # regex for lines with ONLY ellipses with any amount of whitespace either side.
]
[tool.coverage.run]
source = ["packages/geff/src/geff", "packages/geff-spec/src/geff_spec"]
omit = ["*/__init__.py"]
[tool.typos.default]
extend-ignore-identifiers-re = ["(?i)ome", "ser", "propert"]