nwb-linkml/pyproject.toml

108 lines
2.6 KiB
TOML
Raw Permalink Normal View History

2024-07-01 23:19:13 +00:00
[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',
2024-07-01 23:19:13 +00:00
'-e docs @ file:///${PROJECT_ROOT}/docs',
2024-07-02 04:22:35 +00:00
"ruff>=0.5.0",
"black>=24.4.2",
2024-07-02 02:07:12 +00:00
]
[tool.pdm.scripts]
build-models = "python scripts/generate_core.py"
2024-07-02 02:07:12 +00:00
[tool.codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
2024-08-16 06:31:40 +00:00
skip = '.git*,*.lock,*.css,./nwb_models/src/nwb_models/models,./nwb_models/src/nwb_models/schema'
2024-07-02 02:07:12 +00:00
check-hidden = true
# ignore-regex = ''
2024-07-02 04:22:35 +00:00
# ignore-words-list = ''
[tool.ruff]
target-version = "py311"
include = ["nwb_linkml/**/*.py", "nwb_schema_language/src/**/*.py", "pyproject.toml"]
exclude = [
"docs",
2024-08-16 06:31:40 +00:00
"nwb_models/src/nwb_models/models/**/*.py",
2024-07-02 04:22:35 +00:00
"nwb_schema_language/src/nwb_schema_language/datamodel/nwb_schema_language.py",
"nwb_schema_language/src/nwb_schema_language/datamodel/nwb_schema_pydantic.py",
2024-07-03 08:51:48 +00:00
"tests/__tmp__/**/*"
2024-07-02 04:22:35 +00:00
]
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
2024-07-02 05:09:49 +00:00
"D100", "D101", "D102", "D103", "D104", "D106",
2024-07-02 04:22:35 +00:00
# indentation
2024-07-02 05:09:49 +00:00
"D207", "D208", "D209",
2024-07-02 04:22:35 +00:00
# whitespace
"D210", "D211",
# emptiness
"D419",
# perf
"PERF",
# numpy
"NPY",
2024-07-02 04:22:35 +00:00
]
ignore = [
2024-07-02 06:52:32 +00:00
# annotations for *args and **kwargs
"ANN002", "ANN003",
# annoying annotation rules
2024-07-02 04:22:35 +00:00
"ANN101", "ANN102", "ANN401", "ANN204",
# explicit strict arg for zip
"B905",
# builtin type annotations
"UP006", "UP035",
# | for Union types (only supported >=3.10
"UP007", "UP038",
2024-08-07 02:57:45 +00:00
# syntax error in forward annotation with numpydantic
"F722"
2024-07-02 04:22:35 +00:00
]
fixable = ["ALL"]
2024-07-02 05:09:49 +00:00
[tool.ruff.lint.per-file-ignores]
2024-07-02 05:58:55 +00:00
"**/tests/**.py" = ["D", "ANN", "E501", "F841", "F722"]
2024-08-16 06:31:40 +00:00
"nwb_models/src/nwb_models/models/**/*.py" = ["ANN202", "E501", "D", "F722", "UP036", "F403"]
2024-07-02 05:09:49 +00:00
2024-07-02 04:22:35 +00:00
[tool.mypy]
plugins = [
"pydantic.mypy"
]
packages = [
"miniscope_io"
]
exclude = [
'.*vendor.*'
]
follow_imports = "silent"
warn_unreachable = true
[tool.black]
target-version = ['py38', 'py39', 'py310', 'py311']
2024-07-02 05:09:49 +00:00
enable-unstable-feature = ["string_processing"]
preview = true
include = "nwb_linkml/.*\\.py$|nwb_schema_language/.*\\.py$|nwb_models/.*\\.py$"
2024-07-02 04:22:35 +00:00
line-length = 100