Skip to content

server side nc reads#600

Closed
lazarusA wants to merge 10 commits intomainfrom
la/nc_reads
Closed

server side nc reads#600
lazarusA wants to merge 10 commits intomainfrom
la/nc_reads

Conversation

@lazarusA
Copy link
Member

This PR keeps current functionality to load netcdf

but more importantly it adds a path to load nc files when provided from a server.

With this changes now the following are possible in the command line

using Browzarr
browzarr(; store="https://.....") # already working

[new]

using Browzarr
browzarr(; store="/u/Docs/output.nc") # with this change

@TheJeran please comment on src/utils/loadNetCDF.ts current location and name.

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the application's data ingestion capabilities by enabling the direct loading of NetCDF files from server-side paths. It streamlines the process of handling NetCDF data by consolidating the loading mechanism into a dedicated utility, making the application more versatile in how it accesses and processes scientific datasets. The changes also include updates to the global state to better manage the visibility of variable selection components.

Highlights

  • Server-Side NetCDF Loading: Introduced the capability to load NetCDF files directly from a server path, expanding data source options beyond local files and Zarr stores.
  • NetCDF Loading Refactoring: Extracted the core NetCDF file loading logic into a new reusable utility function, loadNetCDF, improving modularity and maintainability.
  • Global State Management Update: Added a new openVariables state and its setter to the global store, centralizing the management of UI visibility for variables.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new feature to load NetCDF files from a server-side path, which is a great addition. The code is well-structured, especially with the extraction of loadNetCDF into a utility function and centralizing the openVariables state in the global store.

My review includes a few suggestions to improve error handling and robustness, which are critical for asynchronous operations like file fetching and parsing. Specifically, I've pointed out a couple of places where unhandled promise rejections could occur and suggested using try...catch blocks. I've also included some minor improvements for code clarity and performance.

Copy link
Collaborator

@TheJeran TheJeran left a comment

Choose a reason for hiding this comment

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

With the new variables globals, I find the logic easier to just load them directly in components without having to trace what is being passed where.

@lazarusA
Copy link
Member Author

let's do follow-up PR for cleanup. There are several places where this needs to be taken care of, with care.

@lazarusA lazarusA enabled auto-merge (squash) March 19, 2026 12:49
@lazarusA lazarusA disabled auto-merge March 19, 2026 12:50
@TheJeran
Copy link
Collaborator

I have been thinking about rules and practices over the last few days for implementing across the entire code base. So this can be something that gets taken care of then

Copy link
Collaborator

@TheJeran TheJeran left a comment

Choose a reason for hiding this comment

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

Global variables are now imported instead of passed

@TheJeran
Copy link
Collaborator

omg why is it so difficult to just undo last commit

@TheJeran TheJeran mentioned this pull request Mar 19, 2026
@TheJeran
Copy link
Collaborator

Changes were pushed with #603

@TheJeran TheJeran closed this Mar 19, 2026
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.

2 participants