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

Test and documentation for save/load of external Sidre views. #1474

Merged
merged 10 commits into from
Nov 18, 2024

Conversation

nselliott
Copy link
Contributor

Summary

  • This PR is an addition of a test and documentation of the relevant feature.
  • It does the following (modify list as needed):
    • Restores a test for serial save/load of Sidre views with external data. A broken test was present in the code in an #if 0 block. Here this test is fixed to do the right thing and includes a section to be used as a snippet in the sphinx docs.
    • Add sphinx documentation of the process required to save and load external views in a way that restores the external state that was saved.

Based on recent conversations I realized that the process to save and load views with external data lacked sufficient documentation, and had no active test code for the serial case (i.e. not using SPIO). The process takes three steps and is not obvious. I found the inactive test code and revised it so that it works, and added an explanation to the sphinx docs.

@nselliott nselliott added Sidre Issues related to Axom's 'sidre' component Testing Issues related to testing Axom Documentation Issues related to documentation labels Nov 15, 2024
Copy link

@Arlie-Capps Arlie-Capps left a comment

Choose a reason for hiding this comment

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

Thank you, Noah!

@@ -50,7 +50,23 @@ which omits error-checking and recovery for brevity and clarity.
The ``loadExternalData()`` method is used to read "external" data from an HDF5
file created with the ``sidre_hdf5`` protocol. This is data referred to by
*external* views. Such views refer to data that is not stored in Sidre buffers
Copy link
Member

Choose a reason for hiding this comment

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

Wasnt from the PR but there is two differing ways to highlight "external" here... italicized and quoted.

Copy link
Member

@white238 white238 left a comment

Choose a reason for hiding this comment

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

Thanks for clarifying this @nselliott and more so helping me out the last couple days!

but it will *not* allocate storage or load data values for the views with
external data. Second, the calling code must provide each external ``View``
a pointer to valid storage that will hold the external data, using
``setExternalDataPtr()``. Finally, ``loadExternalData()`` is called,
Copy link
Member

Choose a reason for hiding this comment

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

Should a comment be added about describing the external data?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no step needed to describe the external data when loading, as the first load() call restores the descriptions that were saved. I mention that here, but I could try to change the wording?

Copy link
Member

Choose a reason for hiding this comment

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

I must have missed it. It may be good to emphasize the point in bold or similar so readers catch it.

@nselliott nselliott merged commit 719b710 into develop Nov 18, 2024
13 checks passed
@nselliott nselliott deleted the feature/nselliott/external-saveload branch November 18, 2024 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Issues related to documentation Sidre Issues related to Axom's 'sidre' component Testing Issues related to testing Axom
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants