extremeweatherbench 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. extremeweatherbench-1.0.0/.gitignore +15 -0
  2. extremeweatherbench-1.0.0/LICENSE +21 -0
  3. extremeweatherbench-1.0.0/PKG-INFO +182 -0
  4. extremeweatherbench-1.0.0/README.md +105 -0
  5. extremeweatherbench-1.0.0/pyproject.toml +181 -0
  6. extremeweatherbench-1.0.0/src/extremeweatherbench/__init__.py +339 -0
  7. extremeweatherbench-1.0.0/src/extremeweatherbench/_cape.py +741 -0
  8. extremeweatherbench-1.0.0/src/extremeweatherbench/calc.py +873 -0
  9. extremeweatherbench-1.0.0/src/extremeweatherbench/cases.py +193 -0
  10. extremeweatherbench-1.0.0/src/extremeweatherbench/data/events.yaml +4044 -0
  11. extremeweatherbench-1.0.0/src/extremeweatherbench/data/long_events.yaml +48 -0
  12. extremeweatherbench-1.0.0/src/extremeweatherbench/defaults.py +420 -0
  13. extremeweatherbench-1.0.0/src/extremeweatherbench/derived.py +579 -0
  14. extremeweatherbench-1.0.0/src/extremeweatherbench/evaluate.py +979 -0
  15. extremeweatherbench-1.0.0/src/extremeweatherbench/evaluate_cli.py +206 -0
  16. extremeweatherbench-1.0.0/src/extremeweatherbench/events/__init__.py +0 -0
  17. extremeweatherbench-1.0.0/src/extremeweatherbench/events/atmospheric_river.py +216 -0
  18. extremeweatherbench-1.0.0/src/extremeweatherbench/events/severe_convection.py +333 -0
  19. extremeweatherbench-1.0.0/src/extremeweatherbench/events/tropical_cyclone.py +1001 -0
  20. extremeweatherbench-1.0.0/src/extremeweatherbench/inputs.py +1332 -0
  21. extremeweatherbench-1.0.0/src/extremeweatherbench/metrics.py +1964 -0
  22. extremeweatherbench-1.0.0/src/extremeweatherbench/regions.py +673 -0
  23. extremeweatherbench-1.0.0/src/extremeweatherbench/sources/__init__.py +40 -0
  24. extremeweatherbench-1.0.0/src/extremeweatherbench/sources/base.py +67 -0
  25. extremeweatherbench-1.0.0/src/extremeweatherbench/sources/pandas_dataframe.py +190 -0
  26. extremeweatherbench-1.0.0/src/extremeweatherbench/sources/polars_lazyframe.py +220 -0
  27. extremeweatherbench-1.0.0/src/extremeweatherbench/sources/xarray_dataarray.py +117 -0
  28. extremeweatherbench-1.0.0/src/extremeweatherbench/sources/xarray_dataset.py +134 -0
  29. extremeweatherbench-1.0.0/src/extremeweatherbench/utils.py +846 -0
@@ -0,0 +1,15 @@
1
+ *.egg-info
2
+ .DS_Store
3
+ build/
4
+ dist/
5
+ __pycache__/
6
+ .pytest_cache
7
+ *.py[oc]
8
+ wheels/
9
+ .python-version
10
+ .venv
11
+ .ipynb_checkpoints/
12
+ .coverage*
13
+ .mypy_cache
14
+ .vscode/
15
+ docs/source/_build/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Brightband
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,182 @@
1
+ Metadata-Version: 2.4
2
+ Name: extremeweatherbench
3
+ Version: 1.0.0
4
+ Summary: Benchmarking weather and weather AI models using extreme events
5
+ Project-URL: Documentation, https://extremeweatherbench.readthedocs.io/
6
+ Project-URL: Repository, https://github.com/brightbandtech/extremeweatherbench
7
+ License: MIT License
8
+
9
+ Copyright (c) 2025 Brightband
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
28
+ License-File: LICENSE
29
+ Keywords: benchmarking,climate,extreme events,forecasting,weather
30
+ Classifier: Intended Audience :: Science/Research
31
+ Classifier: License :: OSI Approved :: MIT License
32
+ Classifier: Operating System :: OS Independent
33
+ Classifier: Programming Language :: Python :: 3
34
+ Classifier: Programming Language :: Python :: 3.11
35
+ Classifier: Programming Language :: Python :: 3.12
36
+ Classifier: Programming Language :: Python :: 3.13
37
+ Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
38
+ Requires-Python: <3.14,>=3.11
39
+ Requires-Dist: cartopy==0.24.1
40
+ Requires-Dist: click>=8.1.8
41
+ Requires-Dist: dacite>=1.8.1
42
+ Requires-Dist: eccodes==2.42.0
43
+ Requires-Dist: flox>=0.10.0
44
+ Requires-Dist: frozenlist==1.5.0
45
+ Requires-Dist: gcsfs>=2024.12.0
46
+ Requires-Dist: geopandas>=1.0.1
47
+ Requires-Dist: joblib>=1.4.2
48
+ Requires-Dist: kerchunk[dev]
49
+ Requires-Dist: numba>=0.63.1
50
+ Requires-Dist: numpy>=2.2.0
51
+ Requires-Dist: pandas>=2.2.3
52
+ Requires-Dist: polars>=1.32.1
53
+ Requires-Dist: pyarrow>=19.0.1
54
+ Requires-Dist: pyogrio==0.10.0
55
+ Requires-Dist: pyyaml>=6.0.2
56
+ Requires-Dist: regionmask>=0.13.0
57
+ Requires-Dist: s3fs>=2024.12.0
58
+ Requires-Dist: scikit-image>=0.25.2
59
+ Requires-Dist: scores>=2.4.0
60
+ Requires-Dist: sparse>=0.17.0
61
+ Requires-Dist: tqdm>=4.67.1
62
+ Requires-Dist: xarray[io]>=2025.7.1
63
+ Requires-Dist: zarr<4,>=3.0.9
64
+ Provides-Extra: data-prep
65
+ Requires-Dist: fsspec>=2024.12.0; extra == 'data-prep'
66
+ Requires-Dist: icechunk>=1.1.14; extra == 'data-prep'
67
+ Requires-Dist: matplotlib>=3.10.0; extra == 'data-prep'
68
+ Requires-Dist: obstore>=0.8.2; extra == 'data-prep'
69
+ Requires-Dist: scipy>=1.13; extra == 'data-prep'
70
+ Requires-Dist: seaborn>=0.13.2; extra == 'data-prep'
71
+ Requires-Dist: ujson>=5.10.0; extra == 'data-prep'
72
+ Requires-Dist: virtualizarr==2.1.2; extra == 'data-prep'
73
+ Provides-Extra: multiprocessing
74
+ Requires-Dist: dask[complete]>=2025.1.0; extra == 'multiprocessing'
75
+ Requires-Dist: distributed>=2025.1.0; extra == 'multiprocessing'
76
+ Description-Content-Type: text/markdown
77
+
78
+ # Extreme Weather Bench (EWB)
79
+
80
+ [![Documentation Status](https://readthedocs.org/projects/extremeweatherbench/badge/?version=latest)](https://extremeweatherbench.readthedocs.io/en/latest/?badge=latest)
81
+
82
+ **EWB is currently in limited pre-release. Bugs are likely to occur for now.**
83
+
84
+ **v1.0 to be published alongside EWB preprint.**
85
+
86
+ [Read our blog post here](https://www.brightband.com/blog/extreme-weather-bench)
87
+
88
+ As AI weather models are growing in popularity, we need a standardized set of community driven tests that evaluate the models across a wide variety of high-impact hazards. Extreme Weather Bench (EWB) builds on the successful work of WeatherBench and introduces a set of high-impact weather events, spanning across multiple spatial and temporal scales and different parts of the weather spectrum. We provide data to use for testing, standard metrics for evaluation by forecasters worldwide for each of the phenomena, as well as impact-based metrics. EWB is a community system and will be adding additional phenomena, test cases and metrics in collaboration with the worldwide weather and forecast verification community.
89
+
90
+ # Events
91
+ EWB has cases broken down by multiple event types within `src/extremeweatherbench/data/events.yaml` between 2020 and 2024. EWB case studies are documented [here](docs/events/AllCaseStudies.md).
92
+
93
+ ## Available:
94
+
95
+ | Event Type | Number of Cases |
96
+ | ---------- | --------------- |
97
+ | 🌇 Heat Waves | 46 |
98
+ | 🧊 Freezes | 14 |
99
+ | 🌀 Tropical Cyclones | 106 |
100
+ | ☔️ Atmospheric Rivers | 56 |
101
+ | 🌪️ Severe Convection | 115 |
102
+ | **Total Cases** | 337 |
103
+
104
+ # EWB paper and talks
105
+
106
+ * AMS 2025 talk: https://ams.confex.com/ams/105ANNUAL/meetingapp.cgi/Paper/451220
107
+ * EWB paper is in preparation and will be submitted in late 2025
108
+
109
+ # How do I suggest new data, metrics, or otherwise get involved?
110
+
111
+ We welcome your involvement! The success of a benchmark suite rests on community involvement and feedback. There are several ways to get involved:
112
+
113
+ * Get involved in community discussion using the discussion board
114
+ * Submit new code requests using the issues
115
+ * Send us email at hello@brightband.com
116
+
117
+ # Installing EWB
118
+
119
+ Currently, the easiest way to install EWB is using the ```pip``` command:
120
+
121
+ ```shell
122
+ $ pip install git+https://github.com/brightbandtech/ExtremeWeatherBench.git
123
+ ```
124
+
125
+ It is highly recommend to use [uv](https://docs.astral.sh/uv/) if possible:
126
+
127
+ ```shell
128
+ $ git clone https://github.com/brightbandtech/ExtremeWeatherBench.git
129
+ $ cd ExtremeWeatherBench
130
+ $ uv sync
131
+ ```
132
+ # How to Run EWB
133
+
134
+ Running EWB on sample data (included) is straightforward.
135
+
136
+ ## Using command line initialization:
137
+
138
+ ```shell
139
+ $ ewb --default
140
+ ```
141
+ **Note**: this will run every event type, case, target source, and metric for the individual event type as they become available for GFS initialized FourCastNetv2. It is expected a full evaluation will take some time, even on a large VM.
142
+ ## Using Jupyter Notebook or a Script:
143
+
144
+ ```python
145
+ from extremeweatherbench import cases, inputs, metrics, evaluate, utils
146
+
147
+ # Load in a forecast; here, we load in GFS initialized FCNv2 from the CIRA MLWP archive with a default variable built-in for convenience
148
+ fcnv2_heatwave_forecast = defaults.cira_fcnv2_heatwave_forecast
149
+
150
+ # Load in ERA5 with another default convenience variable
151
+ era5_heatwave_target = defaults.era5_heatwave_target
152
+
153
+ # EvaluationObjects are used to evaluate a single forecast source against a single target source with a defined event type. Event types are declared with each case. One or more metrics can be evaluated with each EvaluationObject.
154
+ heatwave_evaluation_list = [
155
+ inputs.EvaluationObject(
156
+ event_type="heat_wave",
157
+ metric_list=[
158
+ metrics.MaximumMeanAbsoluteError(),
159
+ metrics.RootMeanSquaredError(),
160
+ metrics.MaximumLowestMeanAbsoluteError(),
161
+ ],
162
+ target=era5_heatwave_target,
163
+ forecast=fcnv2_heatwave_forecast,
164
+ ),
165
+ ]
166
+ # Load in the EWB default list of event cases
167
+ case_metadata = cases.load_ewb_events_yaml_into_case_list()
168
+
169
+ # Create the evaluation class, with cases and evaluation objects declared
170
+ ewb_instance = evaluate.ExtremeWeatherBench(
171
+ case_metadata=case_metadata,
172
+ evaluation_objects=heatwave_evaluation_list,
173
+ )
174
+
175
+ # Execute a parallel run and return the evaluation results as a pandas DataFrame
176
+ heatwave_outputs = ewb_instance.run(
177
+ parallel_config={'n_jobs':16} # Uses 16 jobs with the loky backend as default
178
+ )
179
+
180
+ # Save the results
181
+ heatwave_outputs.to_csv('heatwave_evaluation_results.csv')
182
+ ```
@@ -0,0 +1,105 @@
1
+ # Extreme Weather Bench (EWB)
2
+
3
+ [![Documentation Status](https://readthedocs.org/projects/extremeweatherbench/badge/?version=latest)](https://extremeweatherbench.readthedocs.io/en/latest/?badge=latest)
4
+
5
+ **EWB is currently in limited pre-release. Bugs are likely to occur for now.**
6
+
7
+ **v1.0 to be published alongside EWB preprint.**
8
+
9
+ [Read our blog post here](https://www.brightband.com/blog/extreme-weather-bench)
10
+
11
+ As AI weather models are growing in popularity, we need a standardized set of community driven tests that evaluate the models across a wide variety of high-impact hazards. Extreme Weather Bench (EWB) builds on the successful work of WeatherBench and introduces a set of high-impact weather events, spanning across multiple spatial and temporal scales and different parts of the weather spectrum. We provide data to use for testing, standard metrics for evaluation by forecasters worldwide for each of the phenomena, as well as impact-based metrics. EWB is a community system and will be adding additional phenomena, test cases and metrics in collaboration with the worldwide weather and forecast verification community.
12
+
13
+ # Events
14
+ EWB has cases broken down by multiple event types within `src/extremeweatherbench/data/events.yaml` between 2020 and 2024. EWB case studies are documented [here](docs/events/AllCaseStudies.md).
15
+
16
+ ## Available:
17
+
18
+ | Event Type | Number of Cases |
19
+ | ---------- | --------------- |
20
+ | 🌇 Heat Waves | 46 |
21
+ | 🧊 Freezes | 14 |
22
+ | 🌀 Tropical Cyclones | 106 |
23
+ | ☔️ Atmospheric Rivers | 56 |
24
+ | 🌪️ Severe Convection | 115 |
25
+ | **Total Cases** | 337 |
26
+
27
+ # EWB paper and talks
28
+
29
+ * AMS 2025 talk: https://ams.confex.com/ams/105ANNUAL/meetingapp.cgi/Paper/451220
30
+ * EWB paper is in preparation and will be submitted in late 2025
31
+
32
+ # How do I suggest new data, metrics, or otherwise get involved?
33
+
34
+ We welcome your involvement! The success of a benchmark suite rests on community involvement and feedback. There are several ways to get involved:
35
+
36
+ * Get involved in community discussion using the discussion board
37
+ * Submit new code requests using the issues
38
+ * Send us email at hello@brightband.com
39
+
40
+ # Installing EWB
41
+
42
+ Currently, the easiest way to install EWB is using the ```pip``` command:
43
+
44
+ ```shell
45
+ $ pip install git+https://github.com/brightbandtech/ExtremeWeatherBench.git
46
+ ```
47
+
48
+ It is highly recommend to use [uv](https://docs.astral.sh/uv/) if possible:
49
+
50
+ ```shell
51
+ $ git clone https://github.com/brightbandtech/ExtremeWeatherBench.git
52
+ $ cd ExtremeWeatherBench
53
+ $ uv sync
54
+ ```
55
+ # How to Run EWB
56
+
57
+ Running EWB on sample data (included) is straightforward.
58
+
59
+ ## Using command line initialization:
60
+
61
+ ```shell
62
+ $ ewb --default
63
+ ```
64
+ **Note**: this will run every event type, case, target source, and metric for the individual event type as they become available for GFS initialized FourCastNetv2. It is expected a full evaluation will take some time, even on a large VM.
65
+ ## Using Jupyter Notebook or a Script:
66
+
67
+ ```python
68
+ from extremeweatherbench import cases, inputs, metrics, evaluate, utils
69
+
70
+ # Load in a forecast; here, we load in GFS initialized FCNv2 from the CIRA MLWP archive with a default variable built-in for convenience
71
+ fcnv2_heatwave_forecast = defaults.cira_fcnv2_heatwave_forecast
72
+
73
+ # Load in ERA5 with another default convenience variable
74
+ era5_heatwave_target = defaults.era5_heatwave_target
75
+
76
+ # EvaluationObjects are used to evaluate a single forecast source against a single target source with a defined event type. Event types are declared with each case. One or more metrics can be evaluated with each EvaluationObject.
77
+ heatwave_evaluation_list = [
78
+ inputs.EvaluationObject(
79
+ event_type="heat_wave",
80
+ metric_list=[
81
+ metrics.MaximumMeanAbsoluteError(),
82
+ metrics.RootMeanSquaredError(),
83
+ metrics.MaximumLowestMeanAbsoluteError(),
84
+ ],
85
+ target=era5_heatwave_target,
86
+ forecast=fcnv2_heatwave_forecast,
87
+ ),
88
+ ]
89
+ # Load in the EWB default list of event cases
90
+ case_metadata = cases.load_ewb_events_yaml_into_case_list()
91
+
92
+ # Create the evaluation class, with cases and evaluation objects declared
93
+ ewb_instance = evaluate.ExtremeWeatherBench(
94
+ case_metadata=case_metadata,
95
+ evaluation_objects=heatwave_evaluation_list,
96
+ )
97
+
98
+ # Execute a parallel run and return the evaluation results as a pandas DataFrame
99
+ heatwave_outputs = ewb_instance.run(
100
+ parallel_config={'n_jobs':16} # Uses 16 jobs with the loky backend as default
101
+ )
102
+
103
+ # Save the results
104
+ heatwave_outputs.to_csv('heatwave_evaluation_results.csv')
105
+ ```
@@ -0,0 +1,181 @@
1
+ [project]
2
+ name = "extremeweatherbench"
3
+ version = "1.0.0"
4
+ description = "Benchmarking weather and weather AI models using extreme events"
5
+ keywords = [
6
+ "weather",
7
+ "extreme events",
8
+ "benchmarking",
9
+ "forecasting",
10
+ "climate",
11
+ ]
12
+ license = { file = "LICENSE" }
13
+ readme = "README.md"
14
+ classifiers = [
15
+ "Intended Audience :: Science/Research",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Operating System :: OS Independent",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Programming Language :: Python :: 3.13",
22
+ "Topic :: Scientific/Engineering :: Atmospheric Science",
23
+ ]
24
+ requires-python = ">=3.11,<3.14"
25
+ dependencies = [
26
+ "dacite>=1.8.1",
27
+ "gcsfs>=2024.12.0",
28
+ "geopandas>=1.0.1",
29
+ "joblib>=1.4.2",
30
+ "numpy>=2.2.0",
31
+ "pandas>=2.2.3",
32
+ "pyarrow>=19.0.1",
33
+ "pyyaml>=6.0.2",
34
+ "regionmask>=0.13.0",
35
+ "s3fs>=2024.12.0",
36
+ "scores>=2.4.0",
37
+ "tqdm>=4.67.1",
38
+ "xarray[io]>=2025.7.1",
39
+ "zarr>=3.0.9,<4",
40
+ "kerchunk[dev]",
41
+ "flox>=0.10.0",
42
+ "click>=8.1.8",
43
+ "polars>=1.32.1",
44
+ "eccodes==2.42.0",
45
+ "frozenlist==1.5.0",
46
+ "pyogrio==0.10.0",
47
+ "scikit-image>=0.25.2",
48
+ "cartopy==0.24.1",
49
+ "numba>=0.63.1",
50
+ "sparse>=0.17.0",
51
+ ]
52
+
53
+ [project.optional-dependencies]
54
+ data-prep = [
55
+ "fsspec>=2024.12.0",
56
+ "icechunk>=1.1.14",
57
+ "matplotlib>=3.10.0",
58
+ "obstore>=0.8.2",
59
+ "scipy>=1.13",
60
+ "seaborn>=0.13.2",
61
+ "ujson>=5.10.0",
62
+ "virtualizarr==2.1.2",
63
+ ]
64
+ multiprocessing = ["dask[complete]>=2025.1.0", "distributed>=2025.1.0"]
65
+
66
+ [dependency-groups]
67
+ dev = [
68
+ "deptry>=0.23.0",
69
+ "ipykernel>=6.29.5",
70
+ "ipywidgets>=8.1.5",
71
+ "isort>=6.0.1",
72
+ "jupyterlab>=4.4.5",
73
+ "lxml-stubs>=0.5.1",
74
+ "mypy>=1.14.1",
75
+ "pandas-stubs>=2.3.0.250703",
76
+ "pre-commit>=4.1.0",
77
+ "pytest>=8.3.4",
78
+ "pytest-cov>=6.0.0",
79
+ "pytest-mock>=3.14.0",
80
+ "ruff>=0.9.4",
81
+ "types-pytz>=2025.2.0.20250809",
82
+ "types-pyyaml>=6.0.12.20241230",
83
+ "types-tqdm>=4.67.0.20250809",
84
+ "python-semantic-release>=10.3.0",
85
+ "twine>=5.1.1",
86
+ ]
87
+ docs = [
88
+ "mkdocs>=1.6.1",
89
+ "mkdocs-autoapi[python]>=0.4.1",
90
+ "mkdocs-material>=9.7.0",
91
+ "mkdocstrings[python]>=1.0.0",
92
+ "pymdown-extensions>=10.19.1",
93
+ ]
94
+
95
+ complete = ["extremeweatherbench[data-prep,multiprocessing]"]
96
+
97
+ [build-system]
98
+ requires = ["hatchling >= 1.26"]
99
+ build-backend = "hatchling.build"
100
+
101
+ [tool.hatch.build.targets.wheel]
102
+ packages = ["src/extremeweatherbench"]
103
+
104
+ [tool.hatch.build.targets.sdist]
105
+ include = ["src/extremeweatherbench/**/*"]
106
+
107
+ [project.urls]
108
+ Documentation = "https://extremeweatherbench.readthedocs.io/"
109
+ Repository = "https://github.com/brightbandtech/extremeweatherbench"
110
+
111
+
112
+ [project.scripts]
113
+ ewb = "extremeweatherbench.evaluate_cli:cli_runner"
114
+
115
+ [tool.uv.sources]
116
+ extremeweatherbench = { workspace = true }
117
+ kerchunk = { git = "https://github.com/fsspec/kerchunk" }
118
+
119
+ [tool.ruff]
120
+ line-length = 88
121
+ indent-width = 4
122
+ lint.ignore = []
123
+
124
+ [tool.ruff.format]
125
+ # Like Black, use double quotes for strings.
126
+ quote-style = "double"
127
+
128
+ # Like Black, indent with spaces, rather than tabs.
129
+ indent-style = "space"
130
+
131
+ # Like Black, respect magic trailing commas.
132
+ skip-magic-trailing-comma = false
133
+
134
+ # Like Black, automatically detect the appropriate line ending.
135
+ line-ending = "auto"
136
+
137
+ # Enable auto-formatting of code examples in docstrings. Markdown,
138
+ # reStructuredText code/literal blocks and doctests are all supported.
139
+ #
140
+ # This is currently disabled by default, but it is planned for this
141
+ # to be opt-out in the future.
142
+ docstring-code-format = true
143
+
144
+ # Set the line length limit used when formatting code snippets in
145
+ # docstrings.
146
+ #
147
+ # This only has an effect when the `docstring-code-format` setting is
148
+ # enabled.
149
+ docstring-code-line-length = "dynamic"
150
+
151
+ [tool.ruff.lint.isort]
152
+ case-sensitive = true
153
+
154
+ [tool.semantic_release]
155
+ version_toml = ["pyproject.toml:project.version"]
156
+ branch = "main"
157
+ dist_path = "dist/"
158
+ upload_to_pypi = false
159
+ remote = { type = "github" }
160
+ commit_author = "semantic-release <semantic-release@python>"
161
+ commit_parser = "conventional"
162
+ commit_parser_options = { parse_squash_commits = "false", parse_merge_commits = "true" }
163
+ minor_tag = "[minor]"
164
+ patch_tag = "[patch]"
165
+ major_tag = "[major]"
166
+ build_command = """
167
+ uv lock --offline
168
+ git add uv.lock
169
+ uv build
170
+ """
171
+ # Only create GitHub releases for the current version, not historical ones
172
+ github_release_mode = "latest"
173
+ # Ensure assets are only uploaded for the current release, not past ones
174
+ upload_assets_for_all_releases = false
175
+
176
+ [tool.pytest]
177
+ addopts = ["--ignore=tests/test_golden.py", "--cov=extremeweatherbench"]
178
+ markers = [
179
+ "integration: marks tests as integration tests (may be slow)",
180
+ "slow: marks tests as slow (may take longer to complete)",
181
+ ]