fiftyone icon indicating copy to clipboard operation
fiftyone copied to clipboard

[BUG] Add validation to dataset names

Open ehofesmann opened this issue 2 years ago • 1 comments

Dataset names should be validated for unsupported characters before being saved. Many non-alphanumeric characters result in issues when attempting to load the dataset in the App.

import fiftyone as fo
import fiftyone.zoo as foz

dataset = foz.load_zoo_dataset("quickstart").clone()
dataset.name = "test/1"

session = fo.launch_app(dataset)
404: /datasets/test%2F1 not found

ehofesmann avatar Aug 11 '22 21:08 ehofesmann

More generally, we'll need to introduce notions of "human-readable" vs "URL-friendly" dataset names.

IE a dataset with name ErIc's CrAzY DaTaSeT will be reachable at /datasets/erics-crazy-dataset.

We could still add validation to the human-readable name, but I do think spaces should be allowed in the dataset name, but they can't be allowed in the URL.

brimoor avatar Aug 11 '22 21:08 brimoor

URL safe slugs are used now.

swheaton avatar Oct 07 '23 14:10 swheaton