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

Support for pathlib #1616

Open
adamjstewart opened this issue Oct 4, 2023 · 7 comments
Open

Support for pathlib #1616

adamjstewart opened this issue Oct 4, 2023 · 7 comments
Assignees
Labels
good first issue A good issue for a new contributor to work on

Comments

@adamjstewart
Copy link
Collaborator

Summary

We should add support for Python's pathlib module.

Rationale

Users may want to pass in a Path object instead of a string.

Implementation

The type hints will change from str to Union[str, bytes, os.PathLike] according to PEP 519.

Alternatives

No response

Additional information

No response

@adamjstewart adamjstewart added the good first issue A good issue for a new contributor to work on label Oct 4, 2023
@pioneerHitesh
Copy link
Contributor

I would like to contribute to this, can this be assigned to me?

@adamjstewart
Copy link
Collaborator Author

Assigned, thanks for the help @pioneerHitesh!

@adamjstewart
Copy link
Collaborator Author

sklearn actually did the exact same thing in their latest release: scikit-learn/scikit-learn#27468

@kvenkman
Copy link

kvenkman commented Feb 1, 2024

If this is still an issue, could I contribute to this?

@adamjstewart
Copy link
Collaborator Author

@pioneerHitesh was working on this, up to him whether or not he wants to let you take over.

P.S. torchvision 0.17 was released a couple days ago. Does this add support for pathlib to their download/extract functions? This will make the conversion much easier in TorchGeo, I think that's the only thing we were waiting on.

@pioneerHitesh
Copy link
Contributor

@adamjstewart The PR has not been made into stable release yet. Regarding taking over of the project. I am more inclined to complete the work myself although i appreciate @kvenkman interest in it.

@kvenkman
Copy link

kvenkman commented Feb 1, 2024

Sounds good, happy to help as needed @pioneerHitesh!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A good issue for a new contributor to work on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants