Skip to content
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

Consolidate on pathlib module #306

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

marc-white
Copy link
Collaborator

Closes #271.

This PR aims to remove os.path dependency from the main package, replacing it with pathlib.Path.

An e2e test should be done on this branch before merging to confirm the build system is unaffected.

os.path is still used in versioneer.py, but I think that's code that's been generated externally and committed to our repo, so I haven't touched that.

Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.14%. Comparing base (3590e46) to head (65d9741).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #306      +/-   ##
==========================================
- Coverage   98.15%   98.14%   -0.01%     
==========================================
  Files          11       11              
  Lines        1028     1024       -4     
==========================================
- Hits         1009     1005       -4     
  Misses         19       19              

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

@marc-white marc-white changed the title Consolidate on pathlib module DRAFT: Consolidate on pathlib module Dec 11, 2024
@marc-white marc-white marked this pull request as draft December 11, 2024 06:31
@marc-white marc-white changed the title DRAFT: Consolidate on pathlib module Consolidate on pathlib module Dec 11, 2024
Copy link
Collaborator

@charles-turner-1 charles-turner-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me - as far as I can see you've caught them all:

$ rg --files-with-matches 'os\.path'
versioneer.py
tests/data/mom6/README

@marc-white
Copy link
Collaborator Author

Running e2e tests needs to wait until #304 is merged in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

Consolidation on use of pathlib module for filesystem operations, rather than pathlib & os.path
2 participants