Skip to content

Add functionality required for the GUI - #120

Merged
AnthonyLim23 merged 8 commits into
mainfrom
119-gui-data
Oct 9, 2026
Merged

AnthonyLim23 merged 8 commits into
mainfrom
119-gui-data

Conversation

@alexhroom

@alexhroom alexhroom commented Sep 16, 2026 •

Copy link
Copy Markdown
Collaborator

This PR adds some extra functionality that was needed for the GUI:

  • Access to checking whether the cache is valid
  • Getting the full list of log names
  • Getting the list of filter time intervals (for drawing green boxes on the GUI)
  • Getting the filters in some readable (JSON) format for updating tables
  • Clearing all filters.

Also fixes a bug where NexusData.get_frame_times() returned the frame start times as 32-bit integers, which is not big enough for the data and was causing issues with time filter bounds.

Fixes #119

@alexhroom alexhroom changed the title Add data access required for the GUI Add functionality required for the GUI Sep 16, 2026
@alexhroom alexhroom added the feature New feature or request label Sep 21, 2026
@github-actions github-actions Bot added the Has Conflicts This PR has a merge conflict. label Sep 21, 2026
@github-actions

Copy link
Copy Markdown

👋 Hi, @alexhroom,

Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@github-actions github-actions Bot removed the Has Conflicts This PR has a merge conflict. label Sep 21, 2026
@alexhroom
alexhroom added this pull request to stack #127 September 24, 2026 11:54
@alexhroom alexhroom added this to the Needed for GUI milestone Sep 29, 2026
@alexhroom
alexhroom force-pushed the 119-gui-data branch 2 times, most recently from 2f8e7fa to e16950f Compare October 1, 2026 15:30
Comment thread src/batch/interface.rs
@github-actions github-actions Bot added the Has Conflicts This PR has a merge conflict. label Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

👋 Hi, @alexhroom,

Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@github-actions github-actions Bot removed the Has Conflicts This PR has a merge conflict. label Oct 2, 2026

@AnthonyLim23 AnthonyLim23 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think its better testing this in the GUI. However, I wonder if it would might make more sense to add some of this code to the GUI repo, then users wont get it as part of the backend. I am only thinking this because if you picked the GUI to install you are unlikely to run the Python directly and the code is very GUI specific.

@alexhroom

alexhroom commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator Author

@AnthonyLim23 I disagree:

  • clear_filters is something users may well want to do in the API
  • _dict is fair enough, but it needs to be written in Rust as it is accessing parts of the code that aren't accessible from the Python. same for data_changed and getting sample_log_times. So if we wanted to add these to the GUI repo we'd need to:
    • upload MNeuEventLib to crates.io as a pure Rust crate;
    • create an MNeuEventGUI Rust extension which takes MNeuEventLib as a cargo dependency;
    • add these features to the Rust extension.
      which I actually think is more complicated than just having them be here.
  • finally, _get_filter_times actually needs to be used by the backend to implement the functionality added in Intersect log weights for different logs #121 (hence why that one is stacked on top of this one) so if we re-implemented it in the GUI we would just be duplicating code.

@AnthonyLim23

Copy link
Copy Markdown
Collaborator

That all make sense to me. I didn't appreciate the extra effort needed with the crate for what is a small change.

@alexhroom

Copy link
Copy Markdown
Collaborator Author

@AnthonyLim23 the 'lower effort' alternative to that crate stuff would be if we exposed all the internal data and methods of the code to the Python API, and implemented these methods in Python in the GUI repository. which a.) doesn't fix our problem because we would still have a load of GUI-specific attribute code, and b.) makes the GUI slower because it's doing all this in Python instead of Rust.

@AnthonyLim23
AnthonyLim23 merged commit 3f99a06 into main Oct 9, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Data that needs to be accessible for the GUI to work

2 participants