Beginning update reproin.py to deal with ses-X* instances#592
Draft
Michael-Sun wants to merge 2 commits into
Draft
Beginning update reproin.py to deal with ses-X* instances#592Michael-Sun wants to merge 2 commits into
Michael-Sun wants to merge 2 commits into
Conversation
yarikoptic
reviewed
Sep 23, 2022
| - "WIP " prefix unconditionally added by the scanner is stripped | ||
|
|
||
|
|
||
| -Michael-Sun Plans on adding a heuristic to deal with ses-X* instances |
Member
There was a problem hiding this comment.
add above , where _ses- marker described, description that XXX markers are dealt in some other way.
Author
|
Made some edits to do some default behavior if it sees and X* or x* |
yarikoptic
reviewed
Feb 17, 2023
| if prior_sessions: | ||
| session = '%03d' % (len(prior_sessions) + 1) | ||
| else: | ||
| session='001' |
Member
There was a problem hiding this comment.
I don't think we should hardcode to %03d since intention on formatting might have been different etc.
- do not just take the length of
prior_sessionsbut- extract labels (what comes after
ses-), see what length they have. if non-uniform (1,...,12) - use plain'%d'. If uniform - usef'%0{len(ses_labels[0])}d'` - do not base on
len(prior_sessions)but convert all session labels intoint. If errors - errors. Take max of those ints, so smth likemax(map(int, ses_labels))
- extract labels (what comes after
- make this logic into a function
get_next_xxx_session(prior_session_dirs: list[str]), for which also add unittests for it
yarikoptic
reviewed
Feb 17, 2023
| "Should have got a single session marker. Got following: %s" | ||
| % ', '.join(map(repr, ses_markers)) | ||
| ) | ||
| if re.match("(X|x)*", ses_markers): |
Member
There was a problem hiding this comment.
Suggested change
| if re.match("(X|x)*", ses_markers): | |
| if re.match("XX+$", ses_markers) or re.match("xx+$", ses_markers): |
to
- ensure consistent
xxxorXXXand notXxX - require at least 2 of those xs
- no other symbol there (anchor)
yarikoptic
requested changes
Feb 17, 2023
yarikoptic
left a comment
Member
There was a problem hiding this comment.
left comments on how to proceed. Will move to draft mode. Please undraft when you consider it ready and ping me
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.
No description provided.