Skip to content

Refactor TethysWorkspace to always return Path objects #1207

@shawncrawley

Description

@shawncrawley

The TethysWorkspace class can be initialized by a pathlib.Path object, and stores the path as a pathlib.Path object internally, but all methods that return a path do so as a string, not the object itself.

I think we held off on doing this refactor before because it would be a breaking change for app developers. But I think it's worth doing. It's definitely more of a pain to use in coding contexts where someone is all-in on pathlib.Path. It's easier for someone who wants the strings to just recast the returned object (e.g. str(workspace.path) rather than just workspace.path).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions