generated from ucgmsim/template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
162 lines (146 loc) · 3.87 KB
/
pyproject.toml
File metadata and controls
162 lines (146 loc) · 3.87 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "workflow"
authors = [{ name = "QuakeCoRE" }]
description = "Next generation workflow powered by cylc."
readme = "README.md"
requires-python = ">=3.12"
dynamic = ["version"]
dependencies = [
# UCGMSim Dependencies
"im-calculation>=2025.12.5",
"velocity-modelling>=2026.2.1",
"nshmdb>=2025.12.1",
"oq_wrapper>=2025.12.3",
"qcore-utils>=2025.12.2",
"source_modelling>=2025.12.1",
# Data Formats
"geopandas",
"pandas[parquet, hdf5]",
"pyyaml",
"xarray[io]",
# Numerics
"numpy",
"scipy",
"shapely",
# CLI
"tqdm",
"typer",
# Misc.
"requests", # For gcmt-to-realisation
"schema", # For loading realisations
"structlog", # Logging.
"psutil", # To get the CPU affinity for jobs
]
[project.optional-dependencies]
test = [
"pytest>=6.0.0", # required for the tool.pytest section
"hypothesis[numpy]>=6.0.0",
]
types = ["pandas-stubs", "types-geopandas", "types-requests", "scipy-stubs"]
dev = ["ruff", "deptry", "ty", "numpydoc"]
[tool.deptry]
pep621_dev_dependency_groups = ["test", "dev", "types"]
[project.scripts]
nshm2022-to-realisation = "workflow.scripts.nshm2022_to_realisation:app"
gcmt-to-realisation = "workflow.scripts.gcmt_to_realisation:app"
realisation-to-srf = "workflow.scripts.realisation_to_srf:app"
generate-domain = "workflow.scripts.generate_domain:app"
generate-velocity-model = "workflow.scripts.generate_velocity_model:app"
generate-station-coordinates = "workflow.scripts.generate_station_coordinates:app"
generate-model-coordinates = "workflow.scripts.generate_model_coordinates:app"
generate-rupture-propagation = "workflow.scripts.generate_rupture_propagation:app"
copy-domain-parameters = "workflow.scripts.copy_velocity_model_parameters:app"
create-e3d-par = "workflow.scripts.create_e3d_par:app"
generate-stoch = "workflow.scripts.generate_stoch:app"
merge-ts = "workflow.scripts.merge_ts:app"
hf-sim = "workflow.scripts.hf_sim:app"
bb-sim = "workflow.scripts.bb_sim:app"
im-calc = "workflow.scripts.im_calc:app"
check-srf = "workflow.scripts.check_srf:app"
check-domain = "workflow.scripts.check_domain:app"
gcmt-auto-simulate = "workflow.scripts.gcmt_auto_simulate:app"
import-realisation = "workflow.scripts.import_realisation:app"
lf-to-xarray = "workflow.scripts.lf_to_xarray:app"
[tool.setuptools.package-dir]
workflow = "workflow"
[tool.setuptools_scm]
[tool.pytest]
markers = ["slow: mark test as slow."]
[tool.ruff.lint]
extend-select = [
# isort imports
"I",
# Use r'\s+' rather than '\s+'
"W605",
# All the naming errors, like using camel case for function names.
"N",
# Missing docstrings in classes, methods, and functions
"D101",
"D102",
"D103",
"D105",
"D107",
# Use f-string instead of a format call
"UP032",
# Standard library import is deprecated
"UP035",
# Missing function argument type-annotation
"ANN001",
"ANN002",
"ANN003",
"ANN201",
"ANN202",
"ANN204",
"ANN205",
"ANN206",
# Using except without specifying an exception type to catch
"BLE001",
]
ignore = ["D104"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.isort]
known-first-party = [
"source_modelling",
"workflow",
"pygmt_helper",
"qcore",
"empirical",
"nshmdb",
"IM",
"mera",
"velocity_modelling",
]
[tool.ruff.lint.per-file-ignores]
# Ignore no docstring in __init__.py
"__init__.py" = ["D104"]
# Ignore docstring errors in tests folder
"tests/**.py" = ["D"]
[tool.coverage.run]
omit = ["workflow/scripts/*.py"]
[tool.numpydoc_validation]
checks = [
"GL05",
"GL08",
"GL10",
"PR01",
"PR02",
"PR03",
"PR04",
"PR05",
"PR06",
"PR07",
"RT01",
"RT02",
"RT03",
"RT04",
"YD01",
]
# remember to use single quotes for regex in TOML
exclude = [ # don't report on objects that match any of these regex
'\.undocumented_method$',
'\.__repr__$',
]