-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
140 lines (127 loc) · 4.09 KB
/
pyproject.toml
File metadata and controls
140 lines (127 loc) · 4.09 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
[tool.poetry]
name = "cbl_web_tool"
version = "0.1.0"
description = ""
authors = ["Alex Swindler <axelstudios>", "Nicholas Long <nllong>", "Katherine Fleming <kflemin>", "Roger Braun <roger.braun@nrel.gov>", "Rahman Mian <rahman.mian@nrel.gov>", "Devin Brady <devin.brady@nrel.gov>"]
readme = "README.md"
packages = [
{ include = "flask_app" }
]
[tool.poetry.dependencies]
python = ">=3.9, <3.13"
flask = "^3.0.3"
flask-cors = "^6.0.2"
openpyxl = "^3.1.5"
tqdm = "^4.67.1"
building-data-utilities = "~0.1.0"
# building-data-utilities = { git = "https://github.com/seed-platform/building-data-utilities.git", rev = "develop" }
[tool.poetry.group.dev.dependencies]
pre-commit = "^4.3.0"
pytest = "8.4.2"
pytest-cov = "^7.0.0"
nbformat = "^5.10.4"
folium = "^0.20.0"
osmnx = "^2.0.7"
notebook = "^7.5.2"
types-geopandas = "^1.1.2.20251224"
mypy = "^1.19.1"
[tool.poetry.group.devgit.dependencies]
osmnx = "^2.0.7"
st = "^0.0.8"
[build-system]
# Need to provide the build system information for the package to be built
requires = ["poetry-core", "setuptools", "wheel"]
build-backend = "poetry.core.masonry.api"
# Complete Ruff configuration - single source of truth
[tool.ruff]
fix = true
line-length = 140
target-version = "py39"
[tool.ruff.format]
docstring-code-format = true
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ruff.lint]
# Enable these rules
extend-select = [
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"COM", # flake8-commas
"E", # Error
"F", # Pyflakes
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"PD", # pandas-vet
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PLC", # Pylint Convention
"PLE", # Pylint Error
"PLR", # Pylint Refactor
"PLW", # Pylint Warning
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"T10", # flake8-debugger
"TID", # flake8-tidy-imports
"UP", # pyupgrade
]
# Ignore these specific errors
ignore = [
"A001", # builtin-variable-shadowing
"ARG001", # unused-function-argument
"ARG002", # unused-method-argument
"ARG003", # unused-class-method-argument
"BLE001", # blind-except
"COM812", # missing-trailing-comma (conflicts with formatter)
"COM819", # prohibited-trailing-comma
"E501", # line-too-long (we use 140 chars, not 79)
"ISC001", # single-line-implicit-string-concatenation
"N806", # non-lowercase-variable-in-function
"PLC1901", # compare-to-empty-string
"PLR0402", # manual-from-import
"PLR0911", # too-many-return-statements
"PLR0912", # too-many-branches
"PLR0913", # too-many-arguments
"PLR0915", # too-many-statements
"PLR2004", # magic-value-comparison
"PT009", # pytest-unittest-assertion
"Q000", # bad-quotes-inline-string
"RUF012", # mutable-class-default
"S106", # hardcoded-password-func-arg
"S113", # Probable use of requests call without timeout
"S311", # suspicious-non-cryptographic-random-usage
"S324", # Probable use of insecure hash functions in `hashlib`: `md5`
"S603", # subprocess-without-shell-equals-true
"S607", # start-process-with-partial-path
"S701", # jinja2-autoescape-false
"SIM108", # if-else-block-instead-of-if-exp
"SIM115", # Use context handler for opening files
"UP007", # non-pep604-annotation (use Union instead of | for Python < 3.10)
]
[tool.ruff.lint.per-file-ignores]
"**/tests/test_*" = [
"S101", # assert
"S105", # hardcoded-password-string
"S307", # suspicious-eval-usage
]
"**/migrations/*" = [
"ARG001", # unused-function-argument
"RUF012", # mutable-class-default
]
"**/__init__.py" = [
"F401", # unused-import
"F403", # undefined-local-with-import-star
"I001", # unsorted-imports
]
[tool.ruff.lint.pylint]
# Raise the allowed limits the least possible amount
max-statements = 58
max-branches = 24