Skip to content

Support one-file open_dataset#1479

Open
rajeeja wants to merge 11 commits into
mainfrom
rajeeja/onefile_open_dataset
Open

Support one-file open_dataset#1479
rajeeja wants to merge 11 commits into
mainfrom
rajeeja/onefile_open_dataset

Conversation

@rajeeja

@rajeeja rajeeja commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Closes #345 by allowing ux.open_dataset(file) for combined grid-and-data files.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds support for opening combined grid-and-data files via a single-argument ux.open_dataset(file) call, aligning with Issue #345’s request to handle datasets stored in one file.

Changes:

  • Made filename_or_obj optional in uxarray.core.api.open_dataset, defaulting to the grid file path when omitted.
  • Updated open_dataset docstring to document and exemplify the one-file usage.
  • Added a unit test covering the new one-argument open_dataset behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
uxarray/core/api.py Makes filename_or_obj optional and adds logic/docs for single-file grid+data opening.
test/core/test_api.py Adds a regression test for calling ux.open_dataset() with a single argument.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread uxarray/core/api.py
Comment thread uxarray/core/api.py
Comment thread test/core/test_api.py Outdated
@rajeeja rajeeja marked this pull request as ready for review April 1, 2026 20:44

@erogluorhan erogluorhan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks a lot for taking this one. Please find my comments below

Comment thread uxarray/core/api.py Outdated
Comment thread uxarray/core/api.py
Comment thread uxarray/core/api.py Outdated
Comment thread uxarray/core/api.py
Comment thread uxarray/core/api.py
Comment thread uxarray/core/api.py
Comment thread test/core/test_api.py
@rajeeja rajeeja requested a review from erogluorhan April 7, 2026 19:13
@rajeeja rajeeja force-pushed the rajeeja/onefile_open_dataset branch 2 times, most recently from cc35e13 to d65e10c Compare June 8, 2026 20:47
@rajeeja rajeeja force-pushed the rajeeja/onefile_open_dataset branch from d65e10c to 2dd95de Compare June 15, 2026 21:27
@rajeeja rajeeja moved this to 👀 In review in UXarray Development Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

Investigate allowing the construction of UxDataset from a single grid & data file

4 participants