refactor: replaced 'os.path.join()' uses with 'pathlib.Path' / syntax#1637
Open
soto-raul wants to merge 5 commits intoLibensemble:developfrom
Open
refactor: replaced 'os.path.join()' uses with 'pathlib.Path' / syntax#1637soto-raul wants to merge 5 commits intoLibensemble:developfrom
soto-raul wants to merge 5 commits intoLibensemble:developfrom
Conversation
… (except on files prefixed with 'test_')
…pickle and np + Correctly parse Path to str when saving history every kth sim step
…y_k_gens function
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## develop #1637 +/- ##
============================================
- Coverage 93.29% 78.29% -15.00%
============================================
Files 81 81
Lines 8188 8192 +4
Branches 1257 1257
============================================
- Hits 7639 6414 -1225
- Misses 358 1545 +1187
- Partials 191 233 +42 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
@soto-raul We just merged some changes into the target branch that conflict with your PR. If possible please resolve these conflicts, then if tests pass we'll be happy to merge. |
…_os_path_join_with_Pathlib_path
e57d0ff to
98a9fce
Compare
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
This PR closes #1627.
As per the issue's description, in this PR most instances of
os.path.joinon strings with the corresponding/syntax forpathlib.Pathobjects. For example:However, files with the prefix
test_were not considered for this refactor; therefore, they maintained the usage ofos.path.joinFiles Changed
install/find_mpi.pylibensemble/executors/executor.pylibensemble/manager.pylibensemble/resources/resources.pylibensemble/tests/run_tests.pylibensemble/tests/scaling_tests/forces/forces_adv/forces_simf.pylibensemble/tests/scaling_tests/forces/forces_adv/forces_support.pylibensemble/tests/scaling_tests/forces/forces_adv/run_libe_forces.pylibensemble/tests/scaling_tests/forces/forces_adv/run_libe_forces_from_yaml.pylibensemble/tests/scaling_tests/forces/forces_gpu/run_libe_forces.pylibensemble/tests/scaling_tests/forces/forces_gpu_var_resources/run_libe_forces.pylibensemble/tests/scaling_tests/forces/forces_multi_app/run_libe_forces.pylibensemble/tests/scaling_tests/forces/forces_simple/run_libe_forces.pylibensemble/tests/scaling_tests/forces/forces_simple_with_input_file/run_libe_forces.pylibensemble/tests/scaling_tests/forces/globus_compute_forces/forces_simf.pylibensemble/tools/parse_args.pylibensemble/tools/tools.pyAdditional Notes
It would be a good idea to consider replacing other uses of the
osmodule with theirpathlibequivalents. For example,os.path.exists()could be replaced byPath.exists().