water-benchmark-hub 0.1.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.
- water_benchmark_hub-0.1.0/CITATION.cff +21 -0
- water_benchmark_hub-0.1.0/LICENSE +21 -0
- water_benchmark_hub-0.1.0/MANIFEST.in +15 -0
- water_benchmark_hub-0.1.0/PKG-INFO +125 -0
- water_benchmark_hub-0.1.0/README.md +101 -0
- water_benchmark_hub-0.1.0/REQUIREMENTS.txt +1 -0
- water_benchmark_hub-0.1.0/pyproject.toml +35 -0
- water_benchmark_hub-0.1.0/readthedocs/basicusage.rst +26 -0
- water_benchmark_hub-0.1.0/readthedocs/conf.py +62 -0
- water_benchmark_hub-0.1.0/readthedocs/how_to_contribute.rst +139 -0
- water_benchmark_hub-0.1.0/readthedocs/index.rst +42 -0
- water_benchmark_hub-0.1.0/readthedocs/installation.rst +42 -0
- water_benchmark_hub-0.1.0/readthedocs/requirements.txt +4 -0
- water_benchmark_hub-0.1.0/readthedocs/water_benchmark_hub.batadal.rst +17 -0
- water_benchmark_hub-0.1.0/readthedocs/water_benchmark_hub.battledim.rst +17 -0
- water_benchmark_hub-0.1.0/readthedocs/water_benchmark_hub.bwdf.rst +9 -0
- water_benchmark_hub-0.1.0/readthedocs/water_benchmark_hub.gecco_waterquality.rst +9 -0
- water_benchmark_hub-0.1.0/readthedocs/water_benchmark_hub.gym.rst +10 -0
- water_benchmark_hub-0.1.0/readthedocs/water_benchmark_hub.leakdb.rst +17 -0
- water_benchmark_hub-0.1.0/readthedocs/water_benchmark_hub.networks.rst +33 -0
- water_benchmark_hub-0.1.0/readthedocs/water_benchmark_hub.rst +44 -0
- water_benchmark_hub-0.1.0/readthedocs/water_benchmark_hub.water_usage.rst +9 -0
- water_benchmark_hub-0.1.0/setup.cfg +4 -0
- water_benchmark_hub-0.1.0/setup.py +3 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/VERSION +1 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/__init__.py +16 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/batadal/__init__.py +1 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/batadal/batadal.py +270 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/batadal/batadal_data.py +28 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/battledim/__init__.py +1 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/battledim/battledim.py +489 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/battledim/battledim_data.py +51 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/benchmark_resource.py +21 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/benchmarks.py +47 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/bwdf/__init__.py +1 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/bwdf/bwdf.py +78 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/database.json +722 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/gecco_waterquality/__init__.py +2 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/gecco_waterquality/gecco_water_quality.py +291 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/gym/__init__.py +1 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/gym/scenario_control_env.py +197 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/leakdb/__init__.py +1 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/leakdb/leakdb.py +608 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/leakdb/leakdb_data.py +18923 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/meta_data.py +63 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/metrics.py +404 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/networks/__init__.py +4 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/networks/bwsn_networks.py +153 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/networks/epanet_examples.py +293 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/networks/ltown.py +205 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/networks/networks.py +3565 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/water_usage/__init__.py +1 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub/water_usage/water_usage.py +140 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub.egg-info/PKG-INFO +125 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub.egg-info/SOURCES.txt +56 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub.egg-info/dependency_links.txt +1 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub.egg-info/requires.txt +1 -0
- water_benchmark_hub-0.1.0/src/water_benchmark_hub.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
authors:
|
|
3
|
+
- family-names: Artelt
|
|
4
|
+
given-names: André
|
|
5
|
+
orcid: "https://orcid.org/0000-0002-2426-3126"
|
|
6
|
+
- family-names: Giese
|
|
7
|
+
given-names: Katharina
|
|
8
|
+
contact:
|
|
9
|
+
- family-names: Artelt
|
|
10
|
+
given-names: André
|
|
11
|
+
orcid: "https://orcid.org/0000-0002-2426-3126"
|
|
12
|
+
message: "If you use this software, please cite it using these metadata."
|
|
13
|
+
title: "WaterBenchmarkHub"
|
|
14
|
+
keywords:
|
|
15
|
+
- python
|
|
16
|
+
- simulation
|
|
17
|
+
- water
|
|
18
|
+
- epanet
|
|
19
|
+
- epanet-python-toolkit
|
|
20
|
+
license: MIT
|
|
21
|
+
repository-code: "https://github.com/WaterFutures/WaterBenchmarkHub"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 WaterBenchmarkHub Developers
|
|
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,15 @@
|
|
|
1
|
+
include src/water_benchmark_hub/VERSION
|
|
2
|
+
graft src/water_benchmark_hub/
|
|
3
|
+
exclude .*
|
|
4
|
+
global-exclude */__pycache__/*
|
|
5
|
+
global-exclude *.pyc
|
|
6
|
+
exclude DEVELOPERS.md
|
|
7
|
+
exclude REQUIREMENTS-DEV.txt
|
|
8
|
+
exclude Makefile
|
|
9
|
+
exclude make.bat
|
|
10
|
+
recursive-exclude webpage/ *
|
|
11
|
+
recursive-exclude examples/ *
|
|
12
|
+
recursive-exclude paper/ *
|
|
13
|
+
recursive-exclude docs/ *
|
|
14
|
+
recursive-exclude tests/ *
|
|
15
|
+
recursive-exclude .github/ *
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: water-benchmark-hub
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: WaterBenchmarkHub
|
|
5
|
+
Author-email: André Artelt <aartelt@techfak.uni-bielefeld.de>
|
|
6
|
+
License: MIT License
|
|
7
|
+
Project-URL: Homepage, https://github.com/WaterFutures/WaterBenchmarkHub
|
|
8
|
+
Project-URL: Documentation, https://water-benchmark-hub.readthedocs.io/en/latest/
|
|
9
|
+
Project-URL: Repository, https://github.com/WaterFutures/WaterBenchmarkHub.git
|
|
10
|
+
Project-URL: Issues, https://github.com/WaterFutures/WaterBenchmarkHub/issues
|
|
11
|
+
Keywords: water,networks,benchmarks,data
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Requires-Python: >=3.9
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: epyt-flow>=0.4
|
|
24
|
+
|
|
25
|
+
# WaterBenchmarkHub
|
|
26
|
+
|
|
27
|
+
The [*WaterBenchmarkHub*](https://waterfutures.github.io/WaterBenchmarkHub) is a platform for providing benchmark resources regarding
|
|
28
|
+
Water Distribution Networks (WDNs).
|
|
29
|
+
The webpage is available at
|
|
30
|
+
[https://waterfutures.github.io/WaterBenchmarkHub](https://waterfutures.github.io/WaterBenchmarkHub)
|
|
31
|
+
-- see [docs/](docs/) for details such as source code, etc.
|
|
32
|
+
|
|
33
|
+
The availability and accessibility of benchmarks are essential for reproducible research as well as
|
|
34
|
+
for accelerating scientific progress.
|
|
35
|
+
A benchmark is a *verified* data set or resource (e.g. a water distribution network) together with an
|
|
36
|
+
evaluation functions that can evaluate different algorithms/methods under the same criteria.
|
|
37
|
+
|
|
38
|
+
The WaterBenchmarkHub is also available as a Python package *water-benchmark-hub*.
|
|
39
|
+
|
|
40
|
+
## Call for Contributions
|
|
41
|
+
|
|
42
|
+
If you have a benchmark (resource) that is not yet available in the *WaterBenchmarkHub*,
|
|
43
|
+
please either create a new issue or read on
|
|
44
|
+
[How to Contribute](https://waterbenchmarkhub.readthedocs.io/en/latest/how_to_contribute.html).
|
|
45
|
+
|
|
46
|
+
## Installation of the Python Package
|
|
47
|
+
|
|
48
|
+
The Python package supports Python 3.9 - 3.12
|
|
49
|
+
|
|
50
|
+
### PyPI
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
pip install water-benchmark-hub
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Git
|
|
57
|
+
Download or clone the repository:
|
|
58
|
+
```
|
|
59
|
+
git clone https://github.com/WaterFutures/WaterBenchmarkHub.git
|
|
60
|
+
cd WaterBenchmarkHub
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Install all requirements as listed in [REQUIREMENTS.txt](REQUIREMENTS.txt):
|
|
64
|
+
```
|
|
65
|
+
pip install -r REQUIREMENTS.txt
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Install the benchmark hub:
|
|
69
|
+
```
|
|
70
|
+
pip install .
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Quick Example
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
from water_benchmark_hub import load
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
if __name__ == "__main__":
|
|
80
|
+
# Load the GECCO Water Quality 2019 benchmark
|
|
81
|
+
benchmark = load("GECCO-WaterQuality2019")
|
|
82
|
+
|
|
83
|
+
# Load data set
|
|
84
|
+
data = benchmark.load_data(return_X_y=True)
|
|
85
|
+
|
|
86
|
+
# Show number of samples
|
|
87
|
+
X_train, y_train = data["train"]
|
|
88
|
+
X_val, y_val = data["validation"]
|
|
89
|
+
X_test, y_test = data["test"]
|
|
90
|
+
print(X_train.shape, X_val.shape, X_test.shape)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Documentation
|
|
94
|
+
|
|
95
|
+
Documentation is available on readthedocs:
|
|
96
|
+
[https://waterbenchmarkhub.readthedocs.io/en/latest/](https://waterbenchmarkhub.readthedocs.io/en/latest/)
|
|
97
|
+
|
|
98
|
+
## License
|
|
99
|
+
|
|
100
|
+
MIT license -- see [LICENSE](LICENSE)
|
|
101
|
+
|
|
102
|
+
## How to Cite?
|
|
103
|
+
|
|
104
|
+
If you use the WaterBenchmarkHub in your research, please cite it as follows:
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
@misc{github:water_benchmark_hub,
|
|
108
|
+
author = {André Artelt, Katharina Giese},
|
|
109
|
+
title = {WaterBenchmarkHub},
|
|
110
|
+
year = {2024},
|
|
111
|
+
publisher = {GitHub},
|
|
112
|
+
journal = {GitHub repository},
|
|
113
|
+
howpublished = {\url{https://github.com/WaterFutures/WaterBenchmarkHub}}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## How to get Support?
|
|
118
|
+
|
|
119
|
+
If you come across any bug or need assistance please feel free to open a new issue if none of the existing issues answers your questions.
|
|
120
|
+
|
|
121
|
+
## How to Contribute?
|
|
122
|
+
|
|
123
|
+
Contributions (e.g. creating issues, pull-requests, etc.) are welcome -- please make sure to read
|
|
124
|
+
[How to Contribute](https://waterbenchmarkhub.readthedocs.io/en/latest/how_to_contribute.html),
|
|
125
|
+
the [code of conduct](CODE_OF_CONDUCT.md) and follow the [developers' guidelines](DEVELOPERS.md).
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# WaterBenchmarkHub
|
|
2
|
+
|
|
3
|
+
The [*WaterBenchmarkHub*](https://waterfutures.github.io/WaterBenchmarkHub) is a platform for providing benchmark resources regarding
|
|
4
|
+
Water Distribution Networks (WDNs).
|
|
5
|
+
The webpage is available at
|
|
6
|
+
[https://waterfutures.github.io/WaterBenchmarkHub](https://waterfutures.github.io/WaterBenchmarkHub)
|
|
7
|
+
-- see [docs/](docs/) for details such as source code, etc.
|
|
8
|
+
|
|
9
|
+
The availability and accessibility of benchmarks are essential for reproducible research as well as
|
|
10
|
+
for accelerating scientific progress.
|
|
11
|
+
A benchmark is a *verified* data set or resource (e.g. a water distribution network) together with an
|
|
12
|
+
evaluation functions that can evaluate different algorithms/methods under the same criteria.
|
|
13
|
+
|
|
14
|
+
The WaterBenchmarkHub is also available as a Python package *water-benchmark-hub*.
|
|
15
|
+
|
|
16
|
+
## Call for Contributions
|
|
17
|
+
|
|
18
|
+
If you have a benchmark (resource) that is not yet available in the *WaterBenchmarkHub*,
|
|
19
|
+
please either create a new issue or read on
|
|
20
|
+
[How to Contribute](https://waterbenchmarkhub.readthedocs.io/en/latest/how_to_contribute.html).
|
|
21
|
+
|
|
22
|
+
## Installation of the Python Package
|
|
23
|
+
|
|
24
|
+
The Python package supports Python 3.9 - 3.12
|
|
25
|
+
|
|
26
|
+
### PyPI
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
pip install water-benchmark-hub
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Git
|
|
33
|
+
Download or clone the repository:
|
|
34
|
+
```
|
|
35
|
+
git clone https://github.com/WaterFutures/WaterBenchmarkHub.git
|
|
36
|
+
cd WaterBenchmarkHub
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Install all requirements as listed in [REQUIREMENTS.txt](REQUIREMENTS.txt):
|
|
40
|
+
```
|
|
41
|
+
pip install -r REQUIREMENTS.txt
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Install the benchmark hub:
|
|
45
|
+
```
|
|
46
|
+
pip install .
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Quick Example
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
from water_benchmark_hub import load
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
if __name__ == "__main__":
|
|
56
|
+
# Load the GECCO Water Quality 2019 benchmark
|
|
57
|
+
benchmark = load("GECCO-WaterQuality2019")
|
|
58
|
+
|
|
59
|
+
# Load data set
|
|
60
|
+
data = benchmark.load_data(return_X_y=True)
|
|
61
|
+
|
|
62
|
+
# Show number of samples
|
|
63
|
+
X_train, y_train = data["train"]
|
|
64
|
+
X_val, y_val = data["validation"]
|
|
65
|
+
X_test, y_test = data["test"]
|
|
66
|
+
print(X_train.shape, X_val.shape, X_test.shape)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Documentation
|
|
70
|
+
|
|
71
|
+
Documentation is available on readthedocs:
|
|
72
|
+
[https://waterbenchmarkhub.readthedocs.io/en/latest/](https://waterbenchmarkhub.readthedocs.io/en/latest/)
|
|
73
|
+
|
|
74
|
+
## License
|
|
75
|
+
|
|
76
|
+
MIT license -- see [LICENSE](LICENSE)
|
|
77
|
+
|
|
78
|
+
## How to Cite?
|
|
79
|
+
|
|
80
|
+
If you use the WaterBenchmarkHub in your research, please cite it as follows:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
@misc{github:water_benchmark_hub,
|
|
84
|
+
author = {André Artelt, Katharina Giese},
|
|
85
|
+
title = {WaterBenchmarkHub},
|
|
86
|
+
year = {2024},
|
|
87
|
+
publisher = {GitHub},
|
|
88
|
+
journal = {GitHub repository},
|
|
89
|
+
howpublished = {\url{https://github.com/WaterFutures/WaterBenchmarkHub}}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## How to get Support?
|
|
94
|
+
|
|
95
|
+
If you come across any bug or need assistance please feel free to open a new issue if none of the existing issues answers your questions.
|
|
96
|
+
|
|
97
|
+
## How to Contribute?
|
|
98
|
+
|
|
99
|
+
Contributions (e.g. creating issues, pull-requests, etc.) are welcome -- please make sure to read
|
|
100
|
+
[How to Contribute](https://waterbenchmarkhub.readthedocs.io/en/latest/how_to_contribute.html),
|
|
101
|
+
the [code of conduct](CODE_OF_CONDUCT.md) and follow the [developers' guidelines](DEVELOPERS.md).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
epyt-flow>=0.4
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools", "setuptools-scm"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "water-benchmark-hub"
|
|
7
|
+
description = "WaterBenchmarkHub"
|
|
8
|
+
authors = [
|
|
9
|
+
{name = "André Artelt", email = "aartelt@techfak.uni-bielefeld.de"}
|
|
10
|
+
]
|
|
11
|
+
license = {text = "MIT License"}
|
|
12
|
+
requires-python = ">=3.9"
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 4 - Beta",
|
|
15
|
+
"Intended Audience :: Science/Research",
|
|
16
|
+
"License :: OSI Approved :: MIT License",
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Programming Language :: Python :: 3.9",
|
|
19
|
+
"Programming Language :: Python :: 3.10",
|
|
20
|
+
"Programming Language :: Python :: 3.11",
|
|
21
|
+
"Programming Language :: Python :: 3.12"
|
|
22
|
+
]
|
|
23
|
+
keywords=["water", "networks", "benchmarks", "data"]
|
|
24
|
+
dynamic = ["version", "readme", "dependencies"]
|
|
25
|
+
|
|
26
|
+
[project.urls]
|
|
27
|
+
Homepage = "https://github.com/WaterFutures/WaterBenchmarkHub"
|
|
28
|
+
Documentation = "https://water-benchmark-hub.readthedocs.io/en/latest/"
|
|
29
|
+
Repository = "https://github.com/WaterFutures/WaterBenchmarkHub.git"
|
|
30
|
+
Issues = "https://github.com/WaterFutures/WaterBenchmarkHub/issues"
|
|
31
|
+
|
|
32
|
+
[tool.setuptools.dynamic]
|
|
33
|
+
version = {file = "src/water_benchmark_hub/VERSION"}
|
|
34
|
+
readme = {file = "README.md", content-type = "text/markdown"}
|
|
35
|
+
dependencies = {file = "REQUIREMENTS.txt"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.. _basic_usage:
|
|
2
|
+
|
|
3
|
+
***********
|
|
4
|
+
Basic Usage
|
|
5
|
+
***********
|
|
6
|
+
|
|
7
|
+
Quick example
|
|
8
|
+
-------------
|
|
9
|
+
|
|
10
|
+
.. code-block:: python
|
|
11
|
+
|
|
12
|
+
from water_benchmark_hub import load
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
if __name__ == "__main__":
|
|
16
|
+
# Load GECCO water quality benchmark
|
|
17
|
+
benchmark = load("GeccoWaterQuality")
|
|
18
|
+
|
|
19
|
+
# Load 2019 data set
|
|
20
|
+
data = benchmark.load_gecco2019_water_quality_data(return_X_y=True)
|
|
21
|
+
|
|
22
|
+
# Show number of samples
|
|
23
|
+
X_train, y_train = data["train"]
|
|
24
|
+
X_val, y_val = data["validation"]
|
|
25
|
+
X_test, y_test = data["test"]
|
|
26
|
+
print(X_train.shape, X_val.shape, X_test.shape)
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Configuration file for the Sphinx documentation builder.
|
|
2
|
+
#
|
|
3
|
+
# This file only contains a selection of the most common options. For a full
|
|
4
|
+
# list see the documentation:
|
|
5
|
+
# http://www.sphinx-doc.org/en/master/config
|
|
6
|
+
|
|
7
|
+
# -- Path setup --------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
# If extensions (or modules to document with autodoc) are in another directory,
|
|
10
|
+
# add these directories to sys.path here. If the directory is relative to the
|
|
11
|
+
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
12
|
+
#
|
|
13
|
+
import os
|
|
14
|
+
import sys
|
|
15
|
+
sys.path.insert(0, os.path.abspath('../src/'))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# -- Project information -----------------------------------------------------
|
|
19
|
+
|
|
20
|
+
project = 'WaterBenchmarkHub'
|
|
21
|
+
copyright = 'WaterBenchmarkHub Developers, 2024'
|
|
22
|
+
author = 'André Artelt'
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# -- General configuration ---------------------------------------------------
|
|
26
|
+
|
|
27
|
+
autodoc_mock_imports = ["epyt", "epyt_flow", "pandas", "numpy", "scipy", "matplotlib", "sklearn", "falcon"]
|
|
28
|
+
|
|
29
|
+
# Add any Sphinx extension module names here, as strings. They can be
|
|
30
|
+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
31
|
+
# ones.
|
|
32
|
+
extensions = [
|
|
33
|
+
'sphinx.ext.autodoc',
|
|
34
|
+
'sphinx.ext.napoleon',
|
|
35
|
+
'nbsphinx'
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
# Add any paths that contain templates here, relative to this directory.
|
|
39
|
+
templates_path = ['_templates']
|
|
40
|
+
|
|
41
|
+
# List of patterns, relative to source directory, that match files and
|
|
42
|
+
# directories to ignore when looking for source files.
|
|
43
|
+
# This pattern also affects html_static_path and html_extra_path.
|
|
44
|
+
exclude_patterns = []
|
|
45
|
+
|
|
46
|
+
# LaTeX
|
|
47
|
+
latex_elements = {
|
|
48
|
+
'maxlistdepth': "10",
|
|
49
|
+
'printindex': r'\def\twocolumn[#1]{#1}\printindex'
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
# -- Options for HTML output -------------------------------------------------
|
|
53
|
+
|
|
54
|
+
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
55
|
+
# a list of builtin themes.
|
|
56
|
+
#
|
|
57
|
+
html_theme = 'sphinx_rtd_theme'
|
|
58
|
+
|
|
59
|
+
# Add any paths that contain custom static files (such as style sheets) here,
|
|
60
|
+
# relative to this directory. They are copied after the builtin static files,
|
|
61
|
+
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
62
|
+
html_static_path = ['_static']
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
.. _how_to_contribute:
|
|
2
|
+
|
|
3
|
+
*****************
|
|
4
|
+
How to Contribute
|
|
5
|
+
*****************
|
|
6
|
+
|
|
7
|
+
This document describes how researchers/users can contribute their own benchmark (resources)
|
|
8
|
+
to the WaterBenchmarkHub.
|
|
9
|
+
|
|
10
|
+
In order to add a new benchmark (resource), the WaterBenchmarkHub Git repository has to be cloned
|
|
11
|
+
and a pull-request with all necessary changes (see next sections) must be submitted.
|
|
12
|
+
The pull-requests will be reviewed by the WaterBenchmarkHub team before it gets accepted and
|
|
13
|
+
finally integrated into the WaterBenchmarkHub.
|
|
14
|
+
|
|
15
|
+
General
|
|
16
|
+
-------
|
|
17
|
+
|
|
18
|
+
When adding a new benchmark (resource), there are a few aspects that must be considered:
|
|
19
|
+
|
|
20
|
+
Naming
|
|
21
|
+
++++++
|
|
22
|
+
|
|
23
|
+
The unique identifier of a new benchmark (resource) must consist of two parts:
|
|
24
|
+
|
|
25
|
+
1. Category or user/organization
|
|
26
|
+
2. Name of the benchmark (resource)
|
|
27
|
+
|
|
28
|
+
Both parts (lowercase!) are concatenated by a hyphen -- i.e. let's assume we add a network
|
|
29
|
+
called `Net2`, then the final name would be `network-net2` (note that we use the category `network`
|
|
30
|
+
to denote a network resource).
|
|
31
|
+
|
|
32
|
+
Meta data
|
|
33
|
+
+++++++++
|
|
34
|
+
|
|
35
|
+
For each benchmark (resource), a new entry (dictionary) in the database
|
|
36
|
+
`docs/static/database.json <https://github.com/WaterFutures/WaterBenchmarkHub/blob/dev/docs/static/database.json>`_
|
|
37
|
+
must be created with the following content -- if a field is not available,
|
|
38
|
+
it should dropped from the database entry:
|
|
39
|
+
|
|
40
|
+
- :code:`name` Name of the benchmark (resource).
|
|
41
|
+
- :code:`desc` Brief description of the benchmark (resource).
|
|
42
|
+
- :code:`year` Year in which the benchmark (resource) was published.
|
|
43
|
+
- :code:`doi` The doi of the benchmark (resource) or the corresponding publication.
|
|
44
|
+
- :code:`license` The license of the benchmark (resource).
|
|
45
|
+
- :code:`tags` List of (existing) tags associated with the benchmark (resource) --
|
|
46
|
+
avoid inventing new tags and use existing tags!
|
|
47
|
+
- :code:`keywords` Additional keywords associated with the benchmark (resource) --
|
|
48
|
+
these keywords are never displayed but used when the user is searching for benchmark (resources).
|
|
49
|
+
- :code:`download_url` External URL where the benchmark (resource) can be downloaded --
|
|
50
|
+
should be direct link to the resource file(s).
|
|
51
|
+
- :code:`external_url` External URL to the project page of the benchmark (resource).
|
|
52
|
+
- :code:`permalink` Usually, this is given as `benchmarks/benchmark-ID.html`
|
|
53
|
+
where `benchmark-ID` refers to the unique ID of the benchmark resource.
|
|
54
|
+
|
|
55
|
+
**Note:** The dictionary key (lowercase!) in the database must be the unique identifier of the benchmark (resource).
|
|
56
|
+
|
|
57
|
+
A complete example of the `KIOS LeakDB` benchmark is given below:
|
|
58
|
+
|
|
59
|
+
.. code:: JSON
|
|
60
|
+
|
|
61
|
+
"kios-leakdb": {
|
|
62
|
+
"name": "LeakDB",
|
|
63
|
+
"desc": "LeakDB (Leakage Diagnosis Benchmark) is a realistic leakage dataset for water distribution networks.",
|
|
64
|
+
"year": 2018,
|
|
65
|
+
"tags": ["leakage detection", "leakage localization", "leakage", "event detection"],
|
|
66
|
+
"keywords": ["Net1", "Hanoi"],
|
|
67
|
+
"doi": "10.5281/zenodo.1313116",
|
|
68
|
+
"license": "EUPL-1.2",
|
|
69
|
+
"download_url": "https://ucy-my.sharepoint.com/:f:/g/personal/mkiria01_ucy_ac_cy/Eiyah0-TL4dGqt9K4Ln5TN0BRlroASbX35p53bS7or4j5A",
|
|
70
|
+
"external_url": "https://github.com/KIOS-Research/LeakDB",
|
|
71
|
+
"permalink": "benchmarks/KIOS-LeakDB.html"
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
Description
|
|
75
|
+
+++++++++++
|
|
76
|
+
|
|
77
|
+
The complete description of the benchmark resource must be placed in a Markdown file in the
|
|
78
|
+
`docs/_benchmarks <https://github.com/WaterFutures/WaterBenchmarkHub/blob/dev/docs/_benchmarks>`_ folder.
|
|
79
|
+
The name of the Markdown file must be the same as specified in the :code:`permalink` field
|
|
80
|
+
in the database.
|
|
81
|
+
|
|
82
|
+
The Markdown file must start with the following header:
|
|
83
|
+
|
|
84
|
+
.. code:: YAML
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
title: "BenchmarkName"
|
|
88
|
+
id: "benchmark-ID"
|
|
89
|
+
permalink: benchmark-permalink
|
|
90
|
+
collection: benchmarks
|
|
91
|
+
layout: benchmark
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
where :code:`BenchmarkName` refers to the name, :code:`benchmark-ID` to the unique ID (see above),
|
|
95
|
+
and :code:`benchmark-permalink` to the permalink of the benchmark (resource) as specified in
|
|
96
|
+
the database.
|
|
97
|
+
All other parts of the header must not be changed!
|
|
98
|
+
|
|
99
|
+
Regarding the description itself, we do not have any strict rules how to structure
|
|
100
|
+
and what to put into the Markdown file.
|
|
101
|
+
However, we recommend the following layout:
|
|
102
|
+
|
|
103
|
+
- :code:`## Description` General (detailed) description of the benchmark (resource).
|
|
104
|
+
- :code:`## How to Use` Description of how to load and utilize the benchmark (resource)
|
|
105
|
+
- :code:`### Usage in Python` If applicable, a description on how to load the benchmark (resource)
|
|
106
|
+
in Python using the *water-benchmark-hub* Python package.
|
|
107
|
+
- :code:`## Reference` Reference (citation) of the benchmark (resource).
|
|
108
|
+
|
|
109
|
+
Images or other resources are used in the Markdown file, must be placed in the
|
|
110
|
+
`static/benchmarks/benchmark-ID/` folder -- where `benchmark-ID` (lower case!) refers to the
|
|
111
|
+
benchmark ID as given the :code:`permalink` field.
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
Python package
|
|
115
|
+
--------------
|
|
116
|
+
|
|
117
|
+
In addition to the previous steps, the benchmark (resource) should made be available
|
|
118
|
+
(if possible) in the *water-benchmark-hub* Python package as well.
|
|
119
|
+
For this, the following steps are necessary:
|
|
120
|
+
|
|
121
|
+
1. If the new benchmark (resource) is a network, a new class has to be derived from the
|
|
122
|
+
`WaterDistributionNetwork <https://waterbenchmarkhub.readthedocs.io/en/latest/water_benchmark_hub.networks.html#water_benchmark_hub.networks.networks.WaterDistributionNetwork>`_
|
|
123
|
+
class and put into
|
|
124
|
+
`src/water_benchmark_hub/networks/networks.py <https://github.com/WaterFutures/WaterBenchmarkHub/blob/dev/src/water_benchmark_hub/networks/networks.py>`_
|
|
125
|
+
(if justified, a new .py file can also be created).
|
|
126
|
+
|
|
127
|
+
For all other types of benchmark (resources), a new directory should be created and
|
|
128
|
+
the benchmark itself must be implemented by deriving a new class from the
|
|
129
|
+
`BenchmarkResource <https://waterbenchmarkhub.readthedocs.io/en/latest/water_benchmark_hub.html#water_benchmark_hub.benchmark_resource.BenchmarkResource>`_
|
|
130
|
+
class and importing this new class in
|
|
131
|
+
`src/water_benchmark_hub/__init__.py <https://github.com/WaterFutures/WaterBenchmarkHub/blob/dev/src/water_benchmark_hub/__init__.py>`_.
|
|
132
|
+
2. In all cases, the new benchmark (resource) must be registered by calling the
|
|
133
|
+
`register() <https://waterbenchmarkhub.readthedocs.io/en/latest/water_benchmark_hub.html#water_benchmark_hub.benchmarks.register>`_
|
|
134
|
+
function right after the class declaration -- the argument is a *key* that is used to load
|
|
135
|
+
the benchmark (resource), which is usually similar (but nicely formatted) to the unique ID of
|
|
136
|
+
the benchmark resource as used in the database.
|
|
137
|
+
3. Also, in all cases, the new class must be decoratated with the
|
|
138
|
+
`@meta_data() <https://waterbenchmarkhub.readthedocs.io/en/latest/water_benchmark_hub.html#water_benchmark_hub.meta_data.meta_data>`_
|
|
139
|
+
decorator -- the argument is the unique ID of the benchmark resource as used in the database.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
Welcome to WaterBenchmarkHub's documentation!
|
|
2
|
+
=============================================
|
|
3
|
+
|
|
4
|
+
WaterBenchmarkHub
|
|
5
|
+
+++++++++++++++++
|
|
6
|
+
|
|
7
|
+
The *WaterBenchmarkHub* is a platform for providing benchmark resources regarding
|
|
8
|
+
Water Distribution Networks (WDNs).
|
|
9
|
+
The webpage is available at
|
|
10
|
+
`https://waterfutures.github.io/WaterBenchmarkHub <https://waterfutures.github.io/WaterBenchmarkHub>`_.
|
|
11
|
+
|
|
12
|
+
The availability and accessibility of benchmarks are essential for reproducible research as well as
|
|
13
|
+
for accelerating scientific progress.
|
|
14
|
+
A benchmark is a *verified* data set or resource (e.g. a water distribution network) together with an
|
|
15
|
+
evaluation functions that can evaluate different algorithms/methods under the same criteria.
|
|
16
|
+
|
|
17
|
+
The WaterBenchmarkHub is also available as a Python package called *water-benchmark-hub*.
|
|
18
|
+
|
|
19
|
+
.. toctree::
|
|
20
|
+
:maxdepth: 1
|
|
21
|
+
:caption: User Guide
|
|
22
|
+
|
|
23
|
+
installation
|
|
24
|
+
basicusage
|
|
25
|
+
|
|
26
|
+
how_to_contribute
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
API Reference
|
|
30
|
+
=============
|
|
31
|
+
.. toctree::
|
|
32
|
+
:maxdepth: 2
|
|
33
|
+
:caption: API Reference
|
|
34
|
+
|
|
35
|
+
water_benchmark_hub
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
Indices and tables
|
|
39
|
+
==================
|
|
40
|
+
* :ref:`genindex`
|
|
41
|
+
* :ref:`modindex`
|
|
42
|
+
* :ref:`search`
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.. _installation:
|
|
2
|
+
|
|
3
|
+
************
|
|
4
|
+
Installation
|
|
5
|
+
************
|
|
6
|
+
|
|
7
|
+
Besides the `webpage <https://waterfutures.github.io/WaterBenchmarkHub>`_, the Water Benchmark Hub
|
|
8
|
+
is also available as a Python package called *water-benchmark-hub*.
|
|
9
|
+
|
|
10
|
+
Note that the *water-benchmark-hub* package supports Python 3.9 - 3.12
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
PyPI
|
|
14
|
+
----
|
|
15
|
+
|
|
16
|
+
.. code:: bash
|
|
17
|
+
|
|
18
|
+
pip install water-benchmark-hub
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
Git
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
Download or clone the repository:
|
|
25
|
+
|
|
26
|
+
.. code:: bash
|
|
27
|
+
|
|
28
|
+
git clone https://github.com/WaterFutures/WaterBenchmarkHub.git
|
|
29
|
+
cd WaterBenchmarkHub
|
|
30
|
+
|
|
31
|
+
Install all requirements as listed in `REQUIREMENTS.txt <https://raw.githubusercontent.com/WaterFutures/WaterBenchmarkHub/master/REQUIREMENTS.txt>`_:
|
|
32
|
+
|
|
33
|
+
.. code:: bash
|
|
34
|
+
|
|
35
|
+
pip install -r REQUIREMENTS.txt
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
Install the toolbox:
|
|
39
|
+
|
|
40
|
+
.. code:: bash
|
|
41
|
+
|
|
42
|
+
pip install .
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
water_benchmark_hub.batadal
|
|
2
|
+
===========================
|
|
3
|
+
|
|
4
|
+
water_benchmark_hub.batadal.batadal
|
|
5
|
+
-----------------------------------
|
|
6
|
+
|
|
7
|
+
.. automodule:: water_benchmark_hub.batadal.batadal
|
|
8
|
+
:members:
|
|
9
|
+
:show-inheritance:
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
water_benchmark_hub.batadal.batadal_data
|
|
13
|
+
----------------------------------------
|
|
14
|
+
|
|
15
|
+
.. automodule:: water_benchmark_hub.batadal.batadal_data
|
|
16
|
+
:members:
|
|
17
|
+
:show-inheritance:
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
water_benchmark_hub.battledim
|
|
2
|
+
=============================
|
|
3
|
+
|
|
4
|
+
water_benchmark_hub.battledim.battledim
|
|
5
|
+
---------------------------------------
|
|
6
|
+
|
|
7
|
+
.. automodule:: water_benchmark_hub.battledim.battledim
|
|
8
|
+
:members:
|
|
9
|
+
:show-inheritance:
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
water_benchmark_hub.battledim.battledim_data
|
|
13
|
+
--------------------------------------------
|
|
14
|
+
|
|
15
|
+
.. automodule:: water_benchmark_hub.battledim.battledim_data
|
|
16
|
+
:members:
|
|
17
|
+
:show-inheritance:
|