/
pyproject.toml
108 lines (88 loc) · 2.5 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]
name = "snow_today_webapp_ingest"
description = "Ingest tool for data backing the Snow Today viewer webapp"
readme = "README.md"
# TODO: Version bumping
version = "0.0.0"
[project.urls]
repository = "https://github.com/nsidc/snow-today-webapp-server"
[project.scripts]
snow-today-webapp-ingest = "snow_today_webapp_ingest.cli:cli"
[tool.setuptools.packages.find]
include = ["snow_today_webapp_ingest"]
namespaces = false
[tool.mypy]
python_version = "3.12"
incremental = true
# follow_imports = silent
show_error_codes = true
check_untyped_defs = true
# warn_redundant_casts = true
warn_unreachable = true
warn_unused_ignores = true
# disallow_any_generics = true
strict_optional = true
plugins = [
"pydantic.mypy"
]
# Modules without type stubs:
[[tool.mypy.overrides]]
module = [
"matplotlib.*",
"deepdiff.*",
"invoke.*",
"osgeo.*",
"geopandas.*",
]
ignore_missing_imports = true
# Stricter rules for our own code than our dependencies
# TODO: Enable!!!
[[tool.mypy.overrides]]
module = "snow_today_webapp_ingest.*"
# disallow_untyped_defs = true
# disallow_incomplete_defs = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
[tool.black]
target-version = ['py312']
skip-string-normalization = true
[tool.ruff]
target-version = "py310"
select = [
"F", # pyflakes
"E", # pycodestyle warnings
"W", # pycodestyle warnings
"C4", # flake8-comprehensions
"C90", # mccabe
"I", # isort
"N", # pep8-naming
"D", # pydocstyle
"UP", # pyupgrade
"YTT", # flake8-2020
"B", # flake8-bugbear
"A", # flake8-builtins
"T10", # flake8-debugger
"TID", # flake8-tidy-imports
"RUF", # ruff-specific rules
]
ignore = [
# D1: Ignore errors requiring docstrings on everything.
# D203: "1 blank line required before class docstring"
# D213: "Multi-line docstring summary should start at the second line"
# E731: Lambda assignments are OK, use your best judgement.
# RUF010: !a, !r, !s are too magical for me.
"D1", "D203", "D213", "E731", "RUF010",
]
[tool.ruff.per-file-ignores]
"snow_today_webapp_ingest/types_/base.py" = ["TID251"]
[tool.ruff.flake8-tidy-imports.banned-api]
"pydantic.BaseModel".msg = "Use `snow_today_webapp_ingest.types_.base.BaseModel` instead."
"pydantic.RootModel".msg = "Use `snow_today_webapp_ingest.types_.base.RootModel` instead."
[tool.ruff.isort]
known-first-party = ["snow_today_webapp_ingest"]
[tool.ruff.mccabe]
max-complexity = 8
[tool.ruff.flake8-quotes]
inline-quotes = "double"