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 xPath for Windows pathnames #5310

Merged
merged 12 commits into from Nov 30, 2022

Conversation

albertvillanova
Copy link
Member

@albertvillanova albertvillanova commented Nov 29, 2022

This PR implements a string representation of xPath, which is valid for local paths (also windows) and remote URLs.

Additionally, some os.path methods are fixed for remote URLs on Windows machines.

Now, on Windows machines:

In [2]: str(xPath("C:\\dir\\file.txt"))
Out[2]: 'C:\\dir\\file.txt'
In [3]: str(xPath("http://domain.com/file.txt"))
Out[3]: 'http://domain.com/file.txt'

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Nov 29, 2022

The documentation is not available anymore as the PR was closed or merged.

@albertvillanova albertvillanova changed the title Support streaming datasets with pathlib.Path.as_posix Support xPath for Windows pathnames Nov 29, 2022
Copy link
Member

@lhoestq lhoestq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool thanks ! Maybe just one test:

tests/test_streaming_download_manager.py Show resolved Hide resolved
Co-authored-by: Quentin Lhoest <42851186+lhoestq@users.noreply.github.com>
Copy link
Member

@lhoestq lhoestq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks ! :D

@albertvillanova albertvillanova merged commit 617d15b into huggingface:main Nov 30, 2022
@albertvillanova albertvillanova deleted the refactor-as-posix branch November 30, 2022 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants