imas-python 2.0.0.post1__tar.gz → 2.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.
Files changed (237) hide show
  1. imas_python-2.1.0/.github/CODEOWNERS +10 -0
  2. {imas_python-2.0.0.post1 → imas_python-2.1.0}/.github/workflows/test_with_pytest.yml +2 -4
  3. {imas_python-2.0.0.post1 → imas_python-2.1.0}/PKG-INFO +20 -10
  4. {imas_python-2.0.0.post1 → imas_python-2.1.0}/README.md +11 -4
  5. {imas_python-2.0.0.post1 → imas_python-2.1.0}/benchmarks/core_profiles.py +49 -54
  6. {imas_python-2.0.0.post1 → imas_python-2.1.0}/benchmarks/edge_profiles.py +20 -25
  7. {imas_python-2.0.0.post1 → imas_python-2.1.0}/benchmarks/utils.py +8 -24
  8. {imas_python-2.0.0.post1 → imas_python-2.1.0}/conftest.py +7 -0
  9. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/changelog.rst +55 -2
  10. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/cli.rst +2 -2
  11. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/conf.py +4 -4
  12. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/dd_versions.rst +4 -4
  13. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/analyze.rst +21 -9
  14. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/explore.rst +2 -2
  15. imas_python-2.1.0/docs/source/courses/basic/imas_snippets/explore_data_entry.py +11 -0
  16. imas_python-2.1.0/docs/source/examples/custom_conversion_em_coupling.py +168 -0
  17. imas_python-2.1.0/docs/source/examples/custom_conversion_em_coupling.rst +13 -0
  18. imas_python-2.1.0/docs/source/examples.rst +14 -0
  19. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/identifiers.rst +100 -5
  20. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/imas_architecture.rst +0 -4
  21. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/index.rst +1 -0
  22. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/installing.rst +23 -0
  23. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/lazy_loading.rst +10 -1
  24. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/multi-dd.rst +110 -16
  25. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/__init__.py +0 -1
  26. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/_version.py +16 -3
  27. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/imas_core/al_context.py +4 -4
  28. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/imas_core/db_entry_al.py +71 -93
  29. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/imas_core/imas_interface.py +6 -32
  30. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/imas_core/mdsplus_model.py +10 -24
  31. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/netcdf/nc2ids.py +6 -3
  32. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/command/cli.py +0 -1
  33. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/command/db_analysis.py +102 -7
  34. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/command/helpers.py +1 -1
  35. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/db_entry.py +35 -35
  36. imas_python-2.1.0/imas/dd_zip.py +109 -0
  37. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/exception.py +6 -17
  38. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_convert.py +486 -89
  39. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_coordinates.py +4 -3
  40. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_factory.py +8 -5
  41. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_identifiers.py +30 -15
  42. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_structure.py +4 -3
  43. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_toplevel.py +8 -17
  44. imas_python-2.1.0/imas/test/test_cli.py +102 -0
  45. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_dbentry.py +1 -6
  46. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_helpers.py +66 -55
  47. imas_python-2.1.0/imas/test/test_identifiers.py +295 -0
  48. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_convert.py +304 -22
  49. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_lazy_loading.py +5 -3
  50. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_time_slicing.py +0 -7
  51. imas_python-2.1.0/imas/training.py +26 -0
  52. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas_python.egg-info/PKG-INFO +20 -10
  53. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas_python.egg-info/SOURCES.txt +5 -10
  54. imas_python-2.1.0/imas_python.egg-info/entry_points.txt +2 -0
  55. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas_python.egg-info/requires.txt +7 -4
  56. {imas_python-2.0.0.post1 → imas_python-2.1.0}/pyproject.toml +9 -8
  57. imas_python-2.0.0.post1/ci/build_dd_zip.sh +0 -30
  58. imas_python-2.0.0.post1/ci/build_docs_and_dist.sh +0 -45
  59. imas_python-2.0.0.post1/ci/linting.sh +0 -35
  60. imas_python-2.0.0.post1/ci/run_benchmark.sh +0 -79
  61. imas_python-2.0.0.post1/ci/run_pytest.sh +0 -46
  62. imas_python-2.0.0.post1/imas/assets/IDSDef.zip +0 -0
  63. imas_python-2.0.0.post1/imas/dd_helpers.py +0 -167
  64. imas_python-2.0.0.post1/imas/dd_zip.py +0 -297
  65. imas_python-2.0.0.post1/imas/test/test_cli.py +0 -50
  66. imas_python-2.0.0.post1/imas/test/test_dd_helpers.py +0 -53
  67. imas_python-2.0.0.post1/imas/test/test_identifiers.py +0 -105
  68. imas_python-2.0.0.post1/imas/training.py +0 -45
  69. imas_python-2.0.0.post1/imas_python.egg-info/entry_points.txt +0 -3
  70. imas_python-2.0.0.post1/imas_python.egg-info/not-zip-safe +0 -1
  71. imas_python-2.0.0.post1/setup.py +0 -140
  72. {imas_python-2.0.0.post1 → imas_python-2.1.0}/.git-blame-ignore-revs +0 -0
  73. {imas_python-2.0.0.post1 → imas_python-2.1.0}/.git_archival.txt +0 -0
  74. {imas_python-2.0.0.post1 → imas_python-2.1.0}/.gitattributes +0 -0
  75. {imas_python-2.0.0.post1 → imas_python-2.1.0}/.github/workflows/linting.yml +0 -0
  76. {imas_python-2.0.0.post1 → imas_python-2.1.0}/.github/workflows/publish.yml +0 -0
  77. {imas_python-2.0.0.post1 → imas_python-2.1.0}/.github/workflows/verify_sphinx_doc.yml +0 -0
  78. {imas_python-2.0.0.post1 → imas_python-2.1.0}/.gitignore +0 -0
  79. {imas_python-2.0.0.post1 → imas_python-2.1.0}/.pylintrc +0 -0
  80. {imas_python-2.0.0.post1 → imas_python-2.1.0}/.readthedocs.yml +0 -0
  81. {imas_python-2.0.0.post1 → imas_python-2.1.0}/CODE_OF_CONDUCT.md +0 -0
  82. {imas_python-2.0.0.post1 → imas_python-2.1.0}/CONTRIBUTING.md +0 -0
  83. {imas_python-2.0.0.post1 → imas_python-2.1.0}/LICENSE.txt +0 -0
  84. {imas_python-2.0.0.post1 → imas_python-2.1.0}/MANIFEST.in +0 -0
  85. {imas_python-2.0.0.post1 → imas_python-2.1.0}/asv.conf.json +0 -0
  86. {imas_python-2.0.0.post1 → imas_python-2.1.0}/benchmarks/__init__.py +0 -0
  87. {imas_python-2.0.0.post1 → imas_python-2.1.0}/benchmarks/technical.py +0 -0
  88. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/.gitignore +0 -0
  89. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/Makefile +0 -0
  90. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/.gitignore +0 -0
  91. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/_static/imas.css +0 -0
  92. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/_static/imas_200x200.png +0 -0
  93. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/_templates/autosummary/accessor.rst +0 -0
  94. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/_templates/autosummary/accessor_attribute.rst +0 -0
  95. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/_templates/autosummary/accessor_callable.rst +0 -0
  96. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/_templates/autosummary/accessor_method.rst +0 -0
  97. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/_templates/autosummary/base.rst +0 -0
  98. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/_templates/custom-class-template.rst +0 -0
  99. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/_templates/custom-module-template.rst +0 -0
  100. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/_templates/layout.html +0 -0
  101. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/api-hidden.rst +0 -0
  102. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/api.rst +0 -0
  103. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/benchmarking.rst +0 -0
  104. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/ci_config.rst +0 -0
  105. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/code_style.rst +0 -0
  106. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/configuring.rst +0 -0
  107. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/explore.rst +0 -0
  108. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/hashing.rst +0 -0
  109. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/alternative_coordinates.py +0 -0
  110. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/autoconvert_get.py +0 -0
  111. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/autoconvert_put.py +0 -0
  112. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/calc_with_units.py +0 -0
  113. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/coordinates.py +0 -0
  114. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/dd_versions.py +0 -0
  115. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/explore_data.py +0 -0
  116. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/explore_structures.py +0 -0
  117. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/hashing.py +0 -0
  118. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/ids_convert.py +0 -0
  119. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/ids_to_xarray.py +0 -0
  120. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/tensorized_ids_to_xarray.py +0 -0
  121. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/metadata.rst +0 -0
  122. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/xarray.rst +0 -0
  123. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced_user_training.rst +0 -0
  124. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/core_profiles_ne_timeslice.png +0 -0
  125. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/core_profiles_te.png +0 -0
  126. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/create.rst +0 -0
  127. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_inspect.png +0 -0
  128. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/create_core_profiles.py +0 -0
  129. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/explore_public_ec_launchers.py +0 -0
  130. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/explore_public_pf_active.py +0 -0
  131. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/explore_training_data.py +0 -0
  132. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/find_paths.py +0 -0
  133. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/iterate_core_profiles.py +0 -0
  134. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/plot_core_profiles_ne_timeslice.py +0 -0
  135. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/plot_core_profiles_te.py +0 -0
  136. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/print_idss.py +0 -0
  137. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/read_core_profiles_ne_timeslice.py +0 -0
  138. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/read_equilibrium_time_array.py +0 -0
  139. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/read_whole_equilibrium.py +0 -0
  140. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/transform_grid.py +0 -0
  141. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/interactive_tab_core_profiles_toplevel.png +0 -0
  142. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/print_tree_ids_properties.png +0 -0
  143. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/setup.rst +0 -0
  144. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/transform.rst +0 -0
  145. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic_user_training.rst +0 -0
  146. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/imas_structure.png +0 -0
  147. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/intro.rst +0 -0
  148. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/mdsplus.rst +0 -0
  149. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/metadata.rst +0 -0
  150. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/netcdf/conventions.rst +0 -0
  151. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/netcdf.rst +0 -0
  152. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/release_imas.rst +0 -0
  153. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/resampling.rst +0 -0
  154. {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/validation.rst +0 -0
  155. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/__main__.py +0 -0
  156. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/_to_xarray.py +0 -0
  157. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/_util.py +0 -0
  158. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/IDSDef2MDSpreTree.xsl +0 -0
  159. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/IDS_fake_toplevel.xml +0 -0
  160. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/IDS_minimal.xml +0 -0
  161. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/IDS_minimal_2.xml +0 -0
  162. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/IDS_minimal_struct_array.xml +0 -0
  163. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/IDS_minimal_types.xml +0 -0
  164. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/ITER_134173_106_core_profiles.ids +0 -0
  165. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/ITER_134173_106_equilibrium.ids +0 -0
  166. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/README.md +0 -0
  167. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/core_profiles.ids +0 -0
  168. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/equilibrium.ids +0 -0
  169. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/__init__.py +0 -0
  170. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/db_entry_impl.py +0 -0
  171. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/imas_core/__init__.py +0 -0
  172. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/imas_core/db_entry_helpers.py +0 -0
  173. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/imas_core/uda_support.py +0 -0
  174. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/netcdf/__init__.py +0 -0
  175. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/netcdf/db_entry_nc.py +0 -0
  176. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/netcdf/ids2nc.py +0 -0
  177. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/netcdf/ids_tensorizer.py +0 -0
  178. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/netcdf/iterators.py +0 -0
  179. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/netcdf/nc_metadata.py +0 -0
  180. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/netcdf/nc_validate.py +0 -0
  181. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/command/timer.py +0 -0
  182. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_base.py +0 -0
  183. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_data_type.py +0 -0
  184. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_defs.py +0 -0
  185. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_metadata.py +0 -0
  186. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_path.py +0 -0
  187. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_primitive.py +0 -0
  188. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_struct_array.py +0 -0
  189. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/setup_logging.py +0 -0
  190. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_all_dd_versions.py +0 -0
  191. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_dd_zip.py +0 -0
  192. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_deepcopy.py +0 -0
  193. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_exception.py +0 -0
  194. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_get_sample.py +0 -0
  195. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_hash.py +0 -0
  196. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids2nc.py +0 -0
  197. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_ascii_data.py +0 -0
  198. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_coordinates.py +0 -0
  199. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_data_type.py +0 -0
  200. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_factory.py +0 -0
  201. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_metadata.py +0 -0
  202. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_mixin.py +0 -0
  203. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_path.py +0 -0
  204. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_primitive.py +0 -0
  205. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_struct_array.py +0 -0
  206. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_structure.py +0 -0
  207. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_toplevel.py +0 -0
  208. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_validate.py +0 -0
  209. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_latest_dd_autofill.py +0 -0
  210. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_latest_dd_manual.py +0 -0
  211. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_latest_dd_resample.py +0 -0
  212. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_list_occurrences.py +0 -0
  213. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_minimal.py +0 -0
  214. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_minimal_conversion.py +0 -0
  215. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_minimal_io.py +0 -0
  216. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_minimal_struct_array_io.py +0 -0
  217. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_minimal_types.py +0 -0
  218. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_minimal_types_io.py +0 -0
  219. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_minimal_types_io_automatic.py +0 -0
  220. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_nbc_change.py +0 -0
  221. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_nc_autofill.py +0 -0
  222. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_nc_entry.py +0 -0
  223. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_nc_metadata.py +0 -0
  224. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_nc_validation.py +0 -0
  225. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_snippets.py +0 -0
  226. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_static_ids.py +0 -0
  227. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_str_1d.py +0 -0
  228. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_to_xarray.py +0 -0
  229. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_uda_support.py +0 -0
  230. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_util.py +0 -0
  231. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/util.py +0 -0
  232. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas_python.egg-info/dependency_links.txt +0 -0
  233. {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas_python.egg-info/top_level.txt +0 -0
  234. {imas_python-2.0.0.post1 → imas_python-2.1.0}/setup.cfg +0 -0
  235. {imas_python-2.0.0.post1 → imas_python-2.1.0}/tools/compare_lowlevel_access_patterns.py +0 -0
  236. {imas_python-2.0.0.post1 → imas_python-2.1.0}/tools/extract_test_data.py +0 -0
  237. {imas_python-2.0.0.post1 → imas_python-2.1.0}/tools/get_tagnames.py +0 -0
@@ -0,0 +1,10 @@
1
+ # This file allows setting automatically reviewers for pull requests.
2
+ # Each line is a file pattern followed by one or more owners.
3
+ # The last match takes precedence over previous ones.
4
+ # Do not edit unless specifically mandated to do so.
5
+
6
+ # Global/fallback and technical modifications.
7
+ * @maarten-ic @prasad-sawantdesai @olivhoenen
8
+
9
+ # Modifications to CODEOWNERS and action workflows
10
+ .github/ @SimonPinches @olivhoenen
@@ -7,10 +7,10 @@ on:
7
7
 
8
8
  jobs:
9
9
  test:
10
- runs-on: ubuntu-22.04
10
+ runs-on: ubuntu-latest
11
11
  strategy:
12
12
  matrix:
13
- python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] # Test on multiple Python versions
13
+ python-version: ["3.10", "3.11", "3.12", "3.13"] # Test on multiple Python versions
14
14
 
15
15
  steps:
16
16
  - name: Checkout repository
@@ -20,8 +20,6 @@ jobs:
20
20
 
21
21
  uses: actions/setup-python@v4
22
22
  with:
23
- # until saxonche is available in 3.13
24
- # https://saxonica.plan.io/issues/6561
25
23
  python-version: ${{ matrix.python-version }}
26
24
  - name: Display Python version
27
25
  run: python -c "import sys; print(sys.version)"
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: imas-python
3
- Version: 2.0.0.post1
3
+ Version: 2.1.0
4
4
  Summary: Pythonic wrappers for the IMAS Access Layer
5
5
  Author: ITER Organization
6
6
  Author-email: Karel Lucas van de Plassche <karelvandeplassche@gmail.com>, Daan van Vugt <dvanvugt@ignitioncomputing.com>, Maarten Sebregts <msebregts@ignitioncomputing.com>, imas-support@iter.org
@@ -205,15 +205,15 @@ Classifier: Topic :: Utilities
205
205
  Requires-Python: >=3.7
206
206
  Description-Content-Type: text/markdown
207
207
  License-File: LICENSE.txt
208
- Requires-Dist: numpy<2,>=1.15.4
208
+ Requires-Dist: numpy>=1.15.4
209
209
  Requires-Dist: rich
210
210
  Requires-Dist: scipy
211
211
  Requires-Dist: click
212
212
  Requires-Dist: importlib_resources; python_version < "3.9"
213
213
  Requires-Dist: packaging
214
214
  Requires-Dist: xxhash>=2
215
- Requires-Dist: saxonche
216
- Requires-Dist: gitpython
215
+ Requires-Dist: imas_data_dictionaries
216
+ Requires-Dist: imas_core
217
217
  Provides-Extra: all
218
218
  Requires-Dist: imas-python[docs,test]; extra == "all"
219
219
  Provides-Extra: docs
@@ -227,6 +227,8 @@ Provides-Extra: h5py
227
227
  Requires-Dist: h5py; extra == "h5py"
228
228
  Provides-Extra: xarray
229
229
  Requires-Dist: xarray; extra == "xarray"
230
+ Provides-Extra: saxonche
231
+ Requires-Dist: saxonche; extra == "saxonche"
230
232
  Provides-Extra: test
231
233
  Requires-Dist: pytest>=5.4.1; extra == "test"
232
234
  Requires-Dist: pytest-cov>=0.6; extra == "test"
@@ -236,7 +238,8 @@ Requires-Dist: matplotlib; extra == "test"
236
238
  Requires-Dist: asv==0.6.1; extra == "test"
237
239
  Requires-Dist: virtualenv; extra == "test"
238
240
  Requires-Dist: pint; extra == "test"
239
- Requires-Dist: imas-python[h5py,netcdf,xarray]; extra == "test"
241
+ Requires-Dist: imas-python[h5py,netcdf,saxonche,xarray]; extra == "test"
242
+ Dynamic: license-file
240
243
 
241
244
  # IMAS-Python
242
245
 
@@ -248,13 +251,20 @@ Data Model.
248
251
 
249
252
  ## Install
250
253
 
251
- Install steps are described in the documentation generated from `/docs/source/installing.rst`.
254
+ Simply install IMAS-Python with ``pip``:
255
+ ```bash
256
+ pip install imas-python
257
+ ```
258
+ or with optional dependencies for netCDF and xarray support:
259
+ ```bash
260
+ pip install imas-python[netcdf,xarray]
261
+ ```
252
262
 
253
- Documentation is autogenerated from the source using [Sphinx](http://sphinx-doc.org/)
263
+ More details are described in the documentation generated from `/docs/source/installing.rst`.
264
+ The documentation is autogenerated from the source using [Sphinx](http://sphinx-doc.org/)
254
265
  and can be found at the [readthedocs](https://imas-python.readthedocs.io/en/latest/)
255
266
 
256
- The documentation can be manually generated by installing sphinx and running:
257
-
267
+ To generate the documentation yourself, install the ``docs`` optional dependencies and do:
258
268
  ```bash
259
269
  make -C docs html
260
270
  ```
@@ -8,13 +8,20 @@ Data Model.
8
8
 
9
9
  ## Install
10
10
 
11
- Install steps are described in the documentation generated from `/docs/source/installing.rst`.
11
+ Simply install IMAS-Python with ``pip``:
12
+ ```bash
13
+ pip install imas-python
14
+ ```
15
+ or with optional dependencies for netCDF and xarray support:
16
+ ```bash
17
+ pip install imas-python[netcdf,xarray]
18
+ ```
12
19
 
13
- Documentation is autogenerated from the source using [Sphinx](http://sphinx-doc.org/)
20
+ More details are described in the documentation generated from `/docs/source/installing.rst`.
21
+ The documentation is autogenerated from the source using [Sphinx](http://sphinx-doc.org/)
14
22
  and can be found at the [readthedocs](https://imas-python.readthedocs.io/en/latest/)
15
23
 
16
- The documentation can be manually generated by installing sphinx and running:
17
-
24
+ To generate the documentation yourself, install the ``docs`` optional dependencies and do:
18
25
  ```bash
19
26
  make -C docs html
20
27
  ```
@@ -10,8 +10,6 @@ from .utils import (
10
10
  available_serializers,
11
11
  available_slicing_backends,
12
12
  create_dbentry,
13
- factory,
14
- hlis,
15
13
  )
16
14
 
17
15
  N_SLICES = 32
@@ -26,13 +24,13 @@ def fill_slices(core_profiles, times):
26
24
  times: time values to fill a slice for
27
25
  """
28
26
  core_profiles.ids_properties.homogeneous_time = 1 # HOMOGENEOUS
29
- core_profiles.ids_properties.comment = "Generated for the IMAS-Python benchmark suite"
27
+ core_profiles.ids_properties.comment = (
28
+ "Generated for the IMAS-Python benchmark suite"
29
+ )
30
30
  core_profiles.ids_properties.creation_date = datetime.date.today().isoformat()
31
31
  core_profiles.code.name = "IMAS-Python ASV benchmark"
32
32
  core_profiles.code.version = imas.__version__
33
- core_profiles.code.repository = (
34
- "https://github.com/iterorganization/IMAS-Python"
35
- )
33
+ core_profiles.code.repository = "https://github.com/iterorganization/IMAS-Python"
36
34
 
37
35
  core_profiles.time = np.array(times)
38
36
  core_profiles.profiles_1d.resize(len(times))
@@ -50,13 +48,13 @@ def fill_slices(core_profiles, times):
50
48
  profiles_1d.ion.resize(len(ions))
51
49
  profiles_1d.neutral.resize(len(ions))
52
50
  for i, ion in enumerate(ions):
53
- if hasattr(profiles_1d.ion[i], 'label'):
51
+ if hasattr(profiles_1d.ion[i], "label"):
54
52
  profiles_1d.ion[i].label = ion
55
53
  profiles_1d.neutral[i].label = ion
56
- if hasattr(profiles_1d.ion[i], 'name'):
54
+ if hasattr(profiles_1d.ion[i], "name"):
57
55
  profiles_1d.ion[i].name = ion
58
56
  profiles_1d.neutral[i].name = ion
59
-
57
+
60
58
  # profiles_1d.ion[i].label = profiles_1d.neutral[i].label = ion
61
59
  profiles_1d.ion[i].z_ion = 1.0
62
60
  profiles_1d.ion[i].neutral_index = profiles_1d.neutral[i].ion_index = i + 1
@@ -70,31 +68,31 @@ def fill_slices(core_profiles, times):
70
68
 
71
69
 
72
70
  class GetSlice:
73
- params = [hlis, available_slicing_backends]
74
- param_names = ["hli", "backend"]
71
+ params = [available_slicing_backends]
72
+ param_names = ["backend"]
75
73
 
76
- def setup(self, hli, backend):
77
- self.dbentry = create_dbentry(hli, backend)
78
- core_profiles = factory[hli].core_profiles()
74
+ def setup(self, backend):
75
+ self.dbentry = create_dbentry(backend)
76
+ core_profiles = imas.IDSFactory().core_profiles()
79
77
  fill_slices(core_profiles, TIME)
80
78
  self.dbentry.put(core_profiles)
81
79
 
82
- def time_get_slice(self, hli, backend):
80
+ def time_get_slice(self, backend):
83
81
  for t in TIME:
84
82
  self.dbentry.get_slice("core_profiles", t, imas.ids_defs.CLOSEST_INTERP)
85
83
 
86
- def teardown(self, hli, backend):
84
+ def teardown(self, backend):
87
85
  if hasattr(self, "dbentry"): # imas + netCDF has no dbentry
88
86
  self.dbentry.close()
89
87
 
90
88
 
91
89
  class Get:
92
- params = [hlis, available_backends]
93
- param_names = ["hli", "backend"]
90
+ params = [available_backends]
91
+ param_names = ["backend"]
94
92
  setup = GetSlice.setup
95
93
  teardown = GetSlice.teardown
96
94
 
97
- def time_get(self, hli, backend):
95
+ def time_get(self, backend):
98
96
  self.dbentry.get("core_profiles")
99
97
 
100
98
 
@@ -103,8 +101,8 @@ class LazyGet:
103
101
  param_names = ["lazy", "backend"]
104
102
 
105
103
  def setup(self, lazy, backend):
106
- self.dbentry = create_dbentry("imas", backend)
107
- core_profiles = factory["imas"].core_profiles()
104
+ self.dbentry = create_dbentry(backend)
105
+ core_profiles = imas.IDSFactory().core_profiles()
108
106
  fill_slices(core_profiles, TIME)
109
107
  self.dbentry.put(core_profiles)
110
108
 
@@ -118,75 +116,72 @@ class LazyGet:
118
116
 
119
117
 
120
118
  class Generate:
121
- params = [hlis]
122
- param_names = ["hli"]
119
+ def setup(self):
120
+ self.core_profiles = imas.IDSFactory().core_profiles()
123
121
 
124
- def setup(self, hli):
125
- self.core_profiles = factory[hli].core_profiles()
126
-
127
- def time_generate(self, hli):
122
+ def time_generate(self):
128
123
  fill_slices(self.core_profiles, TIME)
129
124
 
130
- def time_generate_slices(self, hli):
125
+ def time_generate_slices(self):
131
126
  for t in TIME:
132
127
  fill_slices(self.core_profiles, [t])
133
128
 
134
- def time_create_core_profiles(self, hli):
135
- factory[hli].core_profiles()
129
+ def time_create_core_profiles(self):
130
+ imas.IDSFactory().core_profiles()
136
131
 
137
132
 
138
133
  class Put:
139
- params = [["0", "1"], hlis, available_backends]
134
+ params = [["0", "1"], available_backends]
140
135
  param_names = ["disable_validate", "hli", "backend"]
141
136
 
142
- def setup(self, disable_validate, hli, backend):
143
- create_dbentry(hli, backend).close() # catch unsupported combinations
144
- self.core_profiles = factory[hli].core_profiles()
137
+ def setup(self, disable_validate, backend):
138
+ create_dbentry(backend).close() # catch unsupported combinations
139
+ self.core_profiles = imas.IDSFactory().core_profiles()
145
140
  fill_slices(self.core_profiles, TIME)
146
141
  os.environ["IMAS_AL_DISABLE_VALIDATE"] = disable_validate
147
142
 
148
- def time_put(self, disable_validate, hli, backend):
149
- with create_dbentry(hli, backend) as dbentry:
143
+ def time_put(self, disable_validate, backend):
144
+ with create_dbentry(backend) as dbentry:
150
145
  dbentry.put(self.core_profiles)
151
146
 
152
147
 
153
148
  class PutSlice:
154
- params = [["0", "1"], hlis, available_slicing_backends]
155
- param_names = ["disable_validate", "hli", "backend"]
149
+ params = [["0", "1"], available_slicing_backends]
150
+ param_names = ["disable_validate", "backend"]
156
151
 
157
- def setup(self, disable_validate, hli, backend):
158
- create_dbentry(hli, backend).close() # catch unsupported combinations
159
- self.core_profiles = factory[hli].core_profiles()
152
+ def setup(self, disable_validate, backend):
153
+ create_dbentry(backend).close() # catch unsupported combinations
154
+ self.core_profiles = imas.IDSFactory().core_profiles()
160
155
  os.environ["IMAS_AL_DISABLE_VALIDATE"] = disable_validate
161
156
 
162
- def time_put_slice(self, disable_validate, hli, backend):
163
- with create_dbentry(hli, backend) as dbentry:
157
+ def time_put_slice(self, disable_validate, backend):
158
+ with create_dbentry(backend) as dbentry:
164
159
  for t in TIME:
165
160
  fill_slices(self.core_profiles, [t])
166
161
  dbentry.put_slice(self.core_profiles)
167
162
 
168
163
 
169
164
  class Serialize:
170
- params = [hlis, available_serializers]
171
- param_names = ["hli", "serializer"]
165
+ params = [available_serializers]
166
+ param_names = ["serializer"]
172
167
 
173
- def setup(self, hli, serializer):
174
- self.core_profiles = factory[hli].core_profiles()
168
+ def setup(self, serializer):
169
+ self.core_profiles = imas.IDSFactory().core_profiles()
175
170
  fill_slices(self.core_profiles, TIME)
176
171
 
177
- def time_serialize(self, hli, serializer):
172
+ def time_serialize(self, serializer):
178
173
  self.core_profiles.serialize(serializer)
179
174
 
180
175
 
181
176
  class Deserialize:
182
- params = [hlis, available_serializers]
183
- param_names = ["hli", "serializer"]
177
+ params = [available_serializers]
178
+ param_names = ["serializer"]
184
179
 
185
- def setup(self, hli, serializer):
186
- self.core_profiles = factory[hli].core_profiles()
180
+ def setup(self, serializer):
181
+ self.core_profiles = imas.IDSFactory().core_profiles()
187
182
  fill_slices(self.core_profiles, TIME)
188
183
  self.data = self.core_profiles.serialize(serializer)
189
- self.core_profiles = factory[hli].core_profiles()
184
+ self.core_profiles = imas.IDSFactory().core_profiles()
190
185
 
191
- def time_deserialize(self, hli, serializer):
186
+ def time_deserialize(self, serializer):
192
187
  self.core_profiles.deserialize(self.data)
@@ -5,7 +5,7 @@ import numpy as np
5
5
 
6
6
  import imas
7
7
 
8
- from .utils import available_backends, create_dbentry, factory, hlis
8
+ from .utils import available_backends, create_dbentry
9
9
 
10
10
  N_POINTS = 600 # number of random R,Z points
11
11
  N_LINES = 1200 # number of random lines in R,Z plane
@@ -27,9 +27,7 @@ def fill_ggd(edge_profiles, times):
27
27
  edge_profiles.ids_properties.creation_date = datetime.date.today().isoformat()
28
28
  edge_profiles.code.name = "IMAS-Python ASV benchmark"
29
29
  edge_profiles.code.version = imas.__version__
30
- edge_profiles.code.repository = (
31
- "https://github.com/iterorganization/IMAS-Python"
32
- )
30
+ edge_profiles.code.repository = "https://github.com/iterorganization/IMAS-Python"
33
31
 
34
32
  # This GGD grid is not a valid description, but it's a good stress test for the
35
33
  # typical access patterns that exist in GGD grids
@@ -124,45 +122,42 @@ def fill_ggd(edge_profiles, times):
124
122
 
125
123
 
126
124
  class Get:
127
- params = [hlis, available_backends]
128
- param_names = ["hli", "backend"]
125
+ params = [available_backends]
126
+ param_names = ["backend"]
129
127
 
130
- def setup(self, hli, backend):
131
- self.dbentry = create_dbentry(hli, backend)
132
- edge_profiles = factory[hli].edge_profiles()
128
+ def setup(self, backend):
129
+ self.dbentry = create_dbentry(backend)
130
+ edge_profiles = imas.IDSFactory().edge_profiles()
133
131
  fill_ggd(edge_profiles, TIME)
134
132
  self.dbentry.put(edge_profiles)
135
133
 
136
- def time_get(self, hli, backend):
134
+ def time_get(self, backend):
137
135
  self.dbentry.get("edge_profiles")
138
136
 
139
- def teardown(self, hli, backend):
137
+ def teardown(self, backend):
140
138
  if hasattr(self, "dbentry"): # imas + netCDF has no dbentry
141
139
  self.dbentry.close()
142
140
 
143
141
 
144
142
  class Generate:
145
- params = [hlis]
146
- param_names = ["hli"]
147
-
148
- def time_generate(self, hli):
149
- edge_profiles = factory[hli].edge_profiles()
143
+ def time_generate(self):
144
+ edge_profiles = imas.IDSFactory().edge_profiles()
150
145
  fill_ggd(edge_profiles, TIME)
151
146
 
152
- def time_create_edge_profiles(self, hli):
153
- factory[hli].edge_profiles()
147
+ def time_create_edge_profiles(self):
148
+ imas.IDSFactory().edge_profiles()
154
149
 
155
150
 
156
151
  class Put:
157
- params = [["0", "1"], hlis, available_backends]
158
- param_names = ["disable_validate", "hli", "backend"]
152
+ params = [["0", "1"], available_backends]
153
+ param_names = ["disable_validate", "backend"]
159
154
 
160
- def setup(self, disable_validate, hli, backend):
161
- create_dbentry(hli, backend).close() # catch unsupported combinations
162
- self.edge_profiles = factory[hli].edge_profiles()
155
+ def setup(self, disable_validate, backend):
156
+ create_dbentry(backend).close() # catch unsupported combinations
157
+ self.edge_profiles = imas.IDSFactory().edge_profiles()
163
158
  fill_ggd(self.edge_profiles, TIME)
164
159
  os.environ["IMAS_AL_DISABLE_VALIDATE"] = disable_validate
165
160
 
166
- def time_put(self, disable_validate, hli, backend):
167
- with create_dbentry(hli, backend) as dbentry:
161
+ def time_put(self, disable_validate, backend):
162
+ with create_dbentry(backend) as dbentry:
168
163
  dbentry.put(self.edge_profiles)
@@ -1,10 +1,10 @@
1
- import importlib
2
1
  import logging
3
2
  import uuid
4
3
  from pathlib import Path
5
4
 
6
5
  import imas
7
6
  import imas.exception
7
+ import imas.ids_defs
8
8
 
9
9
  # Backend constants
10
10
  HDF5 = "HDF5"
@@ -56,28 +56,12 @@ available_slicing_backends = [
56
56
  backend for backend in available_backends if backend not in [ASCII, NETCDF]
57
57
  ]
58
58
 
59
- hlis = ["imas"]
60
- DBEntry = {
61
- "imas": imas.DBEntry,
62
- }
63
- factory = {
64
- "imas": imas.IDSFactory(),
65
- }
66
- available_serializers = [imas.ids_defs.ASCII_SERIALIZER_PROTOCOL]
67
-
59
+ available_serializers = [
60
+ imas.ids_defs.ASCII_SERIALIZER_PROTOCOL,
61
+ imas.ids_defs.FLEXBUFFERS_SERIALIZER_PROTOCOL,
62
+ ]
68
63
 
69
- def create_dbentry(hli, backend):
70
- if backend == NETCDF:
71
- if hli == "imas": # check if netcdf backend is available
72
- try:
73
- assert (
74
- imas.DBEntry._select_implementation("x.nc").__name__
75
- == "NCDBEntryImpl"
76
- )
77
- except (AttributeError, AssertionError):
78
- raise NotImplementedError(
79
- "This version of IMAS-Python doesn't implement netCDF."
80
- ) from None
81
64
 
82
- path = Path.cwd() / f"DB-{hli}-{backend}"
83
- return DBEntry[hli](create_uri(backend, path), "w")
65
+ def create_dbentry(backend):
66
+ path = Path.cwd() / f"DB-{backend}"
67
+ return imas.DBEntry(create_uri(backend, path), "w")
@@ -70,6 +70,13 @@ _BACKENDS = {
70
70
  "hdf5": HDF5_BACKEND,
71
71
  "mdsplus": MDSPLUS_BACKEND,
72
72
  }
73
+ try:
74
+ from imas.db_entry import DBEntry
75
+ from imas_core.exception import ImasCoreBackendException
76
+ DBEntry("imas:mdsplus?path=dummy","r")
77
+ except ImasCoreBackendException as iex:
78
+ if "not available" in str(iex.message):
79
+ _BACKENDS.pop("mdsplus")
73
80
 
74
81
 
75
82
  try:
@@ -3,6 +3,59 @@
3
3
  Changelog
4
4
  =========
5
5
 
6
+ What's new in IMAS-Python 2.1.0
7
+ -------------------------------
8
+
9
+ Build
10
+ '''''
11
+
12
+ - update Python version support (remove 3.8, add 3.13)
13
+ - add dependency on `imas_core <https://pypi.org/project/imas-core/>`__
14
+
15
+
16
+ Improvements
17
+ ''''''''''''
18
+
19
+ - :issue:`84`: improve `imas process-db-analysis`
20
+ - :issue:`71`: take into account identifier aliases (introduced in DD 4.1)
21
+ - :issue:`78`: disable *implicit* conversion when crossing a major version update
22
+ - improve integration of UDA backend
23
+ - cleaning old AL4 deprecated code
24
+ - :issue:`59`: convert name+identifier (DD3) into description+name (DD4)
25
+ - improve type hints (following PEP-585 and PEP-604)
26
+ - improve performance of IDS deepcopy
27
+ - :issue:`60`: improve `equilibrium` DD3->4 by converting `boundary_separatrix` into `contour_tree`
28
+ - :issue:`22`: add custom conversion example in the doc for `em_coupling` IDS
29
+
30
+
31
+ Bug fixes
32
+ '''''''''
33
+
34
+ - fix testcases with coordinate validation issues
35
+ - :issue:`80`: fix `imas print` when using netcdf and imas_core is not present
36
+ - :issue:`61`: special DD3->4 rule to flip sign quantities missing the `cocos_label_transform attribute` in DD
37
+ - :merge:`58`: fix unclear provenance capture
38
+ - :merge:`57`: fix 0D arrays from lazy loading with netcdf
39
+ - :issue:`55`: handle missing case when converting 3.42->4 (_tor->_phi)
40
+
41
+
42
+
43
+
44
+ What's new in IMAS-Python 2.0.1
45
+ -------------------------------
46
+
47
+ Improvements
48
+ ''''''''''''
49
+
50
+ - improve DD3-->DD4 conversion (sign conversion to dodpsi_like)
51
+ - improve conversion of pulse_schedule IDS >= 3.39.0
52
+ - numpy 2 compatibility
53
+ - improve UDA data fetch
54
+ - improve documentation
55
+ - new dependency on `imas-data-dictionaries package <https://pypi.org/project/imas-data-dictionaries/>`__ (remove internal build via saxonche, except for the optional MDSplus models)
56
+ - full compatibility of tests with netCDF<1.7 (no complex numbers)
57
+
58
+
6
59
  What's new in IMAS-Python 2.0.0
7
60
  -------------------------------
8
61
 
@@ -59,9 +112,9 @@ Bug fixes
59
112
  Dictionary 4.0.0 and 3.42.0. In other cases, the Data Dictionary version is
60
113
  now explicitly indicated.
61
114
 
62
- - :issue:`IMAS-5560`: Fix a bug where IMASPy would not correctly recognize that
115
+ - IMAS-5560: Fix a bug where IMASPy would not correctly recognize that
63
116
  the UDA backend is used.
64
- - :issue:`IMAS-5541`: Fix a bug when converting a closed contour to Data
117
+ - IMAS-5541: Fix a bug when converting a closed contour to Data
65
118
  Dictionary version 4.0.0.
66
119
  - Work around incorrect Data Dictionary 3.x metadata when converting
67
120
  ``flux_loop/flux`` in the ``magnetics`` IDS to Data Dictionary version 4.0.0.
@@ -121,8 +121,8 @@ process these files with ``imas process-db-analysis``. This will:
121
121
  variable).
122
122
  2. These results are summarized in a table, showing per IDS:
123
123
 
124
- - The number of data fields [#data_fields]_ that were filled in *any* of the
125
- analyzed data entries.
124
+ - The number of data fields [#data_fields]_ that were filled in *any* occurrence of
125
+ the IDS in *any* of the analyzed data entries.
126
126
  - The total number of data fields [#data_fields]_ that the Data Dictionary
127
127
  defines for this IDS.
128
128
  - The percentage of fields filled.
@@ -39,12 +39,12 @@ src_host = "https://github.com/iterorganization/"
39
39
  iter_projects = "https://github.com/iterorganization/"
40
40
  dd_url = urljoin(iter_projects, "imas-data-dictionary/")
41
41
  al_url = urljoin(iter_projects, "imas-core/")
42
- issue_url = jira_url = "https://github.com/iterorganization/IMAS-Python/issues"
43
42
 
44
43
  # IMAS-Python
45
44
  repository_url = f"{iter_projects}/{src_project}/"
46
45
  blob_url = repository_url
47
- mr_url = urljoin(repository_url, "/pulls")
46
+ issue_url = urljoin(repository_url, "issues/")
47
+ mr_url = urljoin(repository_url, "pull/")
48
48
 
49
49
 
50
50
  # Configuration of sphinx.ext.extlinks
@@ -52,8 +52,8 @@ mr_url = urljoin(repository_url, "/pulls")
52
52
  # unique name: (base URL, label prefix)
53
53
  extlinks = {
54
54
  "src": (blob_url + "%s", "%s"),
55
- "issue": (issue_url + "%s", "%s"),
56
- "merge": (mr_url + "%s", "!%s"),
55
+ "issue": (issue_url + "%s", "#%s"),
56
+ "merge": (mr_url + "%s", "#%s"),
57
57
  "dd": (dd_url + "%s", "%s"),
58
58
  "al": (al_url + "%s", "%s"),
59
59
  "pypa": ("https://packaging.python.org/%s", None),
@@ -60,7 +60,7 @@ Bundled Data Dictionary definitions
60
60
 
61
61
  IMAS-Python comes bundled [#DDdefs]_ with many versions of the Data Dictionary definitions.
62
62
  You can find out which versions are available by calling
63
- :py:meth:`imas.dd_zip.dd_xml_versions`.
63
+ ``imas.dd_zip.dd_xml_versions``.
64
64
 
65
65
 
66
66
  Converting an IDS between Data Dictionary versions
@@ -290,6 +290,6 @@ build, you can use them like you normally would.
290
290
 
291
291
  .. rubric:: Footnotes
292
292
 
293
- .. [#DDdefs] To be more precise, the Data Dictionary definitions are generated when the
294
- IMAS-Python package is created. See :ref:`this reference <DD background>` for more
295
- details.
293
+ .. [#DDdefs] To be more precise, the Data Dictionary definitions are provided by the
294
+ `IMAS Data Dictionaries <http://pypi.org/project/imas-data-dictionaries/>`__
295
+ package.
@@ -25,15 +25,10 @@ can use the data.
25
25
  .. hint::
26
26
  Use the ASCII data supplied with IMAS-Python for all exercises. It contains two
27
27
  IDSs (``equilibrium`` and ``core_profiles``) filled with data from three
28
- time slices of ITER reference data. Two convenience methods are available in the
29
- :mod:`imas.training` module to open the DBEntry for this training data.
30
-
31
- 1. :meth:`imas.training.get_training_db_entry()` returns an opened
32
- ``imas.DBEntry`` object. Use this method if you want to use the IMAS-Python
33
- interface.
34
- 2. :meth:`imas.training.get_training_imas_db_entry()` returns an opened
35
- ``imas.DBEntry`` object. Use this method if you want to use the Python Access
36
- Layer interface.
28
+ time slices of ITER reference data. A convenience method is available in the
29
+ :mod:`imas.training` module to open the DBEntry for this training data:
30
+ :meth:`imas.training.get_training_db_entry()` returns an opened
31
+ ``imas.DBEntry`` object.
37
32
 
38
33
  Exercise 1
39
34
  ''''''''''
@@ -246,3 +241,20 @@ Exercise 5
246
241
  A plot of :math:`T_e` vs :math:`t`.
247
242
 
248
243
  .. seealso:: :ref:`Lazy loading`
244
+
245
+
246
+ Explore the DBEntry and occurrences
247
+ '''''''''''''''''''''''''''''''''''
248
+
249
+ You may not know a priori which types of IDSs are available within an IMAS database entry.
250
+ It can also happen that several IDSs objects of the same type are stored within
251
+ this entry, in that case each IDS is stored as a separate `occurrence`
252
+ (occurrences are identified with an integer value, 0 being the default).
253
+
254
+ In IMAS-Python, the function :meth:`~imas.db_entry.DBEntry.list_all_occurrences()` will
255
+ help you finding which occurrences are available in a given database entry and for a given
256
+ IDS type.
257
+
258
+ The following snippet shows how to list the available IDSs in a given database entry:
259
+
260
+ .. literalinclude:: imas_snippets/explore_data_entry.py
@@ -7,8 +7,8 @@ In this part of the training, we will learn how to use Python to explore data
7
7
  saved in IDSs.
8
8
 
9
9
 
10
- Explore which IDSs are available
11
- --------------------------------
10
+ Explore which IDS structures are available
11
+ ------------------------------------------
12
12
 
13
13
  Most codes will touch multiple IDSs inside a single IMAS data entry. For example
14
14
  a heating code using a magnetic equilibrium from the ``equilibrium`` IDS with a