imas-python 1.2.1.dev13__tar.gz → 2.0.0.post1__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-1.2.1.dev13 → imas_python-2.0.0.post1}/.github/workflows/linting.yml +8 -3
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/.github/workflows/publish.yml +13 -6
- imas_python-2.0.0.post1/.github/workflows/test_with_pytest.yml +51 -0
- imas_python-2.0.0.post1/.github/workflows/verify_sphinx_doc.yml +53 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/CONTRIBUTING.md +6 -6
- {imas_python-1.2.1.dev13/imas_python.egg-info → imas_python-2.0.0.post1}/PKG-INFO +16 -8
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/README.md +11 -5
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/ci/run_pytest.sh +1 -1
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/Makefile +1 -1
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/changelog.rst +45 -25
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/advanced/imas_snippets/tensorized_ids_to_xarray.py +34 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/advanced/xarray.rst +15 -3
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/index.rst +5 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/installing.rst +1 -1
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/intro.rst +51 -34
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/netcdf.rst +76 -3
- imas_python-2.0.0.post1/imas/_to_xarray.py +73 -0
- imas_python-2.0.0.post1/imas/_version.py +21 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/assets/IDSDef.zip +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/backends/imas_core/al_context.py +13 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/backends/imas_core/db_entry_helpers.py +3 -7
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/backends/imas_core/imas_interface.py +1 -1
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/backends/imas_core/mdsplus_model.py +34 -35
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/backends/netcdf/db_entry_nc.py +13 -12
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/backends/netcdf/ids2nc.py +5 -160
- imas_python-2.0.0.post1/imas/backends/netcdf/ids_tensorizer.py +205 -0
- imas_python-2.0.0.post1/imas/backends/netcdf/iterators.py +98 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/backends/netcdf/nc2ids.py +176 -61
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/backends/netcdf/nc_validate.py +2 -1
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/ids_convert.py +2 -1
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/ids_structure.py +8 -8
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_ids_convert.py +2 -1
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_lazy_loading.py +53 -4
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_nbc_change.py +29 -8
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_nc_validation.py +26 -17
- imas_python-2.0.0.post1/imas/test/test_to_xarray.py +94 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/util.py +75 -3
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1/imas_python.egg-info}/PKG-INFO +16 -8
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas_python.egg-info/SOURCES.txt +6 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas_python.egg-info/requires.txt +4 -1
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/pyproject.toml +7 -2
- imas_python-1.2.1.dev13/imas/_version.py +0 -16
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/.git-blame-ignore-revs +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/.git_archival.txt +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/.gitattributes +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/.gitignore +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/.pylintrc +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/.readthedocs.yml +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/CODE_OF_CONDUCT.md +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/LICENSE.txt +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/MANIFEST.in +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/asv.conf.json +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/benchmarks/__init__.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/benchmarks/core_profiles.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/benchmarks/edge_profiles.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/benchmarks/technical.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/benchmarks/utils.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/ci/build_dd_zip.sh +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/ci/build_docs_and_dist.sh +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/ci/linting.sh +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/ci/run_benchmark.sh +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/conftest.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/.gitignore +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/.gitignore +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/_static/imas.css +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/_static/imas_200x200.png +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/_templates/autosummary/accessor.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/_templates/autosummary/accessor_attribute.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/_templates/autosummary/accessor_callable.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/_templates/autosummary/accessor_method.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/_templates/autosummary/base.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/_templates/custom-class-template.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/_templates/custom-module-template.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/_templates/layout.html +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/api-hidden.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/api.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/benchmarking.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/ci_config.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/cli.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/code_style.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/conf.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/configuring.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/advanced/dd_versions.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/advanced/explore.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/advanced/hashing.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/advanced/imas_snippets/alternative_coordinates.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/advanced/imas_snippets/autoconvert_get.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/advanced/imas_snippets/autoconvert_put.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/advanced/imas_snippets/calc_with_units.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/advanced/imas_snippets/coordinates.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/advanced/imas_snippets/dd_versions.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/advanced/imas_snippets/explore_data.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/advanced/imas_snippets/explore_structures.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/advanced/imas_snippets/hashing.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/advanced/imas_snippets/ids_convert.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/advanced/imas_snippets/ids_to_xarray.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/advanced/metadata.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/advanced_user_training.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/analyze.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/core_profiles_ne_timeslice.png +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/core_profiles_te.png +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/create.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/explore.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/imas_inspect.png +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/imas_snippets/create_core_profiles.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/imas_snippets/explore_public_ec_launchers.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/imas_snippets/explore_public_pf_active.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/imas_snippets/explore_training_data.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/imas_snippets/find_paths.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/imas_snippets/iterate_core_profiles.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/imas_snippets/plot_core_profiles_ne_timeslice.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/imas_snippets/plot_core_profiles_te.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/imas_snippets/print_idss.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/imas_snippets/read_core_profiles_ne_timeslice.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/imas_snippets/read_equilibrium_time_array.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/imas_snippets/read_whole_equilibrium.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/imas_snippets/transform_grid.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/interactive_tab_core_profiles_toplevel.png +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/print_tree_ids_properties.png +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/setup.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic/transform.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/courses/basic_user_training.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/identifiers.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/imas_architecture.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/imas_structure.png +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/lazy_loading.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/mdsplus.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/metadata.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/multi-dd.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/netcdf/conventions.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/release_imas.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/resampling.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/docs/source/validation.rst +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/__init__.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/__main__.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/_util.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/assets/IDSDef2MDSpreTree.xsl +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/assets/IDS_fake_toplevel.xml +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/assets/IDS_minimal.xml +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/assets/IDS_minimal_2.xml +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/assets/IDS_minimal_struct_array.xml +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/assets/IDS_minimal_types.xml +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/assets/ITER_134173_106_core_profiles.ids +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/assets/ITER_134173_106_equilibrium.ids +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/assets/README.md +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/assets/core_profiles.ids +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/assets/equilibrium.ids +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/backends/__init__.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/backends/db_entry_impl.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/backends/imas_core/__init__.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/backends/imas_core/db_entry_al.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/backends/imas_core/uda_support.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/backends/netcdf/__init__.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/backends/netcdf/nc_metadata.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/command/cli.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/command/db_analysis.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/command/helpers.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/command/timer.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/db_entry.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/dd_helpers.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/dd_zip.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/exception.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/ids_base.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/ids_coordinates.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/ids_data_type.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/ids_defs.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/ids_factory.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/ids_identifiers.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/ids_metadata.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/ids_path.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/ids_primitive.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/ids_struct_array.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/ids_toplevel.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/setup_logging.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_all_dd_versions.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_cli.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_dbentry.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_dd_helpers.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_dd_zip.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_deepcopy.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_exception.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_get_sample.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_hash.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_helpers.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_identifiers.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_ids2nc.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_ids_ascii_data.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_ids_coordinates.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_ids_data_type.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_ids_factory.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_ids_metadata.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_ids_mixin.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_ids_path.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_ids_primitive.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_ids_struct_array.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_ids_structure.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_ids_toplevel.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_ids_validate.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_latest_dd_autofill.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_latest_dd_manual.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_latest_dd_resample.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_list_occurrences.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_minimal.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_minimal_conversion.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_minimal_io.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_minimal_struct_array_io.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_minimal_types.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_minimal_types_io.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_minimal_types_io_automatic.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_nc_autofill.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_nc_entry.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_nc_metadata.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_snippets.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_static_ids.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_str_1d.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_time_slicing.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_uda_support.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/test/test_util.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas/training.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas_python.egg-info/dependency_links.txt +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas_python.egg-info/entry_points.txt +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas_python.egg-info/not-zip-safe +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/imas_python.egg-info/top_level.txt +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/setup.cfg +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/setup.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/tools/compare_lowlevel_access_patterns.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/tools/extract_test_data.py +0 -0
- {imas_python-1.2.1.dev13 → imas_python-2.0.0.post1}/tools/get_tagnames.py +0 -0
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
name: linting-and-code-formatting
|
|
2
2
|
|
|
3
|
-
on:
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
types: [opened, synchronize, reopened]
|
|
4
7
|
|
|
5
8
|
jobs:
|
|
6
9
|
build:
|
|
7
10
|
|
|
8
|
-
runs-on: ubuntu-
|
|
11
|
+
runs-on: ubuntu-22.04
|
|
9
12
|
|
|
10
13
|
steps:
|
|
11
14
|
- name: Checkout IMAS-Python sources
|
|
@@ -14,7 +17,9 @@ jobs:
|
|
|
14
17
|
- name: Set up Python
|
|
15
18
|
uses: actions/setup-python@v5
|
|
16
19
|
with:
|
|
17
|
-
|
|
20
|
+
# until saxonche is available in 3.13
|
|
21
|
+
# https://saxonica.plan.io/issues/6561
|
|
22
|
+
python-version: "<3.13"
|
|
18
23
|
|
|
19
24
|
- name: Display Python version
|
|
20
25
|
run: python -c "import sys; print(sys.version)"
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
name: build-wheel-and-publish-test-pypi
|
|
2
2
|
|
|
3
|
-
on:
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
types: [opened, synchronize, reopened]
|
|
4
7
|
|
|
5
8
|
jobs:
|
|
6
9
|
build:
|
|
7
10
|
name: Build distribution
|
|
8
|
-
runs-on: ubuntu-
|
|
11
|
+
runs-on: ubuntu-22.04
|
|
9
12
|
steps:
|
|
10
13
|
- uses: actions/checkout@v4
|
|
11
14
|
with:
|
|
@@ -13,7 +16,9 @@ jobs:
|
|
|
13
16
|
- name: Set up Python
|
|
14
17
|
uses: actions/setup-python@v5
|
|
15
18
|
with:
|
|
16
|
-
|
|
19
|
+
# until saxonche is available in 3.13
|
|
20
|
+
# https://saxonica.plan.io/issues/6561
|
|
21
|
+
python-version: "<3.13"
|
|
17
22
|
- name: Install pypa/build
|
|
18
23
|
run: >-
|
|
19
24
|
python3 -m pip install pip setuptools wheel build
|
|
@@ -27,9 +32,10 @@ jobs:
|
|
|
27
32
|
|
|
28
33
|
publish-to-pypi:
|
|
29
34
|
name: Publish IMAS-Python distribution to PyPI
|
|
35
|
+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
|
|
30
36
|
needs:
|
|
31
37
|
- build
|
|
32
|
-
runs-on: ubuntu-
|
|
38
|
+
runs-on: ubuntu-22.04
|
|
33
39
|
environment:
|
|
34
40
|
name: pypi
|
|
35
41
|
url: https://pypi.org/p/imas-python
|
|
@@ -46,9 +52,10 @@ jobs:
|
|
|
46
52
|
|
|
47
53
|
publish-to-testpypi:
|
|
48
54
|
name: Publish IMAS-Python distribution to TestPyPI
|
|
55
|
+
if: github.ref=='refs/heads/develop' # only publish to TestPyPI on develop pushes
|
|
49
56
|
needs:
|
|
50
57
|
- build
|
|
51
|
-
runs-on: ubuntu-
|
|
58
|
+
runs-on: ubuntu-22.04
|
|
52
59
|
environment:
|
|
53
60
|
name: testpypi
|
|
54
61
|
url: https://test.pypi.org/p/imas-python
|
|
@@ -64,4 +71,4 @@ jobs:
|
|
|
64
71
|
uses: pypa/gh-action-pypi-publish@unstable/v1
|
|
65
72
|
with:
|
|
66
73
|
repository-url: https://test.pypi.org/legacy/
|
|
67
|
-
verbose: true
|
|
74
|
+
verbose: true
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
name: Test using pytest
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
types: [opened, synchronize, reopened]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-22.04
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] # Test on multiple Python versions
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout repository
|
|
17
|
+
uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
20
|
+
|
|
21
|
+
uses: actions/setup-python@v4
|
|
22
|
+
with:
|
|
23
|
+
# until saxonche is available in 3.13
|
|
24
|
+
# https://saxonica.plan.io/issues/6561
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
- name: Display Python version
|
|
27
|
+
run: python -c "import sys; print(sys.version)"
|
|
28
|
+
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: |
|
|
31
|
+
python -m venv venv
|
|
32
|
+
source venv/bin/activate
|
|
33
|
+
pip install --upgrade pip setuptools wheel
|
|
34
|
+
pip install .[test]
|
|
35
|
+
|
|
36
|
+
- name: Run tests
|
|
37
|
+
run: |
|
|
38
|
+
source venv/bin/activate
|
|
39
|
+
python -m pytest -n=auto --cov=imas --cov-report=term-missing --cov-report=xml:coverage.xml --cov-report=html:htmlcov --junit-xml=junit.xml
|
|
40
|
+
|
|
41
|
+
- name: Upload coverage report ${{ matrix.python-version }}
|
|
42
|
+
uses: actions/upload-artifact@v4
|
|
43
|
+
with:
|
|
44
|
+
name: coverage-report-${{ matrix.python-version }}
|
|
45
|
+
path: htmlcov
|
|
46
|
+
|
|
47
|
+
- name: Upload test report ${{ matrix.python-version }}
|
|
48
|
+
uses: actions/upload-artifact@v4
|
|
49
|
+
with:
|
|
50
|
+
name: test-report-${{ matrix.python-version }}
|
|
51
|
+
path: junit.xml
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: verify-sphinx-doc-generation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
types: [opened, synchronize, reopened]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build-and-test:
|
|
10
|
+
runs-on: ubuntu-22.04
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout IMAS-Python sources
|
|
14
|
+
uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Set up Python
|
|
17
|
+
uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
with:
|
|
20
|
+
# until saxonche is available in 3.13
|
|
21
|
+
# https://saxonica.plan.io/issues/6561
|
|
22
|
+
python-version: "<3.13"
|
|
23
|
+
|
|
24
|
+
- name: Display Python version
|
|
25
|
+
run: python -c "import sys; print(sys.version)"
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
- name: Set up Python virtual environment
|
|
29
|
+
run: |
|
|
30
|
+
python -m venv venv
|
|
31
|
+
source venv/bin/activate
|
|
32
|
+
|
|
33
|
+
- name: Install build dependencies
|
|
34
|
+
run: |
|
|
35
|
+
pip install --upgrade pip setuptools wheel build
|
|
36
|
+
|
|
37
|
+
- name: Build package
|
|
38
|
+
run: |
|
|
39
|
+
rm -rf dist
|
|
40
|
+
python -m build .
|
|
41
|
+
|
|
42
|
+
- name: Install package and dependencies
|
|
43
|
+
run: |
|
|
44
|
+
pip install "$(readlink -f dist/*.whl)[docs,netcdf]"
|
|
45
|
+
|
|
46
|
+
- name: Debug dependencies
|
|
47
|
+
run: |
|
|
48
|
+
pip freeze
|
|
49
|
+
|
|
50
|
+
- name: Build Sphinx documentation
|
|
51
|
+
run: |
|
|
52
|
+
export SPHINXOPTS='-W -n --keep-going'
|
|
53
|
+
make -C docs clean html
|
|
@@ -9,28 +9,28 @@ Please first make sure you read and follow the
|
|
|
9
9
|
## You think you found a bug in the code, or have a question in its use
|
|
10
10
|
1. use the [issue search](https://github.com/iterorganization/IMAS-Python/issues)
|
|
11
11
|
to check if someone already created a similar issue;
|
|
12
|
-
|
|
12
|
+
2. if not, make a **new issue** to describe your problem or question.
|
|
13
13
|
In the case of a bug suspiscion, please try to give all the relevant
|
|
14
14
|
information to allow reproducing the error or identifying
|
|
15
15
|
its root cause (version of the IMAS-Python, OS and relevant
|
|
16
16
|
dependencies, snippet of code);
|
|
17
|
-
|
|
17
|
+
3. apply relevant labels to the issue.
|
|
18
18
|
|
|
19
19
|
## You want to make or ask some change to the code
|
|
20
20
|
1. use the [issue search](https://github.com/iterorganization/IMAS-Python/issues)
|
|
21
21
|
to check if someone already proposed a similar idea/change;
|
|
22
|
-
|
|
22
|
+
2. if not, create a **new issue** to describe what change you would like to see
|
|
23
23
|
implemented and specify it if you intend to work on it yourself or if some help
|
|
24
24
|
will be needed;
|
|
25
|
-
|
|
25
|
+
3. wait until some kind of consensus is reached about your idea being relevant,
|
|
26
26
|
at which time the issue will be assigned (to you or someone else who can work on
|
|
27
27
|
this topic);
|
|
28
|
-
|
|
28
|
+
4. if you do the development yourself, fork the repository to your own Github
|
|
29
29
|
profile and create your own feature branch off of the latest develop commit.
|
|
30
30
|
Make sure to regularly sync your branch with the latest commits from `develop`
|
|
31
31
|
(find instructions
|
|
32
32
|
[here](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork));
|
|
33
|
-
|
|
33
|
+
5. when your development is ready, create a pull request (find instructions
|
|
34
34
|
[here](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork)).
|
|
35
35
|
|
|
36
36
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: imas-python
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0.post1
|
|
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
|
|
@@ -215,7 +215,7 @@ Requires-Dist: xxhash>=2
|
|
|
215
215
|
Requires-Dist: saxonche
|
|
216
216
|
Requires-Dist: gitpython
|
|
217
217
|
Provides-Extra: all
|
|
218
|
-
Requires-Dist: imas[docs,
|
|
218
|
+
Requires-Dist: imas-python[docs,test]; extra == "all"
|
|
219
219
|
Provides-Extra: docs
|
|
220
220
|
Requires-Dist: sphinx<7.0.0,>=6.0.0; extra == "docs"
|
|
221
221
|
Requires-Dist: sphinx-autosummary-accessors>=0.1.2; extra == "docs"
|
|
@@ -225,6 +225,8 @@ Provides-Extra: netcdf
|
|
|
225
225
|
Requires-Dist: netCDF4>=1.4.1; extra == "netcdf"
|
|
226
226
|
Provides-Extra: h5py
|
|
227
227
|
Requires-Dist: h5py; extra == "h5py"
|
|
228
|
+
Provides-Extra: xarray
|
|
229
|
+
Requires-Dist: xarray; extra == "xarray"
|
|
228
230
|
Provides-Extra: test
|
|
229
231
|
Requires-Dist: pytest>=5.4.1; extra == "test"
|
|
230
232
|
Requires-Dist: pytest-cov>=0.6; extra == "test"
|
|
@@ -234,13 +236,13 @@ Requires-Dist: matplotlib; extra == "test"
|
|
|
234
236
|
Requires-Dist: asv==0.6.1; extra == "test"
|
|
235
237
|
Requires-Dist: virtualenv; extra == "test"
|
|
236
238
|
Requires-Dist: pint; extra == "test"
|
|
237
|
-
Requires-Dist: xarray; extra == "test"
|
|
239
|
+
Requires-Dist: imas-python[h5py,netcdf,xarray]; extra == "test"
|
|
238
240
|
|
|
239
241
|
# IMAS-Python
|
|
240
242
|
|
|
241
|
-
IMAS-Python is a pure-python library to handle
|
|
242
|
-
It is designed for, but not necessarily bound to, interacting
|
|
243
|
-
Data Structures (IDSs) as defined by the Integrated Modelling & Analysis Suite (IMAS)
|
|
243
|
+
IMAS-Python (formerly known as IMASPy its for versions < 2) is a pure-python library to handle
|
|
244
|
+
arbitrarily nested data structures. It is designed for, but not necessarily bound to, interacting
|
|
245
|
+
with Interface Data Structures (IDSs) as defined by the Integrated Modelling & Analysis Suite (IMAS)
|
|
244
246
|
Data Model.
|
|
245
247
|
|
|
246
248
|
|
|
@@ -266,11 +268,17 @@ factory = imas.IDSFactory()
|
|
|
266
268
|
equilibrium = factory.equilibrium()
|
|
267
269
|
print(equilibrium)
|
|
268
270
|
|
|
269
|
-
equilibrium.ids_properties.homogeneous_time = imas.ids_defs.
|
|
271
|
+
equilibrium.ids_properties.homogeneous_time = imas.ids_defs.IDS_TIME_MODE_HOMOGENEOUS
|
|
270
272
|
equilibrium.ids_properties.comment = "testing"
|
|
273
|
+
equilibrium.time = [0.01]
|
|
271
274
|
|
|
272
|
-
with imas.DBEntry("imas:hdf5?path=./testdb","w") as dbentry:
|
|
275
|
+
with imas.DBEntry("imas:hdf5?path=./testdb", "w") as dbentry:
|
|
273
276
|
dbentry.put(equilibrium)
|
|
277
|
+
|
|
278
|
+
# or without imas_core dependency
|
|
279
|
+
with imas.DBEntry("./test.nc", "w") as dbentry:
|
|
280
|
+
dbentry.put(equilibrium)
|
|
281
|
+
|
|
274
282
|
```
|
|
275
283
|
|
|
276
284
|
A quick 5 minutes introduction is available in the documentation generated from `/docs/sources/intro.rst`.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# IMAS-Python
|
|
2
2
|
|
|
3
|
-
IMAS-Python is a pure-python library to handle
|
|
4
|
-
It is designed for, but not necessarily bound to, interacting
|
|
5
|
-
Data Structures (IDSs) as defined by the Integrated Modelling & Analysis Suite (IMAS)
|
|
3
|
+
IMAS-Python (formerly known as IMASPy its for versions < 2) is a pure-python library to handle
|
|
4
|
+
arbitrarily nested data structures. It is designed for, but not necessarily bound to, interacting
|
|
5
|
+
with Interface Data Structures (IDSs) as defined by the Integrated Modelling & Analysis Suite (IMAS)
|
|
6
6
|
Data Model.
|
|
7
7
|
|
|
8
8
|
|
|
@@ -28,11 +28,17 @@ factory = imas.IDSFactory()
|
|
|
28
28
|
equilibrium = factory.equilibrium()
|
|
29
29
|
print(equilibrium)
|
|
30
30
|
|
|
31
|
-
equilibrium.ids_properties.homogeneous_time = imas.ids_defs.
|
|
31
|
+
equilibrium.ids_properties.homogeneous_time = imas.ids_defs.IDS_TIME_MODE_HOMOGENEOUS
|
|
32
32
|
equilibrium.ids_properties.comment = "testing"
|
|
33
|
+
equilibrium.time = [0.01]
|
|
33
34
|
|
|
34
|
-
with imas.DBEntry("imas:hdf5?path=./testdb","w") as dbentry:
|
|
35
|
+
with imas.DBEntry("imas:hdf5?path=./testdb", "w") as dbentry:
|
|
35
36
|
dbentry.put(equilibrium)
|
|
37
|
+
|
|
38
|
+
# or without imas_core dependency
|
|
39
|
+
with imas.DBEntry("./test.nc", "w") as dbentry:
|
|
40
|
+
dbentry.put(equilibrium)
|
|
41
|
+
|
|
36
42
|
```
|
|
37
43
|
|
|
38
44
|
A quick 5 minutes introduction is available in the documentation generated from `/docs/sources/intro.rst`.
|
|
@@ -31,7 +31,7 @@ clean: Makefile
|
|
|
31
31
|
# Seems to overwrite autosummary documentation though! So not using this rn
|
|
32
32
|
MODULE_EXCLUDE="../imas/examples/**" "../imas/**"
|
|
33
33
|
apidocs: Makefile
|
|
34
|
-
sphinx-apidoc --implicit-namespaces -o "$(GENERATEDDIR)" "$(PROJECT_ROOT)/
|
|
34
|
+
sphinx-apidoc --implicit-namespaces -o "$(GENERATEDDIR)" "$(PROJECT_ROOT)/imas/" $(MODULE_EXCLUDE)
|
|
35
35
|
|
|
36
36
|
# Sphinx will run this automatically
|
|
37
37
|
autogen: Makefile
|
|
@@ -3,13 +3,33 @@
|
|
|
3
3
|
Changelog
|
|
4
4
|
=========
|
|
5
5
|
|
|
6
|
-
What's new in IMAS-Python
|
|
7
|
-
|
|
6
|
+
What's new in IMAS-Python 2.0.0
|
|
7
|
+
-------------------------------
|
|
8
|
+
|
|
9
|
+
Breaking change
|
|
10
|
+
'''''''''''''''
|
|
11
|
+
|
|
12
|
+
The package name was changed from ``imaspy`` to ``imas`` while porting the code to `GitHub <https://github.com/iterorganization/IMAS-Python>`__. This shall only affect the import statements in your code.
|
|
13
|
+
|
|
14
|
+
New features and improvements
|
|
15
|
+
'''''''''''''''''''''''''''''
|
|
16
|
+
|
|
17
|
+
- Add :py:func:`imas.util.to_xarray` to convert a full IDS or only specific paths herein to a Xarray ``Dataset``. See :ref:`Convert IMAS-Python IDSs directly to Xarray Datasets` for more details.
|
|
18
|
+
- Implements automatic DD version conversion on :py:meth:`imas.db_entry.DBEntry.get` (conversion during :py:meth:`imas.db_entry.DBEntry.put` is not supported as this is rarely needed and easily worked around).
|
|
19
|
+
- Enable lazy loading when reading data from a netCDF file.
|
|
20
|
+
- Minor performance improvement loading data from a netCDF file.
|
|
21
|
+
- Replace versioneer by setuptools-scm to determine the version of the code.
|
|
22
|
+
- Use `saxonche <https://pypi.org/project/saxonche/>`__ instead of the JAR for XSL transforms (when building versions of the DD).
|
|
23
|
+
- Updating the README, CONTRIBUTING guidelines and documentation after making the code open access.
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
What's new in IMASPy 1.2.0
|
|
27
|
+
-------------------------------
|
|
8
28
|
|
|
9
29
|
New features and improvements
|
|
10
30
|
'''''''''''''''''''''''''''''
|
|
11
31
|
|
|
12
|
-
- Add :py:func:`imaspy.DBEntry.get_sample
|
|
32
|
+
- Add :py:func:`imaspy.DBEntry.get_sample <imas.db_entry.DBEntry.get_sample>` (requires imas_core >= 5.4.0)
|
|
13
33
|
- Improved validation of netCDF files
|
|
14
34
|
- Improve compatibility with the UDA backend in imas_core
|
|
15
35
|
- Extend the support of netCDF to >= 1.4.1 (without complex numbers)
|
|
@@ -23,7 +43,7 @@ Bug fixes
|
|
|
23
43
|
|
|
24
44
|
|
|
25
45
|
|
|
26
|
-
What's new in
|
|
46
|
+
What's new in IMASPy 1.1.1
|
|
27
47
|
-------------------------------
|
|
28
48
|
|
|
29
49
|
This is a small release that mainly fixes issues related to the recent Data
|
|
@@ -39,7 +59,7 @@ Bug fixes
|
|
|
39
59
|
Dictionary 4.0.0 and 3.42.0. In other cases, the Data Dictionary version is
|
|
40
60
|
now explicitly indicated.
|
|
41
61
|
|
|
42
|
-
- :issue:`IMAS-5560`: Fix a bug where
|
|
62
|
+
- :issue:`IMAS-5560`: Fix a bug where IMASPy would not correctly recognize that
|
|
43
63
|
the UDA backend is used.
|
|
44
64
|
- :issue:`IMAS-5541`: Fix a bug when converting a closed contour to Data
|
|
45
65
|
Dictionary version 4.0.0.
|
|
@@ -49,7 +69,7 @@ Bug fixes
|
|
|
49
69
|
recent Data Dictionary version than the on-disk data was stored with.
|
|
50
70
|
|
|
51
71
|
|
|
52
|
-
What's new in
|
|
72
|
+
What's new in IMASPy 1.1
|
|
53
73
|
-----------------------------
|
|
54
74
|
|
|
55
75
|
New features
|
|
@@ -57,7 +77,7 @@ New features
|
|
|
57
77
|
|
|
58
78
|
- :ref:`1.1/improved performance`.
|
|
59
79
|
- :ref:`1.1/improved conversion`.
|
|
60
|
-
-
|
|
80
|
+
- IMASPy 1.1 adds support for Identifiers defined by the Data Dictionary. This
|
|
61
81
|
functionality is described in detail in :ref:`Identifiers`.
|
|
62
82
|
- Support for the new
|
|
63
83
|
:py:const:`~imas.ids_defs.FLEXBUFFERS_SERIALIZER_PROTOCOL` that is
|
|
@@ -72,7 +92,7 @@ New features
|
|
|
72
92
|
netCDF file, which can be used for sharing and/or archiving data.
|
|
73
93
|
|
|
74
94
|
This feature is in `preview` status, meaning that it may change in upcoming
|
|
75
|
-
minor releases of
|
|
95
|
+
minor releases of IMASPy.
|
|
76
96
|
|
|
77
97
|
- Additional utility functions in :py:mod:`imas.util`:
|
|
78
98
|
|
|
@@ -91,18 +111,18 @@ New features
|
|
|
91
111
|
- :py:func:`imas.util.get_data_dictionary_version` returns the Data
|
|
92
112
|
Dictionary version for which an IDS was created.
|
|
93
113
|
|
|
94
|
-
- Add support for IMAS Access Layer Core 5.2 and later.
|
|
114
|
+
- Add support for IMAS Access Layer Core 5.2 and later. IMASPy can now be used
|
|
95
115
|
with just the Access Layer Core package available, the full AL-Python HLI is
|
|
96
116
|
no longer required.
|
|
97
117
|
|
|
98
118
|
Since the Access Layer Core is now installable with ``pip`` as well (requires
|
|
99
119
|
access to the git repository on
|
|
100
|
-
`<https://
|
|
101
|
-
``
|
|
120
|
+
`<https://git.iter.org/projects/IMAS/repos/al-core/>`__), you can install
|
|
121
|
+
``imaspy`` and ``imas_core`` in one go with:
|
|
102
122
|
|
|
103
123
|
.. code-block:: bash
|
|
104
124
|
|
|
105
|
-
pip install '
|
|
125
|
+
pip install 'imaspy[imas-core] @ git+ssh://git@git.iter.org/imas/imaspy.git'
|
|
106
126
|
|
|
107
127
|
- A diff tool for IDSs: :py:func:`imas.util.idsdiff`.
|
|
108
128
|
- Implement ``==`` equality checking for IDS Structures and Arrays of Structures
|
|
@@ -111,12 +131,12 @@ New features
|
|
|
111
131
|
backend.
|
|
112
132
|
|
|
113
133
|
During a :py:meth:`~imas.db_entry.DBEntry.get` or
|
|
114
|
-
:py:meth:`~imas.db_entry.DBEntry.get_slice`,
|
|
134
|
+
:py:meth:`~imas.db_entry.DBEntry.get_slice`, IMASPy first reads the version
|
|
115
135
|
of the Data Dictionary that was used to store the IDS. When this version is
|
|
116
|
-
not known to
|
|
136
|
+
not known to IMASPy, an error is raised. This error can now be ignored by
|
|
117
137
|
setting the parameter
|
|
118
138
|
:py:param:`~imas.db_entry.DBEntry.get.ignore_unknown_dd_version` to
|
|
119
|
-
``True``, and
|
|
139
|
+
``True``, and IMASPy will do its best to load the data anyway.
|
|
120
140
|
|
|
121
141
|
- A new command line tool exists for analyzing which Data Dictionary fields are
|
|
122
142
|
used in provided Data Entries. This tool is explained in detail in
|
|
@@ -130,7 +150,7 @@ Breaking changes
|
|
|
130
150
|
|
|
131
151
|
.. note::
|
|
132
152
|
|
|
133
|
-
We attempt to keep the public API of
|
|
153
|
+
We attempt to keep the public API of IMASPy stable with minor releases. The
|
|
134
154
|
following breaking change is the result of an upgrade of the IMAS Access Layer.
|
|
135
155
|
|
|
136
156
|
- Starting with Access Layer 5.2 or newer, the Access Layer will raise
|
|
@@ -141,8 +161,8 @@ Breaking changes
|
|
|
141
161
|
You may need to update the :py:class:`Exception` classes in ``try/except``
|
|
142
162
|
blocks to the new Exception classes raised by ``imas_core``.
|
|
143
163
|
|
|
144
|
-
When using an older version of the Access Layer, the behaviour of
|
|
145
|
-
different than in
|
|
164
|
+
When using an older version of the Access Layer, the behaviour of IMASPy is no
|
|
165
|
+
different than in IMASPy 1.0.
|
|
146
166
|
|
|
147
167
|
|
|
148
168
|
Bug fixes
|
|
@@ -156,10 +176,10 @@ Bug fixes
|
|
|
156
176
|
- Fixed a bug with :py:func:`~imas.ids_toplevel.IDSToplevel.serialize` when
|
|
157
177
|
the IDS is in a non-default Data Dictionary version.
|
|
158
178
|
- Fixed a bug when assigning ``nan`` to a FLT_0D, which would lead to a
|
|
159
|
-
confusing and incorrect log message in
|
|
160
|
-
- Fixed incorrect oldest supported DD version. Previously
|
|
179
|
+
confusing and incorrect log message in IMASPy 1.0.
|
|
180
|
+
- Fixed incorrect oldest supported DD version. Previously IMASPy indicated that
|
|
161
181
|
DD ``3.21.1`` was supported, however ``3.22.0`` is the oldest Data Dictionary
|
|
162
|
-
tested (and provided) with
|
|
182
|
+
tested (and provided) with IMASPy. :py:attr:`imas.OLDEST_SUPPORTED_VERSION`
|
|
163
183
|
has been updated to reflect this.
|
|
164
184
|
- Fixed a bug when using numpy functions, such as
|
|
165
185
|
:external:py:func:`numpy.isclose` on scalar numbers. Previously an error was
|
|
@@ -178,11 +198,11 @@ Improved performance
|
|
|
178
198
|
''''''''''''''''''''
|
|
179
199
|
|
|
180
200
|
- Improved performance of :py:meth:`~imas.ids_toplevel.IDSToplevel.validate`.
|
|
181
|
-
- Improved creation of
|
|
201
|
+
- Improved creation of IMASPy IDS objects. This made filling IDSs and loading
|
|
182
202
|
them with :py:meth:`~imas.db_entry.DBEntry.get` /
|
|
183
203
|
:py:meth:`~imas.db_entry.DBEntry.get_slice` 10-20% faster.
|
|
184
204
|
- Improved the performance of lazy loading. This is most noticeable with the
|
|
185
|
-
``HDF5`` backend, which is now up to 40x faster than with
|
|
205
|
+
``HDF5`` backend, which is now up to 40x faster than with IMASPy 1.0.
|
|
186
206
|
- Improved the performance of :py:meth:`~imas.db_entry.DBEntry.get` /
|
|
187
207
|
:py:meth:`~imas.db_entry.DBEntry.get_slice` /
|
|
188
208
|
:py:meth:`~imas.db_entry.DBEntry.put` /
|
|
@@ -200,7 +220,7 @@ Converting IDSs between Data Dictionary versions has several improvements for
|
|
|
200
220
|
recent DD versions. Further details on IDS conversion can be found in
|
|
201
221
|
:ref:`Conversion of IDSs between DD versions`.
|
|
202
222
|
|
|
203
|
-
- The
|
|
223
|
+
- The IMASPy Command Line Interface for converting Data Entries between different
|
|
204
224
|
versions of the Data Dictionary has been improved. See :ref:`Command line tool
|
|
205
225
|
reference` or execute ``imas convert --help`` in a shell for further
|
|
206
226
|
details.
|
|
@@ -210,7 +230,7 @@ recent DD versions. Further details on IDS conversion can be found in
|
|
|
210
230
|
For example, in the ``pulse_schedule`` IDS, the node
|
|
211
231
|
``ec/beam/power_launched/reference`` in Data Dictionary ``3.40.0`` was renamed
|
|
212
232
|
from ``ec/launcher/power/reference/data`` in Data Dictionary ``3.39.0``. This
|
|
213
|
-
use case is now supported by
|
|
233
|
+
use case is now supported by IMASPy.
|
|
214
234
|
|
|
215
235
|
- Automatically convert data between 0D and 1D when possible (`IMAS-5170
|
|
216
236
|
<https://jira.iter.org/browse/IMAS-5170>`__).
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import os
|
|
2
2
|
|
|
3
3
|
import matplotlib
|
|
4
|
+
|
|
4
5
|
# To avoid possible display issues when Matplotlib uses a non-GUI backend
|
|
5
6
|
if "DISPLAY" not in os.environ:
|
|
6
7
|
matplotlib.use("agg")
|
|
@@ -17,6 +18,39 @@ import xarray
|
|
|
17
18
|
entry = imas.training.get_training_db_entry()
|
|
18
19
|
cp = entry.get("core_profiles")
|
|
19
20
|
|
|
21
|
+
#######################################################################################
|
|
22
|
+
# Steps 2, 3 and 4, using imas.util.to_xarray
|
|
23
|
+
# Create an xarray Dataset containing t_i_average and its coordinates
|
|
24
|
+
xrds = imas.util.to_xarray(cp, "profiles_1d/t_i_average")
|
|
25
|
+
# Note that profiles_1d.grid.rho_tor_norm is a 2D coordinate: its values may be
|
|
26
|
+
# different at different times.
|
|
27
|
+
#
|
|
28
|
+
# Since the values at different time slices differ only minutely in this example, we'll
|
|
29
|
+
# rename the `profiles_1d.grid.rho_tor_norm:i` dimension to `rho_tor_norm` and set the
|
|
30
|
+
# values to the values of rho_tor_norm of the first time slice:
|
|
31
|
+
xrds = xrds.rename({"profiles_1d.grid.rho_tor_norm:i": "rho_tor_norm"}).assign_coords(
|
|
32
|
+
{"rho_tor_norm": xrds["profiles_1d.grid.rho_tor_norm"].isel(time=0).data}
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
# Extract temperatures as an xarray DataArray
|
|
36
|
+
temperature = xrds["profiles_1d.t_i_average"]
|
|
37
|
+
|
|
38
|
+
# 5a. Select subset of temperature where 0.4 <= rho_tor_norm < 0.6:
|
|
39
|
+
print(temperature.sel(rho_tor_norm=slice(0.4, 0.6)))
|
|
40
|
+
|
|
41
|
+
# 5b. Interpolate temperature on a new grid: [0, 0.1, 0.2, ..., 0.9, 1.0]
|
|
42
|
+
print(temperature.interp(rho_tor_norm=numpy.linspace(0, 1, 11)))
|
|
43
|
+
|
|
44
|
+
# 5c. Interpolate temperature on a new time base: [10, 20]
|
|
45
|
+
print(temperature.interp(time=[10, 20]))
|
|
46
|
+
|
|
47
|
+
# 5d. Plot
|
|
48
|
+
temperature.plot(x="time", norm=matplotlib.colors.LogNorm())
|
|
49
|
+
plt.show()
|
|
50
|
+
|
|
51
|
+
#######################################################################################
|
|
52
|
+
# We can also manually build an xarray DataArray, this is shown below:
|
|
53
|
+
|
|
20
54
|
# 2. Store the temperature of the first time slice
|
|
21
55
|
temperature = cp.profiles_1d[0].t_i_average
|
|
22
56
|
|
|
@@ -3,9 +3,12 @@ Create ``xarray.DataArray`` from an IDS
|
|
|
3
3
|
|
|
4
4
|
.. info::
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
This lesson was written before :py:func:`imas.util.to_xarray` was
|
|
7
|
+
implemented. This lesson is retained for educational purposes, however we
|
|
8
|
+
recommend to use :py:func:`imas.util.to_xarray` instead of manually creating
|
|
9
|
+
xarray ``DataArray``\ s.
|
|
10
|
+
|
|
11
|
+
See also: :ref:`Convert IMAS-Python IDSs directly to Xarray Datasets`.
|
|
9
12
|
|
|
10
13
|
Let's start with an introduction of Xarray. According to `their website
|
|
11
14
|
<https://docs.xarray.dev/en/stable/getting-started-guide/why-xarray.html>`_ (where you
|
|
@@ -61,6 +64,10 @@ Exercise 1: create a ``DataArray`` for ``profiles_1d/temperature``
|
|
|
61
64
|
|
|
62
65
|
.. md-tab-item:: Solution
|
|
63
66
|
|
|
67
|
+
This exercise was created before the implementation of
|
|
68
|
+
:py:func:`imas.util.to_xarray`. The original approach is available below
|
|
69
|
+
for educational purposes.
|
|
70
|
+
|
|
64
71
|
.. literalinclude:: imas_snippets/ids_to_xarray.py
|
|
65
72
|
|
|
66
73
|
|
|
@@ -96,4 +103,9 @@ the ``profiles_1d`` array of structures. When the grid is not changing in the ID
|
|
|
96
103
|
|
|
97
104
|
.. md-tab-item:: Solution
|
|
98
105
|
|
|
106
|
+
This exercise was created before the implementation of
|
|
107
|
+
:py:func:`imas.util.to_xarray`. Below code sample is updated to provide
|
|
108
|
+
two alternatives: the first is based on :py:func:`imas.util.to_xarray`,
|
|
109
|
+
the second is the original, manual approach.
|
|
110
|
+
|
|
99
111
|
.. literalinclude:: imas_snippets/tensorized_ids_to_xarray.py
|
|
@@ -11,6 +11,11 @@ data structures. IMAS-Python is designed for, but not necessarily bound to,
|
|
|
11
11
|
interacting with Interface Data Structures (IDSs) as defined by the
|
|
12
12
|
Integrated Modelling & Analysis Suite (IMAS) Data Model.
|
|
13
13
|
|
|
14
|
+
.. note::
|
|
15
|
+
|
|
16
|
+
IMAS-Python was formerly known as IMASPy, and was renamed with the release
|
|
17
|
+
of the major version 2.
|
|
18
|
+
|
|
14
19
|
It provides:
|
|
15
20
|
|
|
16
21
|
- An easy-to-install and easy-to-get started package by
|
|
@@ -56,7 +56,7 @@ This is how to run the IMAS-Python test suite:
|
|
|
56
56
|
# inside the IMAS-Python git repository
|
|
57
57
|
pytest imas --mini
|
|
58
58
|
|
|
59
|
-
# run with a specific backend
|
|
59
|
+
# run with a specific backend, requires IMAS-Core installed
|
|
60
60
|
pytest imas --ascii --mini
|
|
61
61
|
|
|
62
62
|
And to build the IMAS-Python documentation, execute:
|