Skip to content

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

Closed

Description

@tim-fry

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.

Activity

  1. paulromano commented on Jan 22, 2020

    @paulromano
    Contributor

    @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.

  2. paulromano commented on Jan 22, 2020

    @paulromano
    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!

  3. shimwell commented on Feb 6, 2020

    @shimwell
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions