wavesimpro 0.9.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.
- wavesimpro-0.9.0/PKG-INFO +21 -0
- wavesimpro-0.9.0/pyproject.toml +40 -0
- wavesimpro-0.9.0/setup.cfg +4 -0
- wavesimpro-0.9.0/src/wavesimpro/__init__.py +98 -0
- wavesimpro-0.9.0/src/wavesimpro/__main__.py +29 -0
- wavesimpro-0.9.0/src/wavesimpro/binary_utils.py +936 -0
- wavesimpro-0.9.0/src/wavesimpro/client.py +1475 -0
- wavesimpro-0.9.0/src/wavesimpro/config.py +123 -0
- wavesimpro-0.9.0/src/wavesimpro/exceptions.py +40 -0
- wavesimpro-0.9.0/src/wavesimpro/execute.py +461 -0
- wavesimpro-0.9.0/src/wavesimpro/json_helper.py +755 -0
- wavesimpro-0.9.0/src/wavesimpro/py.typed +4 -0
- wavesimpro-0.9.0/src/wavesimpro/setup.py +162 -0
- wavesimpro-0.9.0/src/wavesimpro/simulate.py +162 -0
- wavesimpro-0.9.0/src/wavesimpro/validate.py +251 -0
- wavesimpro-0.9.0/src/wavesimpro.egg-info/PKG-INFO +21 -0
- wavesimpro-0.9.0/src/wavesimpro.egg-info/SOURCES.txt +18 -0
- wavesimpro-0.9.0/src/wavesimpro.egg-info/dependency_links.txt +1 -0
- wavesimpro-0.9.0/src/wavesimpro.egg-info/requires.txt +8 -0
- wavesimpro-0.9.0/src/wavesimpro.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: wavesimpro
|
|
3
|
+
Version: 0.9.0
|
|
4
|
+
Summary: WavesimPro Python API — cloud execution client for the Rayfos simulation platform
|
|
5
|
+
Author: Rayfos
|
|
6
|
+
Project-URL: Repository, https://github.com/rayfos/wavesimpro
|
|
7
|
+
Keywords: wavesim,simulation,electromagnetic,rayfos,api
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Topic :: Scientific/Engineering
|
|
13
|
+
Requires-Python: >=3.8
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
Requires-Dist: numpy>=1.20.0
|
|
16
|
+
Requires-Dist: requests>=2.28.0
|
|
17
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
18
|
+
Provides-Extra: dev
|
|
19
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
20
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
21
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=64", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "wavesimpro"
|
|
7
|
+
version = "0.9.0"
|
|
8
|
+
description = "WavesimPro Python API — cloud execution client for the Rayfos simulation platform"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
authors = [{ name = "Rayfos" }]
|
|
12
|
+
keywords = ["wavesim", "simulation", "electromagnetic", "rayfos", "api"]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 4 - Beta",
|
|
15
|
+
"Intended Audience :: Developers",
|
|
16
|
+
"Intended Audience :: Science/Research",
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Topic :: Scientific/Engineering",
|
|
19
|
+
]
|
|
20
|
+
dependencies = [
|
|
21
|
+
"numpy>=1.20.0",
|
|
22
|
+
"requests>=2.28.0",
|
|
23
|
+
"python-dotenv>=1.0.0",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[project.optional-dependencies]
|
|
27
|
+
dev = [
|
|
28
|
+
"pytest>=7.0.0",
|
|
29
|
+
"black>=23.0.0",
|
|
30
|
+
"mypy>=1.0.0",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[project.urls]
|
|
34
|
+
Repository = "https://github.com/rayfos/wavesimpro"
|
|
35
|
+
|
|
36
|
+
[tool.setuptools.packages.find]
|
|
37
|
+
where = ["src"]
|
|
38
|
+
|
|
39
|
+
[tool.setuptools.package-data]
|
|
40
|
+
wavesimpro = ["py.typed"]
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"""
|
|
2
|
+
wavesimpro - A Python client library for RayfosJobServer and RayfosMachineService
|
|
3
|
+
|
|
4
|
+
This package provides a simple interface to interact with RayfosJobServer,
|
|
5
|
+
supporting both cloud and local deployment modes, as well as direct interaction
|
|
6
|
+
with RayfosMachineService via its REST API.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from .client import RayfosClient
|
|
10
|
+
from .config import ClientConfig
|
|
11
|
+
from .exceptions import (
|
|
12
|
+
RayfosAPIError,
|
|
13
|
+
AuthenticationError,
|
|
14
|
+
NotFoundError,
|
|
15
|
+
ValidationError,
|
|
16
|
+
ServerError,
|
|
17
|
+
ConfigurationError,
|
|
18
|
+
)
|
|
19
|
+
from .binary_utils import (
|
|
20
|
+
upload_array_as_binary,
|
|
21
|
+
upload_array_as_binary_zipped,
|
|
22
|
+
upload_source_field_as_binary,
|
|
23
|
+
upload_source_field_as_binary_zipped,
|
|
24
|
+
read_binary_field,
|
|
25
|
+
write_array_to_binary,
|
|
26
|
+
write_monitor_binary,
|
|
27
|
+
read_monitor_binary,
|
|
28
|
+
is_rmon_file,
|
|
29
|
+
VoxelDataFormat,
|
|
30
|
+
)
|
|
31
|
+
from .validate import validate_parameters, ParameterValidationError
|
|
32
|
+
from .execute import execute_via_api
|
|
33
|
+
from .simulate import simulate, configure
|
|
34
|
+
from .json_helper import (
|
|
35
|
+
create_simulation_domain,
|
|
36
|
+
create_stl_primitive,
|
|
37
|
+
create_box_primitive,
|
|
38
|
+
create_medium,
|
|
39
|
+
create_point_source,
|
|
40
|
+
create_plane_wave_source,
|
|
41
|
+
create_gaussian_beam_source,
|
|
42
|
+
create_voxels_model_primitive,
|
|
43
|
+
create_custom_field_source,
|
|
44
|
+
create_custom_from_file_source,
|
|
45
|
+
create_field_monitor,
|
|
46
|
+
create_flux_monitor,
|
|
47
|
+
create_permittivity_monitor,
|
|
48
|
+
create_wavesim_properties,
|
|
49
|
+
parse_progress_data,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
__version__ = "0.9.0"
|
|
53
|
+
__all__ = [
|
|
54
|
+
# Client
|
|
55
|
+
"RayfosClient",
|
|
56
|
+
"ClientConfig",
|
|
57
|
+
# Exceptions
|
|
58
|
+
"RayfosAPIError",
|
|
59
|
+
"AuthenticationError",
|
|
60
|
+
"NotFoundError",
|
|
61
|
+
"ValidationError",
|
|
62
|
+
"ServerError",
|
|
63
|
+
"ConfigurationError",
|
|
64
|
+
"ParameterValidationError",
|
|
65
|
+
# Binary utilities
|
|
66
|
+
"upload_array_as_binary",
|
|
67
|
+
"upload_array_as_binary_zipped",
|
|
68
|
+
"upload_source_field_as_binary",
|
|
69
|
+
"upload_source_field_as_binary_zipped",
|
|
70
|
+
"read_binary_field",
|
|
71
|
+
"write_array_to_binary",
|
|
72
|
+
"write_monitor_binary",
|
|
73
|
+
"read_monitor_binary",
|
|
74
|
+
"is_rmon_file",
|
|
75
|
+
"VoxelDataFormat",
|
|
76
|
+
# Validation
|
|
77
|
+
"validate_parameters",
|
|
78
|
+
# High-level execution
|
|
79
|
+
"execute_via_api",
|
|
80
|
+
"simulate",
|
|
81
|
+
"configure",
|
|
82
|
+
# JSON helpers
|
|
83
|
+
"create_simulation_domain",
|
|
84
|
+
"create_stl_primitive",
|
|
85
|
+
"create_box_primitive",
|
|
86
|
+
"create_medium",
|
|
87
|
+
"create_point_source",
|
|
88
|
+
"create_plane_wave_source",
|
|
89
|
+
"create_gaussian_beam_source",
|
|
90
|
+
"create_voxels_model_primitive",
|
|
91
|
+
"create_custom_field_source",
|
|
92
|
+
"create_custom_from_file_source",
|
|
93
|
+
"create_field_monitor",
|
|
94
|
+
"create_flux_monitor",
|
|
95
|
+
"create_permittivity_monitor",
|
|
96
|
+
"create_wavesim_properties",
|
|
97
|
+
"parse_progress_data",
|
|
98
|
+
]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Interactive setup wizard for wavesimPro_api.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
python -m wavesimPro_api
|
|
6
|
+
python -m wavesimPro_api setup
|
|
7
|
+
python -m wavesimPro_api status
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
import sys
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def main():
|
|
14
|
+
command = sys.argv[1] if len(sys.argv) > 1 else "setup"
|
|
15
|
+
|
|
16
|
+
if command == "setup":
|
|
17
|
+
from .setup import run_setup
|
|
18
|
+
run_setup()
|
|
19
|
+
elif command == "status":
|
|
20
|
+
from .setup import run_status
|
|
21
|
+
run_status()
|
|
22
|
+
else:
|
|
23
|
+
print(f"Unknown command: {command}")
|
|
24
|
+
print("Usage: python -m wavesimPro_api [setup|status]")
|
|
25
|
+
sys.exit(1)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
if __name__ == "__main__":
|
|
29
|
+
main()
|