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

Fully adopt pathlib.PurePath for file paths #4523

Open
SimonPeatman opened this issue Jan 22, 2022 · 3 comments
Open

Fully adopt pathlib.PurePath for file paths #4523

SimonPeatman opened this issue Jan 22, 2022 · 3 comments
Labels
Good First Issue A good issue to take on if you're just getting started with Iris development Type: Infrastructure

Comments

@SimonPeatman
Copy link
Contributor

✨ Feature Request

Iris uses os.path to handle file paths, but the standard in Python 3 is to use pathlib.PurePath objects. #3411 proposed adopting pathlib.PurePath and this is partially implemented by #3917. The present issue proposes replacing os.path with the use of pathlib across the whole of Iris.

Details

#3917 implements pathlib.PurePath for the main public functions only (load, load_cube, load_cubes, load_raw and save). See #3917 (review) for full details of what has been done and what is still to do.

@pp-mo
Copy link
Member

pp-mo commented Jan 26, 2022

Is this actually closable now @SimonPeatman @wjbenfold ?
Excuse my ignorance, I haven't been following detail here -- just tidying issues

@wjbenfold
Copy link
Contributor

No, @pp-mo, this is the issue that has come out of the recent work on pathlib. We've so far introduced it "superficially" - i.e. the most frequently used bits of the public api will now accept a pathlib path but it's almost immediately converted to a string. This ticket is for the further work that would use paths all the way down (maybe converting input strings to paths) and leverage the features of paths that we currently use os for.

Copy link
Contributor

In order to maintain a backlog of relevant issues, we automatically label them as stale after 500 days of inactivity.

If this issue is still important to you, then please comment on this issue and the stale label will be removed.

Otherwise this issue will be automatically closed in 28 days time.

@github-actions github-actions bot added the Stale A stale issue/pull-request label Jul 23, 2024
@stephenworsley stephenworsley added Type: Infrastructure and removed Stale A stale issue/pull-request labels Jul 24, 2024
@trexfeathers trexfeathers added the Good First Issue A good issue to take on if you're just getting started with Iris development label Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue A good issue to take on if you're just getting started with Iris development Type: Infrastructure
Projects
Status: No status
Development

No branches or pull requests

6 participants