qri-io / qri

you're invited to a data party!
https://qri.io
GNU General Public License v3.0
1.11k stars 66 forks source link

naming users and datasets needs to be unified and enforced #1277

Open dustmop opened 4 years ago

dustmop commented 4 years ago

The recently added dsref package should be the central location for parsing usernames and dataset names. In both cases we should only allow names that start with a lower case letter, then follow with one or more of (lower case letter, number, underscore, dash).

We also need to enforce this naming scheme everywhere. Here are some places I found that are behaving incorrectly:

Desktop also needs to have parity with these checks

dustmop commented 4 years ago

Reversing the fix for this issue: https://github.com/qri-io/qri/issues/1116.

Related: https://github.com/qri-io/qri/issues/1153 and https://github.com/qri-io/qri/issues/1132

dustmop commented 4 years ago

Related issue that can be fixed at the same time. It's not possible to infer a name using a file that contains unicode:

> qri save --body=здравствуйте.csv 
invalid name: dataset name must start with a letter, and only contain letters, numbers, and underscore. Maximum length is 144 characters