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

Migrate scripts from using os.path to using Pathlib #17

Closed
tim-fry opened this issue Jan 22, 2020 · 3 comments · Fixed by #22
Closed

Migrate scripts from using os.path to using Pathlib #17

tim-fry opened this issue Jan 22, 2020 · 3 comments · Fixed by #22

Comments

@tim-fry
Copy link
Contributor

tim-fry commented Jan 22, 2020

This issue is added in response to a requirement from @shimwell and @ukaea.

In the scripts there is an extensive use of os.path library for finding files and directories. In some scripts the code has started using PathLib instead of os.path.

I'm planning to update all of the current scripts to replace uses of os.path with the newer object orientated PathLib (https://docs.python.org/3/library/pathlib.html) library. I'll make sure that the use of PathLib is kept consistent with those scripts in which it's already used.

@paulromano
Copy link
Contributor

paulromano commented Jan 22, 2020

@tim-fry Yes, I'm all for using pathlib over os.path. I'm actually already working on refactoring the scripts in the scripts/ directory based on feedback from the review in openmc-dev/openmc#1455 and started using pathlib there.

@paulromano
Copy link
Contributor

Ah sorry, I'm talking about the wrong repo here -- I've been refactoring scripts in openmc-dev/openmc, not here. Feel free to take a stab at the ones here!

@shimwell
Copy link
Member

shimwell commented Feb 6, 2020

Yes please @tim-fry this would be a nice addition. I guess this is being worked on by yourself and might overlap with some of the work others in your group are doing @SamPUG

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 a pull request may close this issue.

3 participants