foxes 0.5.0.1__py3-none-any.whl → 0.5.1__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.
Potentially problematic release.
This version of foxes might be problematic. Click here for more details.
- foxes/VERSION +1 -1
- foxes/input/windio/windio.py +3 -7
- foxes/models/model_book.py +0 -7
- foxes/utils/__init__.py +1 -0
- foxes/utils/load.py +30 -0
- {foxes-0.5.0.1.dist-info → foxes-0.5.1.dist-info}/METADATA +11 -1
- {foxes-0.5.0.1.dist-info → foxes-0.5.1.dist-info}/RECORD +11 -10
- {foxes-0.5.0.1.dist-info → foxes-0.5.1.dist-info}/LICENSE +0 -0
- {foxes-0.5.0.1.dist-info → foxes-0.5.1.dist-info}/WHEEL +0 -0
- {foxes-0.5.0.1.dist-info → foxes-0.5.1.dist-info}/top_level.txt +0 -0
- {foxes-0.5.0.1.dist-info → foxes-0.5.1.dist-info}/zip-safe +0 -0
foxes/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.5.
|
|
1
|
+
0.5.1
|
foxes/input/windio/windio.py
CHANGED
|
@@ -6,15 +6,10 @@ from foxes.models import ModelBook
|
|
|
6
6
|
from foxes.input.states import StatesTable
|
|
7
7
|
from foxes.input.farm_layout import add_from_df
|
|
8
8
|
from foxes.models.turbine_types import CpCtFromTwo
|
|
9
|
+
from foxes.utils import import_module
|
|
9
10
|
import foxes.constants as FC
|
|
10
11
|
import foxes.variables as FV
|
|
11
12
|
|
|
12
|
-
try:
|
|
13
|
-
from windIO.utils.yml_utils import load_yaml
|
|
14
|
-
except ModuleNotFoundError:
|
|
15
|
-
def load_yaml(*args, **kwargs):
|
|
16
|
-
raise ModuleNotFoundError("Please install windio, e.g. by 'pip install windio'")
|
|
17
|
-
|
|
18
13
|
def read_resource(res, fixed_vars={}, **kwargs):
|
|
19
14
|
"""
|
|
20
15
|
Reads a WindIO energy resource
|
|
@@ -264,7 +259,8 @@ def read_case(case_yaml, site_pars={}, farm_pars={}, ana_pars={}):
|
|
|
264
259
|
:group: input.windio
|
|
265
260
|
|
|
266
261
|
"""
|
|
267
|
-
|
|
262
|
+
yml_utils = import_module("windIO.utils.yml_utils", hint="pip install windio")
|
|
263
|
+
case = yml_utils.load_yaml(case_yaml)
|
|
268
264
|
|
|
269
265
|
site_yaml = case["site"]
|
|
270
266
|
states = read_site(site_yaml, **site_pars)
|
foxes/models/model_book.py
CHANGED
foxes/utils/__init__.py
CHANGED
|
@@ -9,6 +9,7 @@ from .data_book import DataBook
|
|
|
9
9
|
from .plotly_helpers import show_plotly_fig
|
|
10
10
|
from .cubic_roots import cubic_roots
|
|
11
11
|
from .geopandas_helpers import read_shp, shp2csv, read_shp_polygons, shp2geom2d
|
|
12
|
+
from .load import import_module
|
|
12
13
|
|
|
13
14
|
from . import two_circles
|
|
14
15
|
from . import abl
|
foxes/utils/load.py
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import importlib
|
|
2
|
+
|
|
3
|
+
def import_module(name, package=None, hint=None):
|
|
4
|
+
"""
|
|
5
|
+
Imports a module dynamically.
|
|
6
|
+
|
|
7
|
+
Parameters
|
|
8
|
+
----------
|
|
9
|
+
name: str
|
|
10
|
+
The module name
|
|
11
|
+
package: str, optional
|
|
12
|
+
The explicit package name, deduced from name
|
|
13
|
+
if not given
|
|
14
|
+
hint: str, optional
|
|
15
|
+
Installation advice, in case the import fails
|
|
16
|
+
|
|
17
|
+
Returns
|
|
18
|
+
-------
|
|
19
|
+
mdl: module
|
|
20
|
+
The imnported package
|
|
21
|
+
|
|
22
|
+
:group: utils
|
|
23
|
+
|
|
24
|
+
"""
|
|
25
|
+
try:
|
|
26
|
+
return importlib.import_module(name, package)
|
|
27
|
+
except ModuleNotFoundError:
|
|
28
|
+
mdl = name if package is None else f"{package}.{name}"
|
|
29
|
+
hint = hint if hint is not None else f"pip install {name}"
|
|
30
|
+
raise ModuleNotFoundError(f"Module '{mdl}' not found, maybe try '{hint}'")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: foxes
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.1
|
|
4
4
|
Summary: Farm Optimization and eXtended yield Evaluation Software
|
|
5
5
|
Author: Fraunhofer IWES
|
|
6
6
|
Author-email: jonas.schmidt@iwes.fraunhofer.de
|
|
@@ -26,6 +26,16 @@ Requires-Dist: plotly
|
|
|
26
26
|
Requires-Dist: kaleido
|
|
27
27
|
Requires-Dist: iwopy >=0.1.4
|
|
28
28
|
Requires-Dist: pymoo >=0.6
|
|
29
|
+
Provides-Extra: all
|
|
30
|
+
Requires-Dist: windio >=1.0 ; extra == 'all'
|
|
31
|
+
Requires-Dist: flake8 ; extra == 'all'
|
|
32
|
+
Requires-Dist: pytest ; extra == 'all'
|
|
33
|
+
Requires-Dist: sphinx ; extra == 'all'
|
|
34
|
+
Requires-Dist: sphinx-immaterial ; extra == 'all'
|
|
35
|
+
Requires-Dist: nbsphinx ; extra == 'all'
|
|
36
|
+
Requires-Dist: ipykernel ; extra == 'all'
|
|
37
|
+
Requires-Dist: ipywidgets ; extra == 'all'
|
|
38
|
+
Requires-Dist: m2r2 ; extra == 'all'
|
|
29
39
|
Provides-Extra: doc
|
|
30
40
|
Requires-Dist: sphinx ; extra == 'doc'
|
|
31
41
|
Requires-Dist: sphinx-immaterial ; extra == 'doc'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
foxes/VERSION,sha256=
|
|
1
|
+
foxes/VERSION,sha256=q6lRYmyGkM5JPLyPAYIFu0aAA_YfvwD9PTxxzrq8AXc,6
|
|
2
2
|
foxes/__init__.py,sha256=erRuJI5EwU2AT9VtAshlP6DAmKO4kh0lfpnMw1sdlsM,717
|
|
3
3
|
foxes/constants.py,sha256=5MhlbsIEpOyisYwG9DfJarB0xCIcaDyhNMnnzbEr7Aw,2373
|
|
4
4
|
foxes/variables.py,sha256=GX_UonLKorN4ptypR5mLqbISfM-nLHpOv8v0tRcJmto,4261
|
|
@@ -77,9 +77,9 @@ foxes/input/states/states_table.py,sha256=e-sdZxrC72PmZTuLUy8z-k2O5MU13mt1A3lmbG
|
|
|
77
77
|
foxes/input/states/create/__init__.py,sha256=hSJWySDF0PXB9Tpw45je0wIDAQ8U-bEa4qxsb44aKBk,81
|
|
78
78
|
foxes/input/states/create/random_abl_states.py,sha256=3_CogT5CWjk63VBIkUaHI_fVjaepg8kX4JBAqU-atOg,3262
|
|
79
79
|
foxes/input/windio/__init__.py,sha256=QcOt6QfCBR_Fkh-EkCYrlXTTKMphTa-1rK0hmVnM5X4,88
|
|
80
|
-
foxes/input/windio/windio.py,sha256=
|
|
80
|
+
foxes/input/windio/windio.py,sha256=dP4O6A1o8d6DNKd_GKhxf74Dcit4jCLR0A_ZnRs_5Cs,7947
|
|
81
81
|
foxes/models/__init__.py,sha256=qrt0eueFjM5BZP53WtLBTIJyJHZz9w5wv6QWJVdXThM,375
|
|
82
|
-
foxes/models/model_book.py,sha256=
|
|
82
|
+
foxes/models/model_book.py,sha256=tx-CUu10iSvyd1ol7t5EGJMOqDHu8lIOIJcgRL7Av2I,14892
|
|
83
83
|
foxes/models/farm_controllers/__init__.py,sha256=MY4IpcE8qw8WPdgMbyCWYOHJ49W-U3eHrBfJxaH9Ayc,71
|
|
84
84
|
foxes/models/farm_controllers/basic.py,sha256=6pinNXiyfoG3apXhqQWcnxx4vN_7Q63YryXX5Z7kTE0,249
|
|
85
85
|
foxes/models/farm_models/__init__.py,sha256=HoyMo2pDgJw770_wc4T5-VkPJpOsvkwILWusrsadICk,65
|
|
@@ -195,11 +195,12 @@ foxes/output/flow_plots_2d/__init__.py,sha256=llzVADTeEjpd7gtH9nvDch38Cu7Lzm0pMM
|
|
|
195
195
|
foxes/output/flow_plots_2d/common.py,sha256=D9ijH0p7FDGzvPMjJ8cx42eUL2EW2eIQra3M2Ka2heA,15993
|
|
196
196
|
foxes/output/flow_plots_2d/flow_plots.py,sha256=1PvMs2rFZMNSrb0mHhAO9qDmb5SUeT2Y2_NRc0vIUvc,33736
|
|
197
197
|
foxes/output/flow_plots_2d/seq_flow_ani_plugin.py,sha256=E5BWEXEZiwb7ju32ONzerJOpaUdQMOkld-Hez7SuEwM,2395
|
|
198
|
-
foxes/utils/__init__.py,sha256=
|
|
198
|
+
foxes/utils/__init__.py,sha256=1hZgQd5uG-3sVMuuwL_jk9d1cUvp-DBfEkTwfkX6BrU,512
|
|
199
199
|
foxes/utils/cubic_roots.py,sha256=u2Pf-yHZ6EASpFONMfkv0mvldmd1E1VRZxj69YabDoc,3321
|
|
200
200
|
foxes/utils/data_book.py,sha256=DgxusriNH-fhHNN_v6TY3QWcAnrAcw20Wgz7lDfbMeg,5302
|
|
201
201
|
foxes/utils/dict.py,sha256=s922OY22wOKBMbzQ_g-T-MhEw1dga0d3CCwFwd0nI78,886
|
|
202
202
|
foxes/utils/geopandas_helpers.py,sha256=inVQHMco6Op7YN3VFH1DGAJZWREuveJUS7gyoRudw2A,7895
|
|
203
|
+
foxes/utils/load.py,sha256=rR04QsJ8MTzTgyDPTHPYpllFHAzWtrR8QuAXYZ1SiBc,781
|
|
203
204
|
foxes/utils/pandas_helpers.py,sha256=iFijkt7GfsWYhP9Cn92zg8Wj-BPaihJfmYBXTddQQc4,4627
|
|
204
205
|
foxes/utils/plotly_helpers.py,sha256=MHwyKGjajkgwcF2kDUMT6Midd-GCw3dChMvXBqLw5YY,369
|
|
205
206
|
foxes/utils/subclasses.py,sha256=bnlZaLgGjq9cQC9dvsxahUmLQQlSmmun35TjWYyX9CA,380
|
|
@@ -219,9 +220,9 @@ foxes/utils/geom2d/half_plane.py,sha256=kzZD6pkZxZ03MK9WAboWzXb5Ws5dWLQY9GIahD4D
|
|
|
219
220
|
foxes/utils/geom2d/polygon.py,sha256=8ASfy7No_-Pt_xDSeNsDtLEkCjBWsNZK8nIxDQtqeOE,5534
|
|
220
221
|
foxes/utils/runners/__init__.py,sha256=-WL4ZmdgNYldkqhCV6dR-aXCumBrH-Ea-V1shsRhsbs,55
|
|
221
222
|
foxes/utils/runners/runners.py,sha256=cQo_s4v0VRPyfLn3KDubQWDMCcirWs_IgtKMtD23CH4,6502
|
|
222
|
-
foxes-0.5.
|
|
223
|
-
foxes-0.5.
|
|
224
|
-
foxes-0.5.
|
|
225
|
-
foxes-0.5.
|
|
226
|
-
foxes-0.5.
|
|
227
|
-
foxes-0.5.
|
|
223
|
+
foxes-0.5.1.dist-info/LICENSE,sha256=bBCH6mYTPzSepk2s2UUZ3II_ZYXrn1bnSqB85-aZHxU,1071
|
|
224
|
+
foxes-0.5.1.dist-info/METADATA,sha256=yHjTbze2rotdPNoBQoOIhdP7ra9-oXIzr9fgCLJzkng,9079
|
|
225
|
+
foxes-0.5.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
226
|
+
foxes-0.5.1.dist-info/top_level.txt,sha256=B4spGR6JHsVHz7CEXsa68xsjYalAA70nBwHa1gfyRHc,6
|
|
227
|
+
foxes-0.5.1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
228
|
+
foxes-0.5.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|