Conversation
…IMASPy-get_sample
In preparation for validating the NC data
…IMASPy-get_sample
Feature not yet implemented, see IMAS-5593
Merge in IMAS/imaspy from feature/refactor-nc2ids to develop * commit 'd59fcabc29d5691004649bcf48016255010d7fa7': Add missing docstring Make the NC2IDS reader class-based
Ensure lazy contexts belonging to a different IDS are always closed. See IMAS-5603 for more details.
…has no effect on the `ids.time` vector. See also https://git.iter.org/projects/IMAS/repos/al-matlab/pull-requests/29/overview?commentId=48957
… same HDF5 DBEntry Merge in IMAS/imaspy from bugfix/IMAS-5603 to develop * commit 'e5246464d588069af3f0f25e5a0e00d41d7fd4ef': Fix a bug with lazy loading multiple IDSs from the same HDF5 DBEntry
Also fix a couple of bugs when opening invalid netCDF files and raise a proper exception.
Merge in IMAS/imaspy from feature/IMAS-3885-IMASPy-get_sample to develop * commit 'afb8c292c6527f03354ac35fa43dfaebd8fb4ef3': Update `get_sample` docstring to clarify that the interpolation mode has no effect on the `ids.time` vector. Disable MDSplus backend tests for get_sample Set `begin_timerange_action` as available since AL core 5.4 Update NCDBEntryImpl for get_sample and raise NotImplementedError Update tests for DD 4.0.0 Add docstrings for GetSliceParameters / GetSampleParameters Implement `DBEntry.get_sample` in IMASPy
Merge in IMAS/imaspy from feature/cli_validate_nc to develop * commit 'fc2cbf20b3cf1c549761214109d3d89b4ee34091': Additional documentation for the `imaspy validate_nc` command line tool Add unit tests for `nc_validate.py` Close netCDF datasets when an exception is raised Fix incorrect exception when using mode="x" for netCDF files Add `validate_nc` command to imaspy CLI
|
Looks good! Some small things people may run into:
|
|
Just enabled ITER CI for IMAS-Python GitHub Repo. I found following warnings in sphinx doc generation What's new in IMAS-Python 1.2.0
--------------------------
/opt/bamboo-agent-home/xml-data/build-dir/IC-IG4-BDD/docs/source/changelog.rst:12: WARNING: py:func reference target not found: imaspy.DBEntry.get_sample
/opt/bamboo-agent-home/xml-data/build-dir/IC-IG4-BDD/docs/source/generated/imas.backends.imas_core.al_context.LazyALArrayStructChildContext.rst:30:<autosummary>:1: WARNING: py:obj reference target not found: imas.backends.imas_core.al_context.LazyALArrayStructChildContext.get_child
/opt/bamboo-agent-home/xml-data/build-dir/IC-IG4-BDD/docs/source/generated/imas.backends.imas_core.al_context.LazyALArrayStructContext.rst:31:<autosummary>:1: WARNING: py:obj reference target not found: imas.backends.imas_core.al_context.LazyALArrayStructContext.get_child
/opt/bamboo-agent-home/xml-data/build-dir/IC-IG4-BDD/docs/source/generated/imas.backends.imas_core.al_context.LazyALContext.rst:30:<autosummary>:1: WARNING: py:obj reference target not found: imas.backends.imas_core.al_context.LazyALContext.get_child
/opt/bamboo-agent-home/xml-data/build-dir/IC-IG4-BDD/docs/source/generated/imas.backends.netcdf.ids2nc.IDS2NC.rst:33:<autosummary>:1: WARNING: py:obj reference target not found: imas.backends.netcdf.ids2nc.IDS2NC.tensorize
/opt/bamboo-agent-home/xml-data/build-dir/IC-IG4-BDD/docs/source/generated/imas.backends.netcdf.ids_tensorizer.IDSTensorizer.rst:29:<autosummary>:1: WARNING: py:obj reference target not found: imas.backends.netcdf.ids_tensorizer.IDSTensorizer.tensorize
/opt/bamboo-agent-home/xml-data/build-dir/IC-IG4-BDD/docs/source/generated/imas.backends.netcdf.nc2ids.LazyArrayStructContext.rst:22:<autosummary>:1: WARNING: py:obj reference target not found: imas.backends.netcdf.nc2ids.LazyArrayStructContext.get_child
/opt/bamboo-agent-home/xml-data/build-dir/IC-IG4-BDD/docs/source/generated/imas.backends.netcdf.nc2ids.LazyArrayStructContext.rst:22:<autosummary>:1: WARNING: py:obj reference target not found: imas.backends.netcdf.nc2ids.LazyArrayStructContext.get_context
/opt/bamboo-agent-home/xml-data/build-dir/IC-IG4-BDD/docs/source/generated/imas.backends.netcdf.nc2ids.LazyArrayStructContext.rst:22:<autosummary>:1: WARNING: py:obj reference target not found: imas.backends.netcdf.nc2ids.LazyArrayStructContext.iterate_to_index
/opt/bamboo-agent-home/xml-data/build-dir/IC-IG4-BDD/docs/source/generated/imas.backends.netcdf.nc2ids.LazyContext.rst:20:<autosummary>:1: WARNING: py:obj reference target not found: imas.backends.netcdf.nc2ids.LazyContext.get_child
make: *** [Makefile:23: html] Error 1 |
|
---> ensure all tests pass on bamboo (w.r.t imas-core) passed |
|
----> check if documentation builds successfully (i.e. without errors/warnings) |
|
------> check if version of built package is set correctly |
Co-authored-by: Maarten Sebregts <110895564+maarten-ic@users.noreply.github.com>
Co-authored-by: Maarten Sebregts <110895564+maarten-ic@users.noreply.github.com>
I'm updating the 5 min intro, few other stuff to modify w.r.t DD4. now complains about scalar to array conversion (while I could have assign --> expected? |
Mmm, yes, that was changed a while ago indeed. IMAS-Python prints an INFO statement and numpy does give a warning (once) when assigning a complex array to a FLT_1D: >>> cp.time = [1-1j]
08:26:46 INFO Assigning incorrect type 'complex128' to <IDSNumericArray (IDS:core_profiles, time, empty FLT_1D)>, attempting automatic conversion. @ids_primitive.py:483
/home/maarten/projects/iter-python/imaspy_12/imaspy/ids_primitive.py:484: ComplexWarning: Casting complex values to real discards the imaginary part
value = np.asarray(
>>> cp.time
<IDSNumericArray (IDS:core_profiles, time, FLT_1D)>
numpy.ndarray([1.])
>>> cp.time = [1-1j]
08:27:03 INFO Assigning incorrect type 'complex128' to <IDSNumericArray (IDS:core_profiles, time, FLT_1D)>
numpy.ndarray([1.]), attempting automatic conversion. @ids_primitive.py:483I think this behavior is fine. |
maarten-ic
left a comment
There was a problem hiding this comment.
One minor comment, nothing else from my side at this moment.
Co-authored-by: Maarten Sebregts <110895564+maarten-ic@users.noreply.github.com>
It's time to prepare the next release (first one after renaming hence the bump in major version).
Todo
mainimas-core)