brainglobe / brainglobe-utils

Shared general purpose tools for the BrainGlobe project
MIT License
11 stars 1 forks source link

Handle str and pathlib.Path consistently in image_io #54

Closed K-Meech closed 7 months ago

K-Meech commented 7 months ago

Description

What is this PR

Why is this PR needed? The load/save functions in image_io currently only specify str filepaths in their docstrings, although some can also accept pathlib.Path.

What does this PR do? This PR ensures that all load/save functions in image_io consistently handle both str and pathlib.Path. It favours using pathlib.Path internally wherever possible.

References

Closes https://github.com/brainglobe/brainglobe-utils/issues/47

How has this PR been tested?

image_io tests were updated so that all load/save functions are tested with both pathlib.Path and str.

Is this a breaking change?

No

Does this PR require an update to the documentation?

All relevant image_io docstrings were updated.

Checklist: