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.
- imas_python-2.1.0/.github/CODEOWNERS +10 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/.github/workflows/test_with_pytest.yml +2 -4
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/PKG-INFO +20 -10
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/README.md +11 -4
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/benchmarks/core_profiles.py +49 -54
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/benchmarks/edge_profiles.py +20 -25
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/benchmarks/utils.py +8 -24
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/conftest.py +7 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/changelog.rst +55 -2
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/cli.rst +2 -2
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/conf.py +4 -4
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/dd_versions.rst +4 -4
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/analyze.rst +21 -9
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/explore.rst +2 -2
- imas_python-2.1.0/docs/source/courses/basic/imas_snippets/explore_data_entry.py +11 -0
- imas_python-2.1.0/docs/source/examples/custom_conversion_em_coupling.py +168 -0
- imas_python-2.1.0/docs/source/examples/custom_conversion_em_coupling.rst +13 -0
- imas_python-2.1.0/docs/source/examples.rst +14 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/identifiers.rst +100 -5
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/imas_architecture.rst +0 -4
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/index.rst +1 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/installing.rst +23 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/lazy_loading.rst +10 -1
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/multi-dd.rst +110 -16
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/__init__.py +0 -1
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/_version.py +16 -3
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/imas_core/al_context.py +4 -4
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/imas_core/db_entry_al.py +71 -93
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/imas_core/imas_interface.py +6 -32
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/imas_core/mdsplus_model.py +10 -24
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/netcdf/nc2ids.py +6 -3
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/command/cli.py +0 -1
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/command/db_analysis.py +102 -7
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/command/helpers.py +1 -1
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/db_entry.py +35 -35
- imas_python-2.1.0/imas/dd_zip.py +109 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/exception.py +6 -17
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_convert.py +486 -89
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_coordinates.py +4 -3
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_factory.py +8 -5
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_identifiers.py +30 -15
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_structure.py +4 -3
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_toplevel.py +8 -17
- imas_python-2.1.0/imas/test/test_cli.py +102 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_dbentry.py +1 -6
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_helpers.py +66 -55
- imas_python-2.1.0/imas/test/test_identifiers.py +295 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_convert.py +304 -22
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_lazy_loading.py +5 -3
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_time_slicing.py +0 -7
- imas_python-2.1.0/imas/training.py +26 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas_python.egg-info/PKG-INFO +20 -10
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas_python.egg-info/SOURCES.txt +5 -10
- imas_python-2.1.0/imas_python.egg-info/entry_points.txt +2 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas_python.egg-info/requires.txt +7 -4
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/pyproject.toml +9 -8
- imas_python-2.0.0.post1/ci/build_dd_zip.sh +0 -30
- imas_python-2.0.0.post1/ci/build_docs_and_dist.sh +0 -45
- imas_python-2.0.0.post1/ci/linting.sh +0 -35
- imas_python-2.0.0.post1/ci/run_benchmark.sh +0 -79
- imas_python-2.0.0.post1/ci/run_pytest.sh +0 -46
- imas_python-2.0.0.post1/imas/assets/IDSDef.zip +0 -0
- imas_python-2.0.0.post1/imas/dd_helpers.py +0 -167
- imas_python-2.0.0.post1/imas/dd_zip.py +0 -297
- imas_python-2.0.0.post1/imas/test/test_cli.py +0 -50
- imas_python-2.0.0.post1/imas/test/test_dd_helpers.py +0 -53
- imas_python-2.0.0.post1/imas/test/test_identifiers.py +0 -105
- imas_python-2.0.0.post1/imas/training.py +0 -45
- imas_python-2.0.0.post1/imas_python.egg-info/entry_points.txt +0 -3
- imas_python-2.0.0.post1/imas_python.egg-info/not-zip-safe +0 -1
- imas_python-2.0.0.post1/setup.py +0 -140
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/.git-blame-ignore-revs +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/.git_archival.txt +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/.gitattributes +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/.github/workflows/linting.yml +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/.github/workflows/publish.yml +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/.github/workflows/verify_sphinx_doc.yml +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/.gitignore +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/.pylintrc +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/.readthedocs.yml +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/CODE_OF_CONDUCT.md +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/CONTRIBUTING.md +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/LICENSE.txt +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/MANIFEST.in +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/asv.conf.json +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/benchmarks/__init__.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/benchmarks/technical.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/.gitignore +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/Makefile +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/.gitignore +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/_static/imas.css +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/_static/imas_200x200.png +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/_templates/autosummary/accessor.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/_templates/autosummary/accessor_attribute.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/_templates/autosummary/accessor_callable.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/_templates/autosummary/accessor_method.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/_templates/autosummary/base.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/_templates/custom-class-template.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/_templates/custom-module-template.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/_templates/layout.html +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/api-hidden.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/api.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/benchmarking.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/ci_config.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/code_style.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/configuring.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/explore.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/hashing.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/alternative_coordinates.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/autoconvert_get.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/autoconvert_put.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/calc_with_units.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/coordinates.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/dd_versions.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/explore_data.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/explore_structures.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/hashing.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/ids_convert.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/ids_to_xarray.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/imas_snippets/tensorized_ids_to_xarray.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/metadata.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced/xarray.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/advanced_user_training.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/core_profiles_ne_timeslice.png +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/core_profiles_te.png +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/create.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_inspect.png +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/create_core_profiles.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/explore_public_ec_launchers.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/explore_public_pf_active.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/explore_training_data.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/find_paths.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/iterate_core_profiles.py +0 -0
- {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
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/plot_core_profiles_te.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/print_idss.py +0 -0
- {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
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/read_equilibrium_time_array.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/read_whole_equilibrium.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/imas_snippets/transform_grid.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/interactive_tab_core_profiles_toplevel.png +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/print_tree_ids_properties.png +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/setup.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic/transform.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/courses/basic_user_training.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/imas_structure.png +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/intro.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/mdsplus.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/metadata.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/netcdf/conventions.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/netcdf.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/release_imas.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/resampling.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/docs/source/validation.rst +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/__main__.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/_to_xarray.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/_util.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/IDSDef2MDSpreTree.xsl +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/IDS_fake_toplevel.xml +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/IDS_minimal.xml +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/IDS_minimal_2.xml +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/IDS_minimal_struct_array.xml +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/IDS_minimal_types.xml +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/ITER_134173_106_core_profiles.ids +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/ITER_134173_106_equilibrium.ids +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/README.md +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/core_profiles.ids +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/assets/equilibrium.ids +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/__init__.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/db_entry_impl.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/imas_core/__init__.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/imas_core/db_entry_helpers.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/imas_core/uda_support.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/netcdf/__init__.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/netcdf/db_entry_nc.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/netcdf/ids2nc.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/netcdf/ids_tensorizer.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/netcdf/iterators.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/netcdf/nc_metadata.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/backends/netcdf/nc_validate.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/command/timer.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_base.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_data_type.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_defs.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_metadata.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_path.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_primitive.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/ids_struct_array.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/setup_logging.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_all_dd_versions.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_dd_zip.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_deepcopy.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_exception.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_get_sample.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_hash.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids2nc.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_ascii_data.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_coordinates.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_data_type.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_factory.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_metadata.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_mixin.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_path.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_primitive.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_struct_array.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_structure.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_toplevel.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_ids_validate.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_latest_dd_autofill.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_latest_dd_manual.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_latest_dd_resample.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_list_occurrences.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_minimal.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_minimal_conversion.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_minimal_io.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_minimal_struct_array_io.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_minimal_types.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_minimal_types_io.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_minimal_types_io_automatic.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_nbc_change.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_nc_autofill.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_nc_entry.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_nc_metadata.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_nc_validation.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_snippets.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_static_ids.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_str_1d.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_to_xarray.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_uda_support.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/test/test_util.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas/util.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas_python.egg-info/dependency_links.txt +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/imas_python.egg-info/top_level.txt +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/setup.cfg +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/tools/compare_lowlevel_access_patterns.py +0 -0
- {imas_python-2.0.0.post1 → imas_python-2.1.0}/tools/extract_test_data.py +0 -0
- {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-
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
11
|
strategy:
|
|
12
12
|
matrix:
|
|
13
|
-
python-version: ["3.
|
|
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.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: imas-python
|
|
3
|
-
Version: 2.
|
|
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
|
|
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:
|
|
216
|
-
Requires-Dist:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 =
|
|
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],
|
|
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],
|
|
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 = [
|
|
74
|
-
param_names = ["
|
|
71
|
+
params = [available_slicing_backends]
|
|
72
|
+
param_names = ["backend"]
|
|
75
73
|
|
|
76
|
-
def setup(self,
|
|
77
|
-
self.dbentry = create_dbentry(
|
|
78
|
-
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,
|
|
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,
|
|
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 = [
|
|
93
|
-
param_names = ["
|
|
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,
|
|
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(
|
|
107
|
-
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
|
-
|
|
122
|
-
|
|
119
|
+
def setup(self):
|
|
120
|
+
self.core_profiles = imas.IDSFactory().core_profiles()
|
|
123
121
|
|
|
124
|
-
def
|
|
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
|
|
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
|
|
135
|
-
|
|
129
|
+
def time_create_core_profiles(self):
|
|
130
|
+
imas.IDSFactory().core_profiles()
|
|
136
131
|
|
|
137
132
|
|
|
138
133
|
class Put:
|
|
139
|
-
params = [["0", "1"],
|
|
134
|
+
params = [["0", "1"], available_backends]
|
|
140
135
|
param_names = ["disable_validate", "hli", "backend"]
|
|
141
136
|
|
|
142
|
-
def setup(self, disable_validate,
|
|
143
|
-
create_dbentry(
|
|
144
|
-
self.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,
|
|
149
|
-
with create_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"],
|
|
155
|
-
param_names = ["disable_validate", "
|
|
149
|
+
params = [["0", "1"], available_slicing_backends]
|
|
150
|
+
param_names = ["disable_validate", "backend"]
|
|
156
151
|
|
|
157
|
-
def setup(self, disable_validate,
|
|
158
|
-
create_dbentry(
|
|
159
|
-
self.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,
|
|
163
|
-
with create_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 = [
|
|
171
|
-
param_names = ["
|
|
165
|
+
params = [available_serializers]
|
|
166
|
+
param_names = ["serializer"]
|
|
172
167
|
|
|
173
|
-
def setup(self,
|
|
174
|
-
self.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,
|
|
172
|
+
def time_serialize(self, serializer):
|
|
178
173
|
self.core_profiles.serialize(serializer)
|
|
179
174
|
|
|
180
175
|
|
|
181
176
|
class Deserialize:
|
|
182
|
-
params = [
|
|
183
|
-
param_names = ["
|
|
177
|
+
params = [available_serializers]
|
|
178
|
+
param_names = ["serializer"]
|
|
184
179
|
|
|
185
|
-
def setup(self,
|
|
186
|
-
self.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 =
|
|
184
|
+
self.core_profiles = imas.IDSFactory().core_profiles()
|
|
190
185
|
|
|
191
|
-
def time_deserialize(self,
|
|
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
|
|
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 = [
|
|
128
|
-
param_names = ["
|
|
125
|
+
params = [available_backends]
|
|
126
|
+
param_names = ["backend"]
|
|
129
127
|
|
|
130
|
-
def setup(self,
|
|
131
|
-
self.dbentry = create_dbentry(
|
|
132
|
-
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,
|
|
134
|
+
def time_get(self, backend):
|
|
137
135
|
self.dbentry.get("edge_profiles")
|
|
138
136
|
|
|
139
|
-
def teardown(self,
|
|
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
|
-
|
|
146
|
-
|
|
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
|
|
153
|
-
|
|
147
|
+
def time_create_edge_profiles(self):
|
|
148
|
+
imas.IDSFactory().edge_profiles()
|
|
154
149
|
|
|
155
150
|
|
|
156
151
|
class Put:
|
|
157
|
-
params = [["0", "1"],
|
|
158
|
-
param_names = ["disable_validate", "
|
|
152
|
+
params = [["0", "1"], available_backends]
|
|
153
|
+
param_names = ["disable_validate", "backend"]
|
|
159
154
|
|
|
160
|
-
def setup(self, disable_validate,
|
|
161
|
-
create_dbentry(
|
|
162
|
-
self.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,
|
|
167
|
-
with create_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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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
|
-
|
|
83
|
-
|
|
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
|
-
-
|
|
115
|
+
- IMAS-5560: Fix a bug where IMASPy would not correctly recognize that
|
|
63
116
|
the UDA backend is used.
|
|
64
|
-
-
|
|
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
|
|
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
|
-
|
|
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", "
|
|
56
|
-
"merge": (mr_url + "%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
|
-
|
|
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
|
|
294
|
-
IMAS
|
|
295
|
-
|
|
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.
|
|
29
|
-
:mod:`imas.training` module to open the DBEntry for this training data
|
|
30
|
-
|
|
31
|
-
|
|
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
|
|
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
|