Skip to content

Release 2.0.1 #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Jun 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
181d198
Update install doc and readme with info on optional deps
olivhoenen Mar 20, 2025
7e45d56
Also apply COCOS 11/17 sign conversion to `dodpsi_like` when converti…
maarten-ic Apr 1, 2025
3f46e3f
Update backend selection logic
maarten-ic Apr 3, 2025
e27d256
Initial logic to implement iterorganization/IMAS-Python#21
maarten-ic Apr 2, 2025
c26bf0b
Restructure pulse_schedule resampling to reuse more existing logic
maarten-ic Apr 3, 2025
25bc4fd
Refactoring and suppress some log messages
maarten-ic Apr 3, 2025
55bd0c6
More refactoring
maarten-ic Apr 3, 2025
0634710
Add documentation
maarten-ic Apr 3, 2025
639adde
Fix typo
maarten-ic Apr 3, 2025
111f650
Extend DD version range to which the pulse schedule conversion applies
maarten-ic Apr 4, 2025
4e42d11
Remove numpy<2 restriction
maarten-ic Apr 15, 2025
f4ebddc
Use datapath with UDA when fetching IDS properties
maarten-ic Apr 23, 2025
12b52e3
Revert "Update backend selection logic"
maarten-ic May 2, 2025
7d810dd
Warn only once for paths that do not exist in the target IDS per conv…
maarten-ic May 21, 2025
09104ac
Add CODEOWNERS
olivhoenen Jun 3, 2025
ff0f628
Add example in doc to list available IDS+occ in a data-entry (#35)
olivhoenen Jun 6, 2025
d0c5c8e
Minor edit
olivhoenen Jun 6, 2025
a03fea7
Apply suggestions on code and text of the documentation
olivhoenen Jun 6, 2025
e35187a
Modify lazy loading test to generate random data without complex numb…
Nush395 Jun 9, 2025
cec6fdd
Remove logic for building the Data Dictionary
maarten-ic Jun 6, 2025
da8b1a6
Update documentation
maarten-ic Jun 6, 2025
fbbedd3
Make saxonche an optional dependency
maarten-ic Jun 11, 2025
0eed64b
Remove Bamboo CI scripts
maarten-ic Jun 11, 2025
1992218
Changelog for release 2.0.1
olivhoenen Jun 18, 2025
60e35d4
Fixup release notes and install doc
olivhoenen Jun 18, 2025
40de236
Fix typo in readme
olivhoenen Jun 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file allows setting automatically reviewers for pull requests.
# Each line is a file pattern followed by one or more owners.
# The last match takes precedence over previous ones.
# Do not edit unless specifically mandated to do so.

# Global/fallback and technical modifications.
* @maarten-ic @prasad-sawantdesai @olivhoenen

# Modifications to CODEOWNERS and action workflows
.github/ @SimonPinches @olivhoenen
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,20 @@ Data Model.

## Install

Install steps are described in the documentation generated from `/docs/source/installing.rst`.
Simply install IMAS-Python with ``pip``:
```bash
pip install imas-python
```
or with optional dependencies for netCDF and xarray support:
```bash
pip install imas-python[netcdf,xarray]
```

Documentation is autogenerated from the source using [Sphinx](http://sphinx-doc.org/)
More details are described in the documentation generated from `/docs/source/installing.rst`.
The documentation is autogenerated from the source using [Sphinx](http://sphinx-doc.org/)
and can be found at the [readthedocs](https://imas-python.readthedocs.io/en/latest/)

The documentation can be manually generated by installing sphinx and running:

To generate the documentation yourself, install the ``docs`` optional dependencies and do:
```bash
make -C docs html
```
Expand Down
30 changes: 0 additions & 30 deletions ci/build_dd_zip.sh

This file was deleted.

45 changes: 0 additions & 45 deletions ci/build_docs_and_dist.sh

This file was deleted.

35 changes: 0 additions & 35 deletions ci/linting.sh

This file was deleted.

79 changes: 0 additions & 79 deletions ci/run_benchmark.sh

This file was deleted.

46 changes: 0 additions & 46 deletions ci/run_pytest.sh

This file was deleted.

15 changes: 15 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
Changelog
=========

What's new in IMAS-Python 2.0.1
-------------------------------

Improvements
''''''''''''

- improve DD3-->DD4 conversion (sign conversion to dodpsi_like)
- improve conversion of pulse_schedule IDS >= 3.39.0
- numpy 2 compatibility
- improve UDA data fetch
- improve documentation
- 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)
- full compatibility of tests with netCDF<1.7 (no complex numbers)


What's new in IMAS-Python 2.0.0
-------------------------------

Expand Down
8 changes: 4 additions & 4 deletions docs/source/courses/advanced/dd_versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Bundled Data Dictionary definitions

IMAS-Python comes bundled [#DDdefs]_ with many versions of the Data Dictionary definitions.
You can find out which versions are available by calling
:py:meth:`imas.dd_zip.dd_xml_versions`.
``imas.dd_zip.dd_xml_versions``.


Converting an IDS between Data Dictionary versions
Expand Down Expand Up @@ -290,6 +290,6 @@ build, you can use them like you normally would.

.. rubric:: Footnotes

.. [#DDdefs] To be more precise, the Data Dictionary definitions are generated when the
IMAS-Python package is created. See :ref:`this reference <DD background>` for more
details.
.. [#DDdefs] To be more precise, the Data Dictionary definitions are provided by the
`IMAS Data Dictionaries <http://pypi.org/project/imas-data-dictionaries/>`__
package.
17 changes: 17 additions & 0 deletions docs/source/courses/basic/analyze.rst
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,20 @@ Exercise 5
A plot of :math:`T_e` vs :math:`t`.

.. seealso:: :ref:`Lazy loading`


Explore the DBEntry and occurrences
'''''''''''''''''''''''''''''''''''

You may not know a priori which types of IDSs are available within an IMAS database entry.
It can also happen that several IDSs objects of the same type are stored within
this entry, in that case each IDS is stored as a separate `occurrence`
(occurrences are identified with an integer value, 0 being the default).

In IMAS-Python, the function :meth:`~imas.db_entry.DBEntry.list_all_occurrences()` will
help you finding which occurrences are available in a given database entry and for a given
IDS type.

The following snippet shows how to list the available IDSs in a given database entry:

.. literalinclude:: imas_snippets/explore_data_entry.py
4 changes: 2 additions & 2 deletions docs/source/courses/basic/explore.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ In this part of the training, we will learn how to use Python to explore data
saved in IDSs.


Explore which IDSs are available
--------------------------------
Explore which IDS structures are available
------------------------------------------

Most codes will touch multiple IDSs inside a single IMAS data entry. For example
a heating code using a magnetic equilibrium from the ``equilibrium`` IDS with a
Expand Down
11 changes: 11 additions & 0 deletions docs/source/courses/basic/imas_snippets/explore_data_entry.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import imas

# Open input data entry
entry = imas.DBEntry("imas:hdf5?path=<...>", "r")

# Print the list of available IDSs with their occurrence
for idsname in imas.IDSFactory().ids_names():
for occ in entry.list_all_occurrences(idsname):
print(idsname, occ)

entry.close()
4 changes: 0 additions & 4 deletions docs/source/imas_architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,7 @@ Data Dictionary building and loading
The following submodules are responsible for building the Data Dictionary and loading DD
definitions at runtime.

- :py:mod:`imas.dd_helpers` handles building the ``IDSDef.zip`` file, containing all
versions of the Data Dictionary since ``3.22.0``.

- :py:mod:`imas.dd_zip` handles loading the Data Dictionary definitions at run time.
These definitions can be loaded from an ``IDSDef.zip`` or from a custom XML file.


.. _imas_architecture/IDS_nodes:
Expand Down
Loading
Loading