Repository navigation
Select main.py directly in the TOPAZ reduction dialog - #9
Merged
Merged
Conversation
The Reduction > TOPAZ action used a directory selector, which shows files greyed out and led users to believe they could not load main.py. Replace it with a file selector filtered to main.py that automatically selects main.py whenever the user enters a directory containing it. The launch behavior is unchanged: main.py is run with mantidpython from its parent directory. Closes #8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #8.
Implements EWM 19092
Reduction > TOPAZopened a directory selector (QFileDialog.getExistingDirectory). That kind of dialog shows files greyed out, so users thought they could not loadmain.py, when they were actually expected to select the folder that contains it.This PR replaces it with a file selector:
main.pyby default, with an "All files (*)" option.main.py, the file is selected automatically, so clicking Open launches it right away. This also applies to the starting folder.main.py, a warning appears and nothing is launched.DontUseNativeDialog, because only Qt's own dialog sends thedirectoryEnteredsignal that the automatic selection depends on. The other file dialogs in NeuXtalViz already do this.What happens after Open is unchanged:
main.pyis still run withmantidpython, with its folder as the working directory, and that folder is remembered for the next time the dialog opens.Testing
src/NeuXtalViz.pyin a local copy of thescd-reduction-toolsPixi environment (Mantid 7.0, PyQt6), the same way/SNS/software/scd/neuxtalviz.shlaunches it./SNS/TOPAZ/IPTS-31856/shared/ReductionGUIselectsmain.pyautomatically.mantidpythoncomes from the system Mantid installation on the analysis nodes (/bin/mantidpython) and isn't installed here.🤖 Generated with Claude Code