imas-python 0.1.dev1634__py3-none-any.whl → 0.1.dev1636__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 imas-python might be problematic. Click here for more details.
- imas/_version.py +2 -2
- imas/assets/IDSDef.zip +0 -0
- imas/command/cli.py +1 -3
- imas/dd_helpers.py +0 -1
- imas/test/test_dd_helpers.py +56 -133
- {imas_python-0.1.dev1634.dist-info → imas_python-0.1.dev1636.dist-info}/METADATA +1 -1
- {imas_python-0.1.dev1634.dist-info → imas_python-0.1.dev1636.dist-info}/RECORD +11 -11
- {imas_python-0.1.dev1634.dist-info → imas_python-0.1.dev1636.dist-info}/LICENSE.txt +0 -0
- {imas_python-0.1.dev1634.dist-info → imas_python-0.1.dev1636.dist-info}/WHEEL +0 -0
- {imas_python-0.1.dev1634.dist-info → imas_python-0.1.dev1636.dist-info}/entry_points.txt +0 -0
- {imas_python-0.1.dev1634.dist-info → imas_python-0.1.dev1636.dist-info}/top_level.txt +0 -0
imas/_version.py
CHANGED
|
@@ -12,5 +12,5 @@ __version__: str
|
|
|
12
12
|
__version_tuple__: VERSION_TUPLE
|
|
13
13
|
version_tuple: VERSION_TUPLE
|
|
14
14
|
|
|
15
|
-
__version__ = version = '0.1.
|
|
16
|
-
__version_tuple__ = version_tuple = (0, 1, '
|
|
15
|
+
__version__ = version = '0.1.dev1636'
|
|
16
|
+
__version_tuple__ = version_tuple = (0, 1, 'dev1636')
|
imas/assets/IDSDef.zip
CHANGED
|
Binary file
|
imas/command/cli.py
CHANGED
|
@@ -77,9 +77,7 @@ def print_version():
|
|
|
77
77
|
grid.add_row("Available data dictionary versions:", dd_versions)
|
|
78
78
|
grid.add_section()
|
|
79
79
|
try:
|
|
80
|
-
grid.add_row(
|
|
81
|
-
"Access Layer core version:", ll_interface.get_al_version() or "N/A"
|
|
82
|
-
)
|
|
80
|
+
grid.add_row("Access Layer core version:", ll_interface.get_al_version())
|
|
83
81
|
except Exception:
|
|
84
82
|
grid.add_row("Access Layer core version:", "N/A")
|
|
85
83
|
console.Console().print(grid)
|
imas/dd_helpers.py
CHANGED
|
@@ -25,7 +25,6 @@ def prepare_data_dictionaries():
|
|
|
25
25
|
3. Generate IDSDef.xml and rename to IDSDef_${version}.xml
|
|
26
26
|
4. Zip all these IDSDefs together and include in wheel
|
|
27
27
|
"""
|
|
28
|
-
print("prepare_data_dictionaries")
|
|
29
28
|
from git import Repo
|
|
30
29
|
|
|
31
30
|
repo: Repo = get_data_dictionary_repo()
|
imas/test/test_dd_helpers.py
CHANGED
|
@@ -1,134 +1,57 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
import shutil
|
|
1
3
|
import pytest
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
saxon_nonmatches = (
|
|
57
|
-
"/work/imas/opt/EasyBuild/software/Saxon-HE/10.3-Java-11/saxon-he-test-10.3.jar",
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
# find_saxon_bin tries to find saxon in the CLASSPATH env variable
|
|
62
|
-
# It is thus per definition environment dependent
|
|
63
|
-
def test_empty_classpath(monkeypatch):
|
|
64
|
-
monkeypatch.setenv("CLASSPATH", "")
|
|
65
|
-
saxon_jar_path = find_saxon_classpath()
|
|
66
|
-
assert saxon_jar_path is None
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
@pytest.mark.parametrize("cluster,module,path,name", saxon_binary_quadruplets)
|
|
70
|
-
def test_classpath(monkeypatch, cluster, module, path, name):
|
|
71
|
-
monkeypatch.setenv("CLASSPATH", path)
|
|
72
|
-
saxon_jar_path = find_saxon_classpath()
|
|
73
|
-
assert saxon_jar_path == path
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
@pytest.mark.parametrize("path", saxon_nonmatches)
|
|
77
|
-
def test_classpath_do_not_match(monkeypatch, path):
|
|
78
|
-
monkeypatch.setenv("CLASSPATH", path)
|
|
79
|
-
saxon_jar_path = find_saxon_classpath()
|
|
80
|
-
assert saxon_jar_path is None
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
# ITER SDCC login01 20210617
|
|
84
|
-
# module load GCCcore/10.2.0
|
|
85
|
-
# module load Python/3.8.6-GCCcore-10.2.0
|
|
86
|
-
# module load MDSplus/7.96.17-GCCcore-10.2.0
|
|
87
|
-
# module load HDF5/1.10.7-iimpi-2020b # todo: Intel MPI version?
|
|
88
|
-
# module load Boost/1.74.0-GCCcore-10.2.0
|
|
89
|
-
# module load MDSplus-Java/7.96.17-GCCcore-10.2.0-Java-11
|
|
90
|
-
# module load Saxon-HE/10.3-Java-11
|
|
91
|
-
def test_classpath_sdcc(monkeypatch):
|
|
92
|
-
monkeypatch.setenv(
|
|
93
|
-
"CLASSPATH",
|
|
94
|
-
"/work/imas/opt/EasyBuild/software/Saxon-HE/10.3-Java-11/saxon-xqj-10.3.jar:"
|
|
95
|
-
"/work/imas/opt/EasyBuild/software/Saxon-HE/10.3-Java-11/saxon-he-test-10.3.jar:"
|
|
96
|
-
"/work/imas/opt/EasyBuild/software/Saxon-HE/10.3-Java-11/jline-2.9.jar:"
|
|
97
|
-
"/work/imas/opt/EasyBuild/software/Saxon-HE/10.3-Java-11/saxon-he-10.3.jar:"
|
|
98
|
-
"/work/imas/opt/EasyBuild/software/MDSplus-Java/7.96.17-GCCcore-10.2.0-Java-11/java/classes/*",
|
|
99
|
-
)
|
|
100
|
-
saxon_jar_path = find_saxon_classpath()
|
|
101
|
-
assert (
|
|
102
|
-
saxon_jar_path
|
|
103
|
-
== "/work/imas/opt/EasyBuild/software/Saxon-HE/10.3-Java-11/saxon-he-10.3.jar"
|
|
104
|
-
)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
# ITER HPC login01 20210617
|
|
108
|
-
# module load GCCcore/10.2.0
|
|
109
|
-
# module load Python/3.8.6-GCCcore-10.2.0
|
|
110
|
-
# module load MDSplus/7.96.17-GCCcore-10.2.0
|
|
111
|
-
# module load HDF5/1.10.7-iimpi-2020b # todo: Intel MPI version?
|
|
112
|
-
# module load Boost/1.74.0-GCCcore-10.2.0
|
|
113
|
-
# module load MDSplus-Java/7.96.17-GCCcore-10.2.0-Java-11
|
|
114
|
-
# module load Saxon-HE/10.3-Java-11
|
|
115
|
-
def test_classpath_hpc(monkeypatch):
|
|
116
|
-
monkeypatch.setenv(
|
|
117
|
-
"CLASSPATH",
|
|
118
|
-
"/work/imas/opt/EasyBuild/software/Saxon-HE/10.3-Java-11/saxon-xqj-10.3.jar:"
|
|
119
|
-
"/work/imas/opt/EasyBuild/software/Saxon-HE/10.3-Java-11/saxon-he-test-10.3.jar:"
|
|
120
|
-
"/work/imas/opt/EasyBuild/software/Saxon-HE/10.3-Java-11/jline-2.9.jar:"
|
|
121
|
-
"/work/imas/opt/EasyBuild/software/Saxon-HE/10.3-Java-11/saxon-he-10.3.jar:"
|
|
122
|
-
"/work/imas/opt/EasyBuild/software/MDSplus-Java/7.96.17-GCCcore-10.2.0-Java-11/java/classes/*",
|
|
123
|
-
)
|
|
124
|
-
saxon_jar_path = find_saxon_classpath()
|
|
125
|
-
assert (
|
|
126
|
-
saxon_jar_path
|
|
127
|
-
== "/work/imas/opt/EasyBuild/software/Saxon-HE/10.3-Java-11/saxon-he-10.3.jar"
|
|
128
|
-
)
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
# TODO: Write tests!
|
|
132
|
-
# def find_saxon_bin():
|
|
133
|
-
# def get_data_dictionary_repo():
|
|
134
|
-
# def build_data_dictionary():
|
|
4
|
+
import os
|
|
5
|
+
import zipfile
|
|
6
|
+
|
|
7
|
+
from imas.dd_helpers import prepare_data_dictionaries, _idsdef_zip_relpath, _build_dir
|
|
8
|
+
|
|
9
|
+
_idsdef_unzipped_relpath = Path("idsdef_unzipped")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def test_prepare_data_dictionaries():
|
|
13
|
+
prepare_data_dictionaries()
|
|
14
|
+
assert os.path.exists(
|
|
15
|
+
_idsdef_zip_relpath
|
|
16
|
+
), f"IDSDef.zip file does not exist at path: {_idsdef_zip_relpath}"
|
|
17
|
+
|
|
18
|
+
expected_xml_files = [
|
|
19
|
+
_build_dir / "3.40.0.xml",
|
|
20
|
+
_build_dir / "3.41.0.xml",
|
|
21
|
+
_build_dir / "3.42.0.xml",
|
|
22
|
+
_build_dir / "4.0.0.xml",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
for xml_file in expected_xml_files:
|
|
26
|
+
assert os.path.exists(xml_file), f"{xml_file} does not exist"
|
|
27
|
+
|
|
28
|
+
with zipfile.ZipFile(_idsdef_zip_relpath, "r") as zip_ref:
|
|
29
|
+
zip_ref.extractall(_idsdef_unzipped_relpath)
|
|
30
|
+
|
|
31
|
+
expected_ids_directories = [
|
|
32
|
+
_idsdef_unzipped_relpath / "data-dictionary" / "3.40.0.xml",
|
|
33
|
+
_idsdef_unzipped_relpath / "data-dictionary" / "3.41.0.xml",
|
|
34
|
+
_idsdef_unzipped_relpath / "data-dictionary" / "3.42.0.xml",
|
|
35
|
+
_idsdef_unzipped_relpath / "data-dictionary" / "4.0.0.xml",
|
|
36
|
+
_idsdef_unzipped_relpath
|
|
37
|
+
/ "identifiers"
|
|
38
|
+
/ "core_sources"
|
|
39
|
+
/ "core_source_identifier.xml",
|
|
40
|
+
_idsdef_unzipped_relpath
|
|
41
|
+
/ "identifiers"
|
|
42
|
+
/ "equilibrium"
|
|
43
|
+
/ "equilibrium_profiles_2d_identifier.xml",
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
for file_path in expected_ids_directories:
|
|
47
|
+
assert os.path.exists(
|
|
48
|
+
file_path
|
|
49
|
+
), f"Expected_ids_directories {file_path} does not exist"
|
|
50
|
+
|
|
51
|
+
if _build_dir.exists():
|
|
52
|
+
shutil.rmtree(_idsdef_unzipped_relpath)
|
|
53
|
+
print(f"Removed directory: {_idsdef_unzipped_relpath}")
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
if __name__ == "__main__":
|
|
57
|
+
pytest.main()
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
imas/__init__.py,sha256=9OHpTf8gCl7BJVU7U2bf9kWatBNNAhFZdgoFPcHeNQU,878
|
|
2
2
|
imas/__main__.py,sha256=2qXoC0HzV4xkPQAvdubHC4rnK3G6f_2PT9TkkCHYXk8,418
|
|
3
3
|
imas/_util.py,sha256=FXX13glhmgSiw-0LtjH0xv3YlM3Pa9X4jl9yz9Uv7Vs,9484
|
|
4
|
-
imas/_version.py,sha256=
|
|
4
|
+
imas/_version.py,sha256=L1qu88dmPDnDoHucp4m0HmA_8kgY_afUvuk-gTj79bw,425
|
|
5
5
|
imas/db_entry.py,sha256=O76bfCfmH3jlZE8eJmnmPiDNqZYpwo3ooQeHOL83mE4,31767
|
|
6
|
-
imas/dd_helpers.py,sha256=
|
|
6
|
+
imas/dd_helpers.py,sha256=IFRmOWw0VyLuR9Xpe9VeVy1ANq5XpFF4m1rj9RtETKI,6275
|
|
7
7
|
imas/dd_zip.py,sha256=Sz2xP-oWyhmmqEN-JGGNizieGZH8CJ6JlCjqN_0fMvw,10330
|
|
8
8
|
imas/exception.py,sha256=iqsxl6M1gEjJO8YP9UBYt5OQk7faGx0EIs1XJ4YJ71U,3750
|
|
9
9
|
imas/ids_base.py,sha256=zDckve7poXO9vbKPsi_17FjKMTKd6QADork7H7wIS7o,5439
|
|
@@ -22,7 +22,7 @@ imas/ids_toplevel.py,sha256=YHWZewK8JYf34pYzF_oooMILZAHgnuWCFtr0_JFjmzI,14915
|
|
|
22
22
|
imas/setup_logging.py,sha256=auFmrFHh1CA6LVQVwo6WWebUIbCpA_7UedQ6G4h5JzM,1874
|
|
23
23
|
imas/training.py,sha256=JGYjpCubUJDb_Rg0QaaDhNkBHc4Qc376U9fRq24NVXc,1576
|
|
24
24
|
imas/util.py,sha256=dG282-l7m2U_VhjZ0VnQ-BpsWrzgKSxUZ1AZf-_wDOY,17822
|
|
25
|
-
imas/assets/IDSDef.zip,sha256=
|
|
25
|
+
imas/assets/IDSDef.zip,sha256=5mmqN3LVAtiyDeGHdyUOqLWz-PiaeMzQ8e2U9yyhYx4,27383258
|
|
26
26
|
imas/assets/IDSDef2MDSpreTree.xsl,sha256=V9eDmDnxe6oYhDP81gmdYip8cF2yST9dGxmZBaATLdA,7296
|
|
27
27
|
imas/assets/IDS_fake_toplevel.xml,sha256=TJhukQuDHHVTW2U7fK_-KmTQiYOFZMY-ECZXBHQE2mk,18683
|
|
28
28
|
imas/assets/IDS_minimal.xml,sha256=5B6c0J-WPzSChHWwpLPRkNawx9m6v8BM5nC0OQFnWcQ,1740
|
|
@@ -49,14 +49,14 @@ imas/backends/netcdf/ids2nc.py,sha256=rjF6L-JHrwFnOjI-NRBTv15JbHRk2moGukNUCaL_FK
|
|
|
49
49
|
imas/backends/netcdf/nc2ids.py,sha256=bP7Qfl_b_wvpS8SwK_g-ReuBU4KvD6Spi33p528BSCQ,11881
|
|
50
50
|
imas/backends/netcdf/nc_metadata.py,sha256=pTOff1Zzk7uT1BGUV1cnDLVNo4WeTT-7JETR_9LvVIs,16175
|
|
51
51
|
imas/backends/netcdf/nc_validate.py,sha256=gO6jpLsxfIv5hbtIi5MYtN1KtU9yQCVPgG8pHdK7iHQ,2256
|
|
52
|
-
imas/command/cli.py,sha256=
|
|
52
|
+
imas/command/cli.py,sha256=lzVV_PMXBd88J7DmDwaiWiiqMj_2rs5V8dc6kkbUDGw,8401
|
|
53
53
|
imas/command/db_analysis.py,sha256=8ETLMzEgS8z17MEeB10NR28wiQO3TdjEGQHlmbkTjBw,10454
|
|
54
54
|
imas/command/helpers.py,sha256=Hf9Y0Owm9woJklQ6UzwHHum96YgI7R_SKRlksUqnCIs,1499
|
|
55
55
|
imas/command/timer.py,sha256=wvjHJBgkY1VRaRvCFuDDORzZOUV-Q7IxiTxlGzjXBz4,2328
|
|
56
56
|
imas/test/test_all_dd_versions.py,sha256=8T9q9S7Vhwa96y6KUDv7HoeuOPlc6RovEhPZEseDoDs,790
|
|
57
57
|
imas/test/test_cli.py,sha256=pBuAE4ICrCY920CqvHODgJ7Yr2uT1hiGCDQ1HPSTllU,1559
|
|
58
58
|
imas/test/test_dbentry.py,sha256=xfC33VPHIb_B1hGcaLc5rELboeebGbGL_ptN2zZyAkA,4010
|
|
59
|
-
imas/test/test_dd_helpers.py,sha256=
|
|
59
|
+
imas/test/test_dd_helpers.py,sha256=eQF8EgTh2h46Waph2n3e_DYTA_wdAy76FihZpY3sToc,1743
|
|
60
60
|
imas/test/test_dd_zip.py,sha256=SgKPufIvk3tK_Q4JpHKq57g0lKthEj1IgcdZ2c-IzwI,820
|
|
61
61
|
imas/test/test_deepcopy.py,sha256=vYTwpEqRpi-G-xVSRWVIwLL_jBY7f6v31QPOU0e_FKs,606
|
|
62
62
|
imas/test/test_exception.py,sha256=bL_JlWsdtT-emKkSHx1yFbDKLqWOx8piCFBNHJ4osig,408
|
|
@@ -101,9 +101,9 @@ imas/test/test_str_1d.py,sha256=d6GrmV4OYG9f4ludjZBmuqyKOM9XIExTqMh8aQ1UJcQ,3453
|
|
|
101
101
|
imas/test/test_time_slicing.py,sha256=FwbdggRJ75Suc268-89daCSaVXhzl8pZZm3Od13EiR4,6959
|
|
102
102
|
imas/test/test_uda_support.py,sha256=AmakuexebZfJ2-vk_DHfNRPwHmNM2RnwzXqT0eWwWJ0,338
|
|
103
103
|
imas/test/test_util.py,sha256=BW5EbL-QDIrJNH7tjBgqOacJY0TXvMidXVKpIVZlv1I,6775
|
|
104
|
-
imas_python-0.1.
|
|
105
|
-
imas_python-0.1.
|
|
106
|
-
imas_python-0.1.
|
|
107
|
-
imas_python-0.1.
|
|
108
|
-
imas_python-0.1.
|
|
109
|
-
imas_python-0.1.
|
|
104
|
+
imas_python-0.1.dev1636.dist-info/LICENSE.txt,sha256=RzxtV7MG0zbF6dDvQsaZ1OKsHZ7CRyeILenjUIol5rs,7651
|
|
105
|
+
imas_python-0.1.dev1636.dist-info/METADATA,sha256=WhhHkwX5Wr5IxwIxaDhjdlCvz8jFxFLGJ-FdtWrY9zk,13446
|
|
106
|
+
imas_python-0.1.dev1636.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
107
|
+
imas_python-0.1.dev1636.dist-info/entry_points.txt,sha256=e8oXj2SLwyFEiBeJRaAXRc9EYQ8eHWWn7NWdjixjeDM,99
|
|
108
|
+
imas_python-0.1.dev1636.dist-info/top_level.txt,sha256=_WFOlA1rmpYm0T73sNo5Ntvs7S3x4cR7UE8Oy5I5eJA,5
|
|
109
|
+
imas_python-0.1.dev1636.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|