generated from os-climate/python-template-repository
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
142 lines (125 loc) · 3.02 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
142
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm]
package-dir = "src"
[project]
name = "osc-physrisk-financial"
description = "Physical climate risk financial valuation"
readme = "README.md"
dynamic = ["version"]
keywords = ["Financial risk", "climate", "Physical risk"]
authors = [
{name = "Arfima Dev", email = "[email protected]"},
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
]
dependencies = [
"scipy>=1.10.1",
"pandas>=2.0.3",
"plotly>=5.15",
"numpy>=1.24",
]
license = {text = "Apache-2.0"}
requires-python = ">=3.10"
[project.urls]
"Homepage" = "https://github.com/os-climate/osc-physrisk-financial"
"Documentation" = "https://github.com/os-climate/osc-physrisk-financial"
"Bug Tracker" = "https://github.com/os-climate/osc-physrisk-financial/issues"
[project.optional-dependencies]
docs = [
"myst_parser>=3.0.1",
"pydata_sphinx_theme>=0.15.4",
"sphinx>=7.3.7",
"sphinx_design>=0.6.0"
]
lint = ["pre-commit"]
test = [
"pdm[pytest]",
"pytest",
"pytest-cov",
]
tox = ["tox", "tox-pdm"]
[tool.pdm.version]
source = "scm"
write_to = "osc_physrisk_financial/_version.py"
write_template = "version: str\n__version__: str\n__version__ = version = '{}'\n"
# Semver like tag, ignore after + or -
# tag_regex = '^(?:[\w-]+-)?(?P<version>[vV]?\d+(?:\.\d+){0,2}[^\+-]*?)(?:\-.*)?(?:\+.*)?(?:\-.*)?$'
# PyPa-compliant (Removing trailing (?:\.dev(?:\d+))? as it would be handled by PDM)
tag_regex = '^(?P<version>[vV]??(?:(?:\d+)(?:\.(?:\d+))*)(?:(?:a|b|rc|alpha|beta|c)(?:\d+)?)?(?:\.post(?:\d+))?)$'
[tool.pytest.ini_options]
testpaths = [
"tests/",
]
addopts = "--cov=src --cov-report html --cov-report term-missing --cov-fail-under 65"
[tool.coverage.run]
source = ["src"]
[tool.mypy]
ignore_missing_imports = true
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
[tool.ruff.lint]
extend-fixable = [
# Instead of trailing-whitespace
"W291", "W293"
]
extend-select = [
# Instead of pydocstyle
"D",
#Instead of flake8
"E", "F","B",
# Instead of pep8-naming
"N",
# Instead of flake8-debugger or debug-statements
"T10",
]
ignore = [
"E203",
"E501",
# Avoid incompatible rules
"D203",
"D213",
]
[tool.ruff.lint.extend-per-file-ignores]
# Ignore `D` rules everywhere except for the `src/` directory.
"!src/**.py" = ["D"]
[tool.ruff.lint.pycodestyle]
max-line-length = 160
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = false
docstring-code-line-length = "dynamic"