Skip to content

Open dataset wrapper#99

Merged
JoelLucaAdams merged 12 commits intomainfrom
open_dataset_wrapper
Feb 7, 2026
Merged

Open dataset wrapper#99
JoelLucaAdams merged 12 commits intomainfrom
open_dataset_wrapper

Conversation

@JoelLucaAdams
Copy link
Collaborator

@JoelLucaAdams JoelLucaAdams commented Feb 3, 2026

Add a lightweight wrapper for open_dataset that simply calls xarray.open_dataset. This is so that the user only needs to import sdf_xarray and makes it slightly easier for new users to work with the code. Additionally added tests and updated docs

Some other minor improvements made in the same branch:

  • Add missing drop_variables from open_datatree
  • Docstring fixes and addition of information on variables
  • Some minor docs cleanup
  • Add padding to bottom of jupyter cell outputs to visually separate the xarray output from the following text

Resolves #92

#93 merged Wait for #93 to be merged so that the load_deck parameter can be included in the open_dataset wrapper

Copy link
Collaborator

Choose a reason for hiding this comment

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

There are a lot of duplicate tests here. Could you instead use parameterise the tests over xr and sdfxr?

Copy link
Collaborator Author

@JoelLucaAdams JoelLucaAdams Feb 4, 2026

Choose a reason for hiding this comment

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

Good point... since this would be quite a large refactor of the tests I'll do it in a separate branch. See #100

Copy link
Collaborator

@LiamPattinson LiamPattinson left a comment

Choose a reason for hiding this comment

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

If the test updates will wait for a later PR, I think this should be good.

@JoelLucaAdams JoelLucaAdams merged commit 31bb19c into main Feb 7, 2026
15 checks passed
@JoelLucaAdams JoelLucaAdams deleted the open_dataset_wrapper branch February 7, 2026 16:47
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.

Lightweight wrapper of open_dataset

2 participants