Skip to content
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

Add API to attach hdf5 attributes to datasets #1997

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thomasfire
Copy link
Contributor

ARTIQ Pull Request

Description of Changes

Related Issue

Closes #1691
Closes #1978

Type of Changes

Type
✨ New feature

Steps (Choose relevant, delete irrelevant before submitting)

All Pull Requests

  • Use correct spelling and grammar.
  • Update RELEASE_NOTES.rst if there are noteworthy changes, especially if there are changes to existing APIs.
  • Close/update issues.
  • Check the copyright situation of your changes and sign off your patches (git commit --signoff, see copyright).

Code Changes

  • Run flake8 to check code style (follow PEP-8 style). flake8 has issues with parsing Migen/gateware code, ignore as necessary.
  • Test your changes or have someone test them. Mention what was tested and how.
  • Add and check docstrings and comments
  • Check, test, and update the unittests in /artiq/test/ or gateware simulations in /artiq/gateware/test

Documentation Changes

  • Check, test, and update the documentation in doc/. Build documentation (cd doc/manual/; make html) to ensure no errors.

Tests

ARTIQ_ROOT=./ python -m unittest  artiq.test.test_hdf5_attributes

Licensing

See copyright & licensing for more info.
ARTIQ files that do not contain a license header are copyrighted by M-Labs Limited and are licensed under LGPLv3+.

Copy link
Member

@sbourdeauducq sbourdeauducq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs major cleanup

@thomasfire thomasfire force-pushed the 1978-hdf5-attrs branch 3 times, most recently from bcb79e9 to 1685f50 Compare December 2, 2022 08:33
RELEASE_NOTES.rst Outdated Show resolved Hide resolved
Cleanup grammar, styles and code

Signed-off-by: Egor Savkin <[email protected]>

Revise metadata logic

Raise on absent keys, raise on wrong types, do not allow metadata on dataset itself. Make tests more real-world-like.

Signed-off-by: Egor Savkin <[email protected]>

Add HDF5 metadata unit tests

Signed-off-by: Egor Savkin <[email protected]>

Add HDF5 attributes support to release notes

Signed-off-by: yuk <[email protected]>

hdf5: Warn when attaching metadata to absent key

Signed-off-by: yuk <[email protected]>

hdf5: Add demo for saving attributes

Signed-off-by: yuk <[email protected]>

hdf5: Allow saving custom attributes

Signed-off-by: yuk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

save custom attributes in archived h5py data files
3 participants