Repository navigation
Record the origin of experimental data and import large integers exactly - #78
Merged
Merged
Conversation
Assisted-by: Claude Opus 5.5
Assisted-by: Claude Opus 5.5
Assisted-by: Claude Opus 5.5
Assisted-by: Claude Opus 5.5
Add executable examples for source metadata persistence and remote groups, explain integer precision limits and provide French translations. Assisted-by: GPT-6.1 Sol
…rips HDF5 files restored `None` as an empty string and numbers as NumPy scalars, so a source read back from .h5sig/.h5ima files or DataLab workspaces was no longer JSON-serializable and was rejected by set_experimental_source. - Values are restricted to what HDF5 files restore exactly: None, invalid keys (non-string, empty, with "/" or reserved by guidata) and integers beyond 64 bits are rejected; NumPy scalars and tuples are converted. - Signals and images restore the Python types of the entry once deserialized; get_experimental_source also normalizes them. Assisted-by: Claude Opus 5.5
The CI quality gate (`python -m pylint sigima`) failed on the experimental source module: too many return statements in `_normalize`, and exact type checks flagged as unidiomatic. - Move scalar normalization to `_normalize_scalar`. - Check the version with `isinstance`, still rejecting `True` (a `bool` is an `int`), and test it. - Keep the exact `str` key check in tests (it rejects `numpy.str_`), with a local justification. Assisted-by: Claude Opus 5.5
Assisted-by: Claude Opus 5.5
DataLab servers before 1.4 do not return the UUID of the created group. Assisted-by: Claude Opus 5.5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #77.
First of three companion PRs for experimental data integration; merge it first:
Changes
sigima/objects/source.py): versioned, JSON-onlyexperimental_sourcemetadata entry withmake_experimental_source,set_experimental_sourceandget_experimental_source. Values are restricted to what HDF5 files restore exactly, and NumPy scalars restored by.h5sig/.h5imafiles and DataLab workspaces are normalized back to Python types.sigima/io/common/converters.py): out-of-range integers are converted to the smallest floating-point type representing every value exactly; aUserWarningis emitted beyond 2⁵³.add_groupreturns the UUID of the created group (str | None,Nonewith DataLab < 1.4).Validation
converters_unit_test.py,experimental_source_unit_test.pyand client tests: 51 passed.