Skip to content

frontend focused load raw scan from a folder#57

Merged
KyleQianliMa merged 14 commits intonextfrom
load_frontend
Feb 12, 2026
Merged

frontend focused load raw scan from a folder#57
KyleQianliMa merged 14 commits intonextfrom
load_frontend

Conversation

@KyleQianliMa
Copy link
Member

@KyleQianliMa KyleQianliMa commented Feb 3, 2026

Short description of the changes:

This PR sets up the front end view widgets and a pop up window called "Select a folder" to load tavi data from a folder.
image

Manual test for the reviewer

To test, click on "File" -> "Load Folder", select any random folder click "choose". The pop up window should close, console should print "folder directory received...." and "sent to worker!". This means the MVP connect is set up correctly and that the connected load function was sent to different thread than main GUI.

@codecov-commenter
Copy link

codecov-commenter commented Feb 3, 2026

Codecov Report

❌ Patch coverage is 98.24561% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 85.61%. Comparing base (502f0ab) to head (ebdbdba).

Files with missing lines Patch % Lines
src/tavi/frontend/view/load_raw_scan_view.py 98.18% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next      #57      +/-   ##
==========================================
+ Coverage   82.51%   85.61%   +3.10%     
==========================================
  Files           6        7       +1     
  Lines         223      278      +55     
==========================================
+ Hits          184      238      +54     
- Misses         39       40       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

event_type = type(event)
if callable_list := self.registry.get(event_type):
for callable in callable_list:
callable(event)
Copy link
Contributor

Choose a reason for hiding this comment

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

Like I was saying at status, there are a couple more features outlined in the EventBroker ticket that the prototype did not implement. You can view my additions here. I still need to write tests for it.

Seeing as the event broker is to be implemented in a different ticket, could you mark this as a stub implementation? I dont see any unit tests written for this explicitly, which is fine, that will be added as part of the event broker ticket.

@walshmm
Copy link
Contributor

walshmm commented Feb 5, 2026

We may need to update the pr template to include a link to the ticket the work is associated with.

@walshmm
Copy link
Contributor

walshmm commented Feb 5, 2026

Functional Review No. 1

Review according to the Acceptance Criteria in the story:

Implement the design outlined in the diagrams below

  • When TAVI starts there is a tool bar with a File menu
  • When the File menu is clicked/hovered over it reveals the option to Load Experiment Data
image

The text in the File Menu of the tool bar needs to be updated to match the requirements. Please refer to Balsamiq

  • When Load Experiment Data is clicked, TAVI opens a file explorer to prompt the user for the experiment data path.
image

I clicked "Load Folder" assuming that is the menu option that needs to be renamed.

  • When a path is selected, pop up a LoadScans mvp populated with the files found in the path
image

This did not occur. The AC in the DOORS page is a little more explicit as to what this means, though Im not sure this is captured in Balsamiq, maybe reach out to John/Andrei for clarification. I understand that the backend isnt implemented but there should be a stubbed implementation to show off this feature

  • When the acknowledged/accepted, it asks the model to ask the library to load the new files into the tavi project

Inspecting the code I can confirm that the qdialogue output is actually sent to the model

@KyleQianliMa
Copy link
Member Author

Functional Review No. 1

Review according to the Acceptance Criteria in the story:

Implement the design outlined in the diagrams below

  • When TAVI starts there is a tool bar with a File menu
  • When the File menu is clicked/hovered over it reveals the option to Load Experiment Data
image ❌ **The text in the File Menu of the tool bar needs to be updated to match the requirements. Please refer to [Balsamiq](https://balsamiq.cloud/sd2jtfw/puzlyom/r9D9E)**
  • When Load Experiment Data is clicked, TAVI opens a file explorer to prompt the user for the experiment data path.
image I clicked "Load Folder" assuming that is the menu option that needs to be renamed.
  • When a path is selected, pop up a LoadScans mvp populated with the files found in the path
image ❌ **This did not occur. The AC in the [DOORS page](https://ornlrse.clm.ibmcloud.com/rm/web#action=com.ibm.rdm.web.pages.showArtifactPage&artifactURI=https%3A%2F%2Fornlrse.clm.ibmcloud.com%2Frm%2Fresources%2FTX_fAkpEL8cEfC-6YvagNO_iw&componentURI=https%3A%2F%2Fornlrse.clm.ibmcloud.com%2Frm%2Frm-projects%2F_DADVIOHJEeyU5_2AJWnXOQ%2Fcomponents%2F_DEP4oOHJEeyU5_2AJWnXOQ&vvc.configuration=https%3A%2F%2Fornlrse.clm.ibmcloud.com%2Frm%2Fcm%2Fstream%2F_DEcs8OHJEeyU5_2AJWnXOQ) is a little more explicit as to what this means, though Im not sure this is captured in Balsamiq, maybe reach out to John/Andrei for clarification. I understand that the backend isnt implemented but there should be a stubbed implementation to show off this feature**
  • When the acknowledged/accepted, it asks the model to ask the library to load the new files into the tavi project

Inspecting the code I can confirm that the qdialogue output is actually sent to the model

For returning the filenames, I feel the original story should probably push this to be part of backend epic story. As we need to determine how do we want to organize the data, IPTS->exp->data or exp->IPTS->data. Maybe we can even start with facility as ORNL. These probably worth a chat with CIS.

@walshmm
Copy link
Contributor

walshmm commented Feb 6, 2026

For returning the filenames, I feel the original story should probably push this to be part of backend epic story. As we need to determine how do we want to organize the data, IPTS->exp->data or exp->IPTS->data. Maybe we can even start with facility as ORNL. These probably worth a chat with CIS.

There still needs to be a pop up that says which files youre about to attmept to load, at least that's what I interpret from the acceptance criteria. I did not see an empty version of that.



@Singleton
class TaviProject(TaviProjectInterface):
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should generally add a suffix to denote the kind of object it is.
Not gonna hold up merging over it, but I would like to name this TaviProjectModel for example.

@walshmm
Copy link
Contributor

walshmm commented Feb 12, 2026

Function Review 2

In light of the conversation on slack with John and Andrei, the AC has been adjusted.

  • When the File menu is clicked/hovered over it reveals the option to Load Experiment Data
image
  • When a path is selected, pop up a LoadScans mvp populated with the files found in the path

✔️ Passes my function review

@walshmm
Copy link
Contributor

walshmm commented Feb 12, 2026

Feel free to merge when ready.

@KyleQianliMa KyleQianliMa merged commit 606460a into next Feb 12, 2026
7 checks passed
@KyleQianliMa KyleQianliMa deleted the load_frontend branch February 12, 2026 20:18
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.

3 participants