Skip to content

Conversation

@soto-raul
Copy link

Description

This PR closes #1627.
As per the issue's description, in this PR most instances of os.path.join on strings with the corresponding / syntax for pathlib.Path objects. For example:

# BEFORE
full_path = os.path.join(root_dir, dir_path)

# AFTER
full_path = Path(root_dir) / dir_path # After

However, files with the prefix test_ were not considered for this refactor; therefore, they maintained the usage of os.path.join

Files Changed

  • install/find_mpi.py
  • libensemble/executors/executor.py
  • libensemble/manager.py
  • libensemble/resources/resources.py
  • libensemble/tests/run_tests.py
  • libensemble/tests/scaling_tests/forces/forces_adv/forces_simf.py
  • libensemble/tests/scaling_tests/forces/forces_adv/forces_support.py
  • libensemble/tests/scaling_tests/forces/forces_adv/run_libe_forces.py
  • libensemble/tests/scaling_tests/forces/forces_adv/run_libe_forces_from_yaml.py
  • libensemble/tests/scaling_tests/forces/forces_gpu/run_libe_forces.py
  • libensemble/tests/scaling_tests/forces/forces_gpu_var_resources/run_libe_forces.py
  • libensemble/tests/scaling_tests/forces/forces_multi_app/run_libe_forces.py
  • libensemble/tests/scaling_tests/forces/forces_simple/run_libe_forces.py
  • libensemble/tests/scaling_tests/forces/forces_simple_with_input_file/run_libe_forces.py
  • libensemble/tests/scaling_tests/forces/globus_compute_forces/forces_simf.py
  • libensemble/tools/parse_args.py
  • libensemble/tools/tools.py

Additional Notes

It would be a good idea to consider replacing other uses of the os module with their pathlib equivalents. For example, os.path.exists() could be replaced by Path.exists().

@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.30%. Comparing base (155c234) to head (04a7dd8).
⚠️ Report is 5 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1637      +/-   ##
===========================================
+ Coverage    78.19%   78.30%   +0.11%     
===========================================
  Files           76       76              
  Lines         7580     7584       +4     
  Branches      1119     1119              
===========================================
+ Hits          5927     5939      +12     
- Misses        1452     1460       +8     
+ Partials       201      185      -16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant