aesoptparam 0.3.7__py3-none-any.whl
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.
- aesoptparam/__init__.py +13 -0
- aesoptparam/example.py +110 -0
- aesoptparam/parameterized.py +415 -0
- aesoptparam/parameters.py +641 -0
- aesoptparam/serializer.py +90 -0
- aesoptparam/test/dummy_instance.json +30 -0
- aesoptparam/test/dummy_schema.json +752 -0
- aesoptparam/test/test_parameterized.py +574 -0
- aesoptparam/test/test_parameters.py +519 -0
- aesoptparam/test/test_units.py +369 -0
- aesoptparam/test/test_utils.py +147 -0
- aesoptparam/utils/__init__.py +63 -0
- aesoptparam/utils/html_repr.py +533 -0
- aesoptparam/utils/json_utils.py +127 -0
- aesoptparam/utils/unit_library.ini +233 -0
- aesoptparam/utils/units.py +1060 -0
- aesoptparam-0.3.7.dist-info/METADATA +86 -0
- aesoptparam-0.3.7.dist-info/RECORD +21 -0
- aesoptparam-0.3.7.dist-info/WHEEL +5 -0
- aesoptparam-0.3.7.dist-info/licenses/LICENSE +21 -0
- aesoptparam-0.3.7.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: aesoptparam
|
|
3
|
+
Version: 0.3.7
|
|
4
|
+
Author-email: Kenneth Loenbaek <kenloen@dtu.dk>
|
|
5
|
+
Maintainer-email: Kenneth Loenbaek <kenloen@dtu.dk>
|
|
6
|
+
Project-URL: Documentation, https://aesopt.pages.windenergy.dtu.dk/aesoptparam
|
|
7
|
+
Project-URL: DTU-Wind-Gitlab, https://gitlab.windenergy.dtu.dk/AESOpt/aesoptparam
|
|
8
|
+
Project-URL: Changelog, https://gitlab.windenergy.dtu.dk/AESOpt/aesoptparam/-/blob/main/CHANGELOG.md
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Dist: param==2.3.0
|
|
12
|
+
Requires-Dist: numpy
|
|
13
|
+
Requires-Dist: scipy
|
|
14
|
+
Provides-Extra: test
|
|
15
|
+
Requires-Dist: pytest; extra == "test"
|
|
16
|
+
Requires-Dist: pytest-cov; extra == "test"
|
|
17
|
+
Requires-Dist: isort; extra == "test"
|
|
18
|
+
Requires-Dist: black; extra == "test"
|
|
19
|
+
Requires-Dist: jsonschema; extra == "test"
|
|
20
|
+
Provides-Extra: docs
|
|
21
|
+
Requires-Dist: sphinx; extra == "docs"
|
|
22
|
+
Requires-Dist: sphinx-design; extra == "docs"
|
|
23
|
+
Requires-Dist: sphinx_book_theme; extra == "docs"
|
|
24
|
+
Requires-Dist: myst-parser; extra == "docs"
|
|
25
|
+
Requires-Dist: sphinx_external_toc; extra == "docs"
|
|
26
|
+
Requires-Dist: sphinxcontrib.bibtex; extra == "docs"
|
|
27
|
+
Requires-Dist: myst-nb; extra == "docs"
|
|
28
|
+
Requires-Dist: markdown; extra == "docs"
|
|
29
|
+
Requires-Dist: jupytext; extra == "docs"
|
|
30
|
+
Requires-Dist: setuptools; extra == "docs"
|
|
31
|
+
Provides-Extra: all
|
|
32
|
+
Requires-Dist: aesoptparam[docs,test]; extra == "all"
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
|
|
35
|
+
# AESOpt Param (`aesoptparam`)
|
|
36
|
+
|
|
37
|
+
[](https://gitlab.windenergy.dtu.dk/AESOpt/aesoptparam/-/commits/main) [](https://gitlab.windenergy.dtu.dk/AESOpt/aesoptparam/-/commits/main)
|
|
38
|
+
|
|
39
|
+
Is a light weight extension of the open source [`param`](https://param.holoviz.org/) project.
|
|
40
|
+
|
|
41
|
+
The `param` project is a library for handling all the user-modifiable parameters, arguments, and attributes that control code. It adds a way to declare parameters via their type while also adding meta data such as documentation, valid range, etc. For a more extensive introduction user are referred to the project homepage: https://param.holoviz.org/
|
|
42
|
+
The [`param`](https://param.holoviz.org/) webpage is also where users are expected to look for more detailed use of `aesoptparam`.
|
|
43
|
+
|
|
44
|
+
`aesoptparam` is purely extending `param`, by adding the following features:
|
|
45
|
+
|
|
46
|
+
- Make an extended `Parameterized` -> `AESOptParameterized`, which adds the following features:
|
|
47
|
+
- Method for getting data as a dict (`.as_dict`)
|
|
48
|
+
- Method for serializing data (`.as_serial`). Used for saving data to JSON, YAML, TOML
|
|
49
|
+
- Method for setting data from a dict (`.from_dict`). Also works for nested dicts
|
|
50
|
+
- Method for validating numpy array shapes (`.validate_array_shapes`). See `AESOptArray` for more.
|
|
51
|
+
- Method for interpolating arrays (`.interp`)
|
|
52
|
+
- Method for setting values in others units than their default units (`.set_val`)
|
|
53
|
+
- Method for gettting values in others units than their default units (`.get_val`)
|
|
54
|
+
- HTML rendering of the `AESOptParameterized` instance content (Name, Documentation, Type, Range, Units, Value)
|
|
55
|
+
- Adds posibility for setting a parent_object for nested `AESOptParameterized`, which allows others values to refer to any other value however deeply nested it is
|
|
56
|
+
- A set of new/modified parameters:
|
|
57
|
+
- `SubParameterized`: Parameter to add nested `AESOptParameterized`. It will automatically add the parent object.
|
|
58
|
+
- `ListOfParameterized`: Parameter to add a list of `AESOptParameterized`.
|
|
59
|
+
- `AESOptString`: Adds the following list of attributes or methods:
|
|
60
|
+
- `default_ref`: Referencing another parameter string
|
|
61
|
+
- `AESOptBoolean`: Adds the following list of attributes or methods:
|
|
62
|
+
- `default_ref`: Referencing another parameter string
|
|
63
|
+
- `AESOptNumber`: Adds the following list of attributes or methods:
|
|
64
|
+
- `units`
|
|
65
|
+
- `default_ref`: Referencing another parameter number
|
|
66
|
+
- `AESOptInteger`: Adds the following list of attributes or methods:
|
|
67
|
+
- `units`
|
|
68
|
+
- `default_ref`: Referencing another parameter number
|
|
69
|
+
- `AESOptArray`: Adds the following list of attributes or methods:
|
|
70
|
+
- `bounds`, `softbounds`. `inclusive_bounds`, similar to [`param.Number`](https://param.holoviz.org/user_guide/Parameter_Types.html#numbers)
|
|
71
|
+
- `units`
|
|
72
|
+
- `dtype`: The array data type
|
|
73
|
+
- `shape`: The shape of the array. Can also be a reference to another parameter. Used for validating array shape.
|
|
74
|
+
- `default_full`: Makes the default a array full of a given number. Using `numpy.full`. The first argument can reference others parameters to get their shape.
|
|
75
|
+
- `default_interp`: The default is to interpolate the array from other arrays. Arguments can both be arrays or references to others arrays.
|
|
76
|
+
- `default_ref`: Referencing another parameter array
|
|
77
|
+
|
|
78
|
+
Besides the core features above, it also adds some utility tools:
|
|
79
|
+
|
|
80
|
+
- `display_json_data` : Function to render JSON compliant data as a HTML table in Jupyter notebooks. It also works for numpy data that has numeric data dtypes.
|
|
81
|
+
- `read_json` : Method for reading JSON data file, which automatically can convert numeric list's to numpy.
|
|
82
|
+
- `write_json` : Method for writing JSON data file, which automatically can convert numeric numpy arrays and types to list of build-in types.
|
|
83
|
+
|
|
84
|
+
## Documentation
|
|
85
|
+
|
|
86
|
+
[AESOpt Param Documentation](https://aesopt.pages.windenergy.dtu.dk/aesoptparam)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
aesoptparam/__init__.py,sha256=WS1plVDzZmlXcmnVG5Jqc3oN8on8bbwO4x4Av3U_TFk,280
|
|
2
|
+
aesoptparam/example.py,sha256=hcmxVVq7Q9TjCbLrz-t7o_oVWBjzq-haJGSewIMQHVA,3836
|
|
3
|
+
aesoptparam/parameterized.py,sha256=2ZVdHiuSbgblj-K1zVbrbEyPIhMdns3caTontdJnLhA,16706
|
|
4
|
+
aesoptparam/parameters.py,sha256=ETfYogKI3ewfn5sJr8tHGJn-J5tYc4_1by0_ZFkOavQ,21942
|
|
5
|
+
aesoptparam/serializer.py,sha256=n38JtCymabG8jqS0L3xD0QHlIHDqd4EEKoTOC1dZEYo,3601
|
|
6
|
+
aesoptparam/test/dummy_instance.json,sha256=0tzGKOk4ENq3bF9yMOKGef1ql7xKfkau8MhLvjVyv0o,654
|
|
7
|
+
aesoptparam/test/dummy_schema.json,sha256=cQ02M5Ca95LQpCDa8oltEu1dIjkI1trNxgW54Fgh0Gw,26018
|
|
8
|
+
aesoptparam/test/test_parameterized.py,sha256=yrWbtnG0aoNtRW2m_-Q8mGAuf_jNR1A4hxtSWcPw8Kc,22287
|
|
9
|
+
aesoptparam/test/test_parameters.py,sha256=gqDmlegeUvb6326j7entzLmThLbjP9BO3g3Mu-qWkwM,16849
|
|
10
|
+
aesoptparam/test/test_units.py,sha256=Hu7mLrCVBBPtbjtCWLHKylkRIBPT5ytDgsAfWfVFT1E,9368
|
|
11
|
+
aesoptparam/test/test_utils.py,sha256=sT5_AA6cw4MLD7Uor3Gc2u2ZyPWB95Tq0Crx2L2JrFk,4643
|
|
12
|
+
aesoptparam/utils/__init__.py,sha256=XPi7ACQVWaZi6lEYnLEGDX4B91QFn1wshskaHeJR6Lk,1936
|
|
13
|
+
aesoptparam/utils/html_repr.py,sha256=j9OWd9bVkpSoieDC-NP0hq-Wkh5lr0ogas_9Zuq0_gg,18872
|
|
14
|
+
aesoptparam/utils/json_utils.py,sha256=9ZUazW5-wPiFHnN40uQ5D3sc09WtTA5uY3BVvCQrQO8,3394
|
|
15
|
+
aesoptparam/utils/unit_library.ini,sha256=JPjj-0S91TnIbPbAZF402Ch2ThUlX7s6m9F7HxvBt8I,5877
|
|
16
|
+
aesoptparam/utils/units.py,sha256=83tj5EpbRAiK4NDJZ1yK3Bzi1XSe_VEcNzLjfuur0-Q,29261
|
|
17
|
+
aesoptparam-0.3.7.dist-info/licenses/LICENSE,sha256=ibW0KQU0XMBL4YyHq4VrsUdOfVwiCm0a8mg7vhnnGM0,1069
|
|
18
|
+
aesoptparam-0.3.7.dist-info/METADATA,sha256=fhJB5z1vpRnw035WBYOos_uuX-449z5yAY1uNHaosJc,5463
|
|
19
|
+
aesoptparam-0.3.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
20
|
+
aesoptparam-0.3.7.dist-info/top_level.txt,sha256=3pOxxBNWz5UaENX7nq8QPNS9iNba9MuimiJFVmo5dIw,12
|
|
21
|
+
aesoptparam-0.3.7.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 AESOpt Param
|
|
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 @@
|
|
|
1
|
+
aesoptparam
|