Handle spaces in multiple file property#40767
Draft
samtygier-stfc wants to merge 4 commits intomainfrom
Draft
Conversation
If the filename list comes back empty, give a useful assertion failure before segfaulting
a13695d to
46670c3
Compare
Contributor
Author
|
There are a few test failures. This will need to handle cases like: |
This was referenced Feb 2, 2026
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.
Description of work
DO NOT MERGE yet, still has debugging code
This changes the regular expression used to separate groups of filenames to be more robust against spaces after commas.
It results in
POLARIS146554, 146603-146609, 146616being treated the same asPOLARIS146554,146603-146609,146616. This is a change from the current behaviour which would treat it asPOLARIS146554, XXX146603-146609, XXX146616whereXXXis the current default instrument.The previous regex used to find the commas that separate groups of files from separate instruments:
NUM_COMMA_ALPHA(R"((?<=\d)\s*,\s*(?=\D))")uses a lookahead with
\Dto find a comma followed by something that did not start with a digit. E.g. this would match the comma in,ALF123but not,123. The bug is that it also matches, 123because the space is a non-digit character. Because we now have a group with a filename that starts with a number, the default instrument is assumed.This fix replaces
\Dwith[a-zA-Z]so that a new group is only started if there is a new instrument name.Related to #40648
Closes #40793
To test:
Reviewer
Your comments will be used as part of the gatekeeper process. Comment clearly on what you have checked and tested during your review. Provide an audit trail for any changes requested.
As per the review guidelines:
mantid-developersormantid-contributorsteams, add a review commentrerun cito authorize/rerun the CIGatekeeper
As per the gatekeeping guidelines: