-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fix updater for hdf5 files with custom data, and add hdf5 files to automatic updater testing #1200
Conversation
b2b2fcf
to
851f5e7
Compare
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.
just a couple minor comments but looks good otherwise, thanks
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
|
|||
### Fixed | |||
- Properly handle `.freqs` in `output_monitors` of adjoint plugin. | |||
- Simulation updater for `.hdf5` files with custom data. |
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.
custom source more specifically? I thought the existing one seemed to work with custom medium?
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.
I only tried custom source and custom medium and yeah for some reason custom medium seemed fine. However I haven't tried other custom data, so not sure. Also not sure if there's a way to create the custom medium in which it will error (e.g. passing an xarray object as opposed to one of our inherited ones?) So maybe safer to leave as is?
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.
sure sounds good
tests/test_components/test_IO.py
Outdated
@@ -187,7 +192,10 @@ def test_validation_speed(tmp_path): | |||
@pytest.mark.parametrize("sim_file", SIM_FILES) | |||
def test_simulation_updater(sim_file): | |||
"""Test that all simulations in ``SIM_DIR`` can be updated to current version and loaded.""" | |||
sim_updated = td.Simulation.from_file(sim_file) | |||
if sim_file[-2:] == "h5": |
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.
we could also consider just changing from_file
to handle .h5
by adding it here:
https://github.com/flexcompute/tidy3d/blob/develop/tidy3d/components/base.py#L223-L228
probably better while we're at it.
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.
Updated, have a quick look?
…tomatic updater testing
851f5e7
to
f400a43
Compare
No description provided.