-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
141 lines (120 loc) · 3.47 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
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
[project]
name = "usaon_benefit_tool"
description = "Gather data for US AON's Value Tree Analysis (Benefit Tool) process"
version = "2.4.0"
url = "[email protected]:nsidc/usaon-benefit-tool.git"
authors = [
{name = "National Snow and Ice Data Center", email = "[email protected]"},
]
packages = ["usaon_benefit_tool"]
include_package_data = true
[tool.black]
target-version = ["py311"]
skip-string-normalization = true
[tool.mypy]
python_version = "3.11"
incremental = true
warn_unused_configs = true
warn_unreachable = true
# disallow_untyped_defs = true
# disallow_incomplete_defs = true
# strict = true
[[tool.mypy.overrides]]
module = [
"flask_bootstrap.*",
"flask_wtf.*",
"flask_dance.*",
"flask_login.*",
"flask_pydantic.*",
"leafmap.*",
"sqlalchemy.*",
"wtforms.*",
"wtforms_sqlalchemy.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "usaon_benefit_tool.*"
# disallow_untyped_defs = true
# disallow_incomlete_defs = true
[tool.ruff]
target-version = "py311"
select = [
"F", # pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"C90", # mccabe
"I", # isort
"N", # pep8-naming
"D", # pydostyle
"UP", # pyupgrade
"YTT", # flake8-2020
"FBT", # flake8-boolean-trap
"B", # flake8-bugbear
"A", # flake8-builtins
"COM", # flake8-commas
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
# "EM", # flake8-errmsg
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"PL", # PyLint
# "FURB", # refurb
"RUF", # Ruff
]
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"
# RUF010: !a, !r, !s are too magical for me.
"D1", "D203", "D213", "RUF010",
# Rules ignored on switch to `ruff`
# TODO: re-enable and fix these!
# N806: Variable name should be lowercase
"N806",
]
[tool.ruff.lint.per-file-ignores]
# E501: Line too long. Long strings, e.g. URLs, are common in config.
"usaon_benefit_tool/models/tables.py" = ["A003"]
"tasks/format.py" = ["A001"]
"tasks/*" = ["ARG"]
"usaon_benefit_tool/forms.py" = ["N802"]
"usaon_benefit_tool/routes/__init__.py" = ["F401", "I001"]
"usaon_benefit_tool/__init__.py" = ["E501", "PLR0915"]
"migrations/*" = ["INP001"]
[tool.ruff.lint.isort]
known-third-party = ["luigi"]
[tool.ruff.lint.mccabe]
max-complexity = 8
[tool.ruff.lint.flake8-quotes]
inline-quotes = "double"
[tool.bumpversion]
current_version = "2.4.0"
commit = false
tag = false
[[tool.bumpversion.files]]
filename = "usaon_benefit_tool/constants/version.py"
search = '^VERSION = "{current_version}"'
replace = 'VERSION = "{new_version}"'
[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = '^version = "{current_version}"$'
replace = 'version = "{new_version}"'
[[tool.bumpversion.files]]
filename = "CITATION.cff"
search = '^version: {current_version}'
replace = 'version: {new_version}'
[[tool.bumpversion.files]]
filename = "CITATION.cff"
search = '^date-released: "\d{{4}}-\d{{2}}-\d{{2}}"'
replace = 'date-released: "{now:%Y-%m-%d}"'
[[tool.bumpversion.files]]
filename = "CHANGELOG.md"
search = "^## NEXT_VERSION"
replace = "## v{new_version} ({now:%Y-%m-%d})"
[[tool.bumpversion.files]]
filename = "VERSION.env"
search = '^export USAON_BENEFIT_TOOL_VERSION="v{current_version}"'
replace = 'export USAON_BENEFIT_TOOL_VERSION="v{new_version}"'