-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Fixing file path suffix #14179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing file path suffix #14179
Conversation
99a4395 to
09b6294
Compare
09b6294 to
2a61fa9
Compare
| return | ||
| for suffix in suffices: | ||
| file_path = path.with_suffix(suffix) | ||
| file_path = Path(str(path) + suffix) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use this code to keep it compatible with both pathlib.Path and msc.Path (for object storage path)?
file_path = path.with_name(path.name + suffix)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you!
Signed-off-by: Gautham Kollu <[email protected]>
1cf42c3 to
999c0fd
Compare
|
[🤖]: Hi @gautham-kollu 👋, We wanted to let you know that a CICD pipeline for this PR just finished successfully. So it might be time to merge this PR or get some approvals. |
Signed-off-by: Gautham Kollu <[email protected]> Co-authored-by: Charlie Truong <[email protected]> Signed-off-by: Amir Hussein <[email protected]>
Signed-off-by: Gautham Kollu <[email protected]> Co-authored-by: Charlie Truong <[email protected]>
Signed-off-by: Gautham Kollu <[email protected]> Co-authored-by: Charlie Truong <[email protected]> Signed-off-by: Amir Hussein <[email protected]>
Signed-off-by: Gautham Kollu <[email protected]> Co-authored-by: Charlie Truong <[email protected]> Signed-off-by: Amir Hussein <[email protected]>
Signed-off-by: Gautham Kollu <[email protected]> Co-authored-by: Charlie Truong <[email protected]>
Signed-off-by: Gautham Kollu <[email protected]> Co-authored-by: Charlie Truong <[email protected]> Signed-off-by: Guyue Huang <[email protected]>
Important
The
Update branchbutton must only be pressed in very rare occassions.An outdated branch is never blocking the merge of a PR.
Please reach out to the automation team before pressing that button.
What does this PR do ?
Reverting the new behavior introduced in #14103 for appending suffix.
If the name of path is "/dir1/file1.ext1", the
with_suffix('ext2')API replaces both ext1 with ext2 instead of appending which was the previous behavior.Collection: [Note which collection this PR will affect]
Changelog
Usage
# Add a code snippet demonstrating how to use thisGitHub Actions CI
The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.
The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
To re-run CI remove and add the label again.
To run CI on an untrusted fork, a NeMo user with write access must first click "Approve and run".
Before your PR is "Ready for review"
Pre checks:
PR Type:
If you haven't finished some of the above items you can still open "Draft" PR.
Who can review?
Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.
Additional Information