-
Notifications
You must be signed in to change notification settings - Fork 1
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
Integration nexus file #147
Conversation
Co-authored-by: Sarthak Kapoor <[email protected]>
Co-authored-by: Sarthak Kapoor <[email protected]> Co-authored-by: Hampus Näsström <[email protected]>
* Implement write nexus section based on the populated nomad archive * app def missing. * mapping nomad_measurement. * All concept are connected, creates nexus file and subsection. * adding links in hdf5 file. * Remove the nxs file. * back to the previous design. * Include pynxtools plugins in nomad.yaml and extend dependencies including pynxtools ans pnxtools-xrd. * PR review correction. * Remove the entry_type overwtitten. * Remove comments. * Replace __str__ function. * RUFF * Update pyproject.toml Co-authored-by: Sarthak Kapoor <[email protected]> * Update src/nomad_measurements/xrd/schema.py Co-authored-by: Sarthak Kapoor <[email protected]> * Update src/nomad_measurements/xrd/nx.py * Replace Try-block. --------- Co-authored-by: Sarthak Kapoor <[email protected]> Co-authored-by: Sarthak Kapoor <[email protected]>
Co-authored-by: Sarthak Kapoor <[email protected]> Co-authored-by: Hampus Näsström <[email protected]>
…same methods for classes with hdf5 refs
hdf5 link, parsing nexis, with error.
Reviewer's Guide by SourceryThis pull request integrates the nexus file generation into the XRD processing pipeline. It introduces functions to map NOMAD concepts to NeXus paths, populate datasets and attributes, and handle unit conversions. It also updates the Sequence diagram for NeXus file generation processsequenceDiagram
participant Archive as NOMAD Archive
participant Writer as NX Writer
participant Template as NeXus Template
participant File as NeXus File
Writer->>Template: generate_template_from_nxdl()
Writer->>Archive: populate_nx_dataset_and_attribute()
Archive-->>Writer: Return datasets and attributes
Writer->>Template: Add datasets to template
Writer->>Template: Add attributes to template
Writer->>File: Write NeXus file using template
Writer->>Archive: Update file references
Class diagram for NeXus integration componentsclassDiagram
class DatasetModel {
+data: Any
+internal_reference: Optional[bool]
+archive_path: Optional[str]
}
class Writer {
-_hdf5_datasets: dict
-_hdf5_attributes: dict
+_write_nx_file()
+_write_hdf5_file()
-_remove_nexus_annotations()
-_set_hdf5_reference()
}
class Template {
+dict data
+dict optional
}
Writer --> DatasetModel : uses
Writer --> Template : uses
note for Writer "Handles NeXus file generation"
note for DatasetModel "Stores dataset information"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @RubelMozumder - I've reviewed your changes - here's some feedback:
Overall Comments:
- Remove the outdated TODO comments in _write_nx_file() since they have been implemented
- Consider adding more specific error messages when NeXus file generation fails to help with debugging
Here's what I looked at during the review
- 🟡 General issues: 3 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
71b6952
to
19dec87
Compare
This PR replaced by #150 . |
Summary by Sourcery
Implement Nexus file generation for XRD measurements.
PR #116 handled in #118 and #147.