-
Notifications
You must be signed in to change notification settings - Fork 29
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
Use RosettaSciIO and adapt to their IO plugin specification architecture #651
Closed
Conversation
This file contains 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
hakonanes
added
enhancement
New feature or request
maintenance
This relates to package maintenance
labels
Aug 3, 2023
hakonanes
changed the title
Use RosettaSciIO and adapt their IO plugin specification architecture
Use RosettaSciIO and use their IO plugin specification architecture
Aug 3, 2023
hakonanes
changed the title
Use RosettaSciIO and use their IO plugin specification architecture
Use RosettaSciIO and adapt to their IO plugin specification architecture
Aug 3, 2023
hakonanes
force-pushed
the
use-rosettasciio
branch
from
November 2, 2023 14:31
9282bca
to
6babb59
Compare
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Rebased on #652. |
Main onto develop post 0.9.0
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
hakonanes
force-pushed
the
use-rosettasciio
branch
from
November 25, 2023 16:57
a662936
to
5e20d04
Compare
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
Signed-off-by: Håkon Wiik Ånes <[email protected]>
hakonanes
force-pushed
the
use-rosettasciio
branch
from
December 17, 2023 20:21
9bbebf8
to
503d67e
Compare
11 tasks
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Description of the change
This PR is a step towards supporting HyperSpy 2.0 (see #650).
kikuchipy's signals can currently be written to HyperSpy's HSPY (HDF5) file format via e.g.
EBSD.save()
. This reader is now imported from RosettaSciIO.In Rosetta, the HSPY plugin specification is moved from the implementation file (previously accessible via
hspy.file_extensions
etc.) to a separate YAML file. A new plugin look-up architecture to access these specifications have been added there. This PR adopts this architecture for our plugins, so that they (1) work with Rosetta and (2) can be ported there with little effort later on.HyperSpy's ZSPY (zarr) file format will be available like the HSPY file format is with this PR.
I hope kikuchipy v0.9 after this PR can be compatible with both HyperSpy 1.7.3 and 2.0 and use RosettaSciIO 0.1.Challenges
kikuchipy's plugin look-up is "smarter" than Rosetta's for HDF5 files in that it doesn't need a format name when several plugins use the same file extension (say, .hdf5); instead, it checks for a "footprint" in the HDF5 file. The footprint is an HDF5 dataset path, such as "EMdata/EBSD/EBSDPatterns" for EMsoft's simulated EBSD pattern file format. The correct plugin for the file is determined when checking this footprint. The plugin specification therefore differs from Rosetta's in that it requires this footprint field. I hope this "smart" look-up can be added to Rosetta when the plugins are moved there.
Another new thing in Rosetta is that
file_writer()
expects a dictionary and not a signal. How is this dictionary obtained? In HyperSpy, it is done via a privateBaseSignal._to_dictionary()
. In kikuchipy, thefile_writer()
functions are public. I'm not sure if they are used anywhere else than in kikuchipy'ssave()
methods. By requiring a dictionary instead of a signal in these functions, and not giving users an easy way to obtain this dictionary, the file writers become more difficult to use than they currently are. This must be handled correctly. Anyway, to comply with Rosetta's architecture, ourfile_writer()
functions should accept dictionaries as well. We should use these dictionaries internally instead of passing signals. For now, we should allow both signals and dictionaries, but perhaps deprecate passing signals.Progress of the PR
file_writer()
rgb_tools
from RosettaFor reviewers
__init__.py
.section in
CHANGELOG.rst
.release.py
,.zenodo.json
and.all-contributorsrc
with the table regenerated.