[data_files] Only match separated split names
NONE
_The documentation is not available anymore as the PR was closed or merged._
2022-07-05T14:24:32Z
https://github.com/huggingface/datasets/pull/4633#issuecomment-1175123589
https://api.github.com/repos/huggingface/datasets/issues/4633
IC_kwDODunzps5GCvaF
https://api.github.com/repos/huggingface/datasets/issues/comments/1175123589/reactions
2022-07-18T13:20:29Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1175123589
https://avatars.githubusercontent.com/u/99929124?v=4
https://api.github.com/users/HuggingFaceDocBuilderDev/events{/privacy}
https://api.github.com/users/HuggingFaceDocBuilderDev/followers
https://api.github.com/users/HuggingFaceDocBuilderDev/following{/other_user}
https://api.github.com/users/HuggingFaceDocBuilderDev/gists{/gist_id}
https://github.com/HuggingFaceDocBuilderDev
HuggingFaceDocBuilderDev
U_kgDOBfTMJA
https://api.github.com/users/HuggingFaceDocBuilderDev/orgs
https://api.github.com/users/HuggingFaceDocBuilderDev/received_events
https://api.github.com/users/HuggingFaceDocBuilderDev/repos
https://api.github.com/users/HuggingFaceDocBuilderDev/starred{/owner}{/repo}
https://api.github.com/users/HuggingFaceDocBuilderDev/subscriptions
User
https://api.github.com/users/HuggingFaceDocBuilderDev
public
MEMBER
I ran a script to find affected datasets (just did it on non-private non-gated). Adding "testing" and "evaluation" fixes all of of them except one:
- projecte-aina/cat_manynames:	human_annotated_testset.tsv

Let me open a PR on their repository to fix it
EDIT: pr [here](https://huggingface.co/datasets/projecte-aina/cat_manynames/discussions/2)
2022-07-08T13:53:56Z
https://github.com/huggingface/datasets/pull/4633#issuecomment-1179016572
https://api.github.com/repos/huggingface/datasets/issues/4633
IC_kwDODunzps5GRl18
https://api.github.com/repos/huggingface/datasets/issues/comments/1179016572/reactions
2022-07-08T14:02:12Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1179016572
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
MEMBER
Feel free to merge @albertvillanova if it's all good to you :)
2022-07-08T16:55:59Z
https://github.com/huggingface/datasets/pull/4633#issuecomment-1179192268
https://api.github.com/repos/huggingface/datasets/issues/4633
IC_kwDODunzps5GSQvM
https://api.github.com/repos/huggingface/datasets/issues/comments/1179192268/reactions
2022-07-08T16:55:59Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1179192268
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
MEMBER
Thanks for the feedback @albertvillanova  I took your comments into account :)
- added numbers as supported delimiters
- used list comprehension to create the patterns list
- updated the docs and the tests according to your comments

Let me know what you think !
2022-07-18T10:29:37Z
https://github.com/huggingface/datasets/pull/4633#issuecomment-1187031044
https://api.github.com/repos/huggingface/datasets/issues/4633
IC_kwDODunzps5GwKgE
https://api.github.com/repos/huggingface/datasets/issues/comments/1187031044/reactions
2022-07-18T10:29:37Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1187031044
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
MEMBER
I ended up removing the patching and the context manager :) merging
2022-07-18T13:07:25Z
https://github.com/huggingface/datasets/pull/4633#issuecomment-1187375312
https://api.github.com/repos/huggingface/datasets/issues/4633
IC_kwDODunzps5GxejQ
https://api.github.com/repos/huggingface/datasets/issues/comments/1187375312/reactions
2022-07-18T13:07:25Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1187375312
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
As reported in https://github.com/huggingface/datasets/issues/4477, the current pattern matching to infer which file goes into which split is too permissive. For example a file "contest.py" would be considered part of a test split (it contains "test") and "seqeval.py" as well (it contains "eval").

In this PR I made the pattern matching more robust by only matching split names **between separators**. The supported separators are dots, dashes, spaces and underscores.

I updated the docs accordingly.

One detail about the tests: I had to update one test because it was using `PurePath.match` as a reference for globbing, but it doesn't support the `[..]` glob pattern. Therefore I added a `mock_fs` context manager that can be used to easily define a dummy filesystem with certain files in it and run pattern matching tests. Its code comes mostly from test_streaming_download_manager.py

Close https://github.com/huggingface/datasets/issues/4477