-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpyproject.toml
141 lines (132 loc) · 2.6 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 = "solarradinterception"
version = "0.1.0"
description = "Add your description here"
authors = [
{ name = "Gustavo Camargo", email = "[email protected]" }
]
dependencies = [
"environmental-biophysics~=0.0.4",
"matplotlib~=3.9.1",
]
readme = "README.md"
requires-python = ">= 3.8"
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.black]
line-length = 88
[tool.pyright]
venvPath = "." # rye installs the venv in the current dir
venv = ".venv" # in a folder called `.venv`
typeCheckingMode = "basic" # https://microsoft.github.io/pyright/#/comments?id=file-level-type-controls
# strict = ["**/*.py"] use 'strict' checking on all files
pythonVersion = "3.12" # if library, specify the _lowest_ you supportjkhhk
[tool.pytest.ini_options]
pythonpath = "."
addopts = "--doctest-modules"
[tool.taskipy.tasks]
coverage = "coverage html && open htmlcov/index.html"
docs = "mkdocs serve"
#test = "pytest -s -x --cov=pylme -vv"
# Ruff config
[tool.ruff]
extend-exclude = ["tests"]
line-length = 88
indent-width = 4
[tool.ruff.lint]
preview = true
select = [
# pycodestyle
"E",
"W",
# mccabe (code complexity)
# "C90",
# Pyflakes
"F",
# pep8-naming,
"N",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-simplify
"SIM",
# isort
"I",
# Others
"YTT",
"ANN",
"S", # bandit
"FBT",
"A",
"COM",
"C4",
"DTZ",
"T10",
"FA",
"ISC",
"ICN",
"G",
"INP",
"PIE",
# "T20", # print finder
"PYI",
"PT",
"Q",
"RSE",
"RET",
"SLF",
"SLOT",
"SIM",
"TID",
"TCH",
"INT",
"ARG",
# "PTH", # change from strings to path obj
"TD",
"FIX",
"ERA",
"PD",
"PGH",
"PL",
"TRY",
"FLY",
"NPY",
"AIR",
"PERF",
"FURB",
"LOG",
"RUF"
]
ignore = ["ANN202",
"S101",
"RET504",
"PD901",
"PLR0912",
"PLR0913",
"ISC001", # conflicts with COM812
"FURB101", # not complain with open
"PLW1514", # not complain with open
"PTH123", # not complain with open
"TRY003",
"B023", # affects pandas lambda apply
"PD015", # let's use pd.merge
"COM812", # conficts stuff
"PLR0914", # too many local variables > 15
"PLR0915" # Too many statements (> 50)
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.rye]
managed = true
dev-dependencies = [
"pyright~=1.1.373",
"pytest~=8.3.2",
]
[tool.rye.scripts]
fmt = "rye fmt"
lint = "rye lint --fix"
check = "pyright"
test = "rye test"
all = { chain = ["fmt", "lint", "check", "test"] }