Repository navigation
Migrate scripts from using os.path to using Pathlib - #22
Merged
Merged
Conversation
Replace os.path with Path from pathlib
Replace os.path with Path from pathlib
Replace os.path with Path from pathlib
Remove unused import
Replace os.path with Path from pathlib
tim-fry
marked this pull request as ready for review
February 6, 2020 15:44
paulromano
requested changes
Feb 6, 2020
paulromano
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the changes @tim-fry! Other than the suggested uses of f-strings below, this looks good to me.
Use f-strings for comments Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
Use f-strings for comments Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
Use f-strings for comments Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
Use f-strings for comments Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
Use f-strings for comments Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
Use f-strings for comments Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
Use f-strings for comments Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
Contributor
Author
|
Hi Paul, thanks for the pointers. I've committed those changes as requested. |
Contributor
Contributor
Author
|
No problem Paul (I wasn't sure from the message where the merge needed to occur). Leave it with me. |
Remove new instances of os.path from convert_tendl.py
paulromano
approved these changes
Feb 11, 2020
paulromano
left a comment
Contributor
There was a problem hiding this comment.
Looks good; thanks @tim-fry! Nice to have the pathlib goodness throughout.
Member
|
congrats @tim-fry this contribution is very much appreciated |
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.
This pull request fix #17:
I've removed use of os.path from the following 5x convert/generate scripts:
This includes replacing the use of the glob module for file searching with the Path.glob function.
Testing was performed by running the original and modified scripts and performing the following checks:
Where the generate_* scripts take considerable time running njoy to process the downloaded data, these scripts were testing using specially created subsets of the downloaded data designed to test the different parts of the script. For the generate_cendl.py script this included the files which require file specific fixes.