Support passing in pathlib.Path into pygmt modules #1381
Labels
feature request
New feature wanted
good first issue
Good for newcomers
scipy-sprint
Things to work on during the SciPy sprint!
Milestone
Description of the desired feature
Originally posted by @liamtoney in #949 (comment)
The
pathlib.Path
is a cross-platform way of handling filepaths. Currently PyGMT supports passing in filenames as astr
, but it would be good to ensure thatpathlib.Path
works too.What needs to be done ☑️
pygmt/pygmt/helpers/utils.py
Lines 69 to 70 in 11c1301
pathlib.Path
inputs, best placed in https://github.com/GenericMappingTools/pygmt/blob/master/pygmt/tests/test_info.py.How to make the change 🧐
Are you willing to help implement and maintain this feature? Happy to guide someone with some familiarity with Python Path objects to work on this. Will also be a great opportunity for someone wanting to learn how to write unit tests.
The text was updated successfully, but these errors were encountered: