-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
108 lines (99 loc) · 2.58 KB
/
pyproject.toml
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
[project]
description = "Monorepo root for nwb-linkml"
dependencies = []
requires-python = "<3.13,>=3.10"
[tool.pdm.dev-dependencies]
dev = [
'-e nwb-linkml @ file:///${PROJECT_ROOT}/nwb_linkml',
'-e nwb-schema-language @ file:///${PROJECT_ROOT}/nwb_schema_language',
'-e nwb-models @ file:///${PROJECT_ROOT}/nwb_models',
'-e docs @ file:///${PROJECT_ROOT}/docs',
"ruff>=0.5.0",
"black>=24.4.2",
]
[tool.pdm.scripts]
build-models = "python scripts/generate_core.py"
[tool.codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = '.git*,*.lock,*.css,./nwb_models/src/nwb_models/models,./nwb_models/src/nwb_models/schema'
check-hidden = true
# ignore-regex = ''
# ignore-words-list = ''
[tool.ruff]
target-version = "py311"
include = ["nwb_linkml/**/*.py", "nwb_schema_language/src/**/*.py", "pyproject.toml"]
exclude = [
"docs",
"nwb_models/src/nwb_models/models/**/*.py",
"nwb_schema_language/src/nwb_schema_language/datamodel/nwb_schema_language.py",
"nwb_schema_language/src/nwb_schema_language/datamodel/nwb_schema_pydantic.py",
"tests/__tmp__/**/*"
]
line-length = 100
[tool.ruff.lint]
select = [
# pycodestyle
"E",
# Pyflakes
"F",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-simplify
"SIM",
# isort
"I",
# annotations
"ANN",
## ----------
# pydocstyle
# undocumented public objects
"D100", "D101", "D102", "D103", "D104", "D106",
# indentation
"D207", "D208", "D209",
# whitespace
"D210", "D211",
# emptiness
"D419",
# perf
"PERF",
# numpy
"NPY",
]
ignore = [
# annotations for *args and **kwargs
"ANN002", "ANN003",
# annoying annotation rules
"ANN101", "ANN102", "ANN401", "ANN204",
# explicit strict arg for zip
"B905",
# builtin type annotations
"UP006", "UP035",
# | for Union types (only supported >=3.10
"UP007", "UP038",
# syntax error in forward annotation with numpydantic
"F722"
]
fixable = ["ALL"]
[tool.ruff.lint.per-file-ignores]
"**/tests/**.py" = ["D", "ANN", "E501", "F841", "F722"]
"nwb_models/src/nwb_models/models/**/*.py" = ["ANN202", "E501", "D", "F722", "UP036", "F403"]
[tool.mypy]
plugins = [
"pydantic.mypy"
]
packages = [
"miniscope_io"
]
exclude = [
'.*vendor.*'
]
follow_imports = "silent"
warn_unreachable = true
[tool.black]
target-version = ['py38', 'py39', 'py310', 'py311']
enable-unstable-feature = ["string_processing"]
preview = true
include = "nwb_linkml/.*\\.py$|nwb_schema_language/.*\\.py$|nwb_models/.*\\.py$"
line-length = 100