Instead of datasets being a dictionary of id and title, let's just make it a list of Datasets. (Some day we can also add nested Catalogs.) For the purpose of a convenient view, we can define __str__ on Dataset and/or Catalog to present the id and title.
Dataset is currently constructed with Metadata which eagerly reads dataset metadata from LaTiS. This is not always cheap in latis2. We can get around this by making metadata a function on Dataset so the call is made only if a user specifically asks for it. Some day, we may integrate the dataset metadata with the catalog and this problem will go away. In the mean time, we probably want at least the id and title to be members of a Dataset. We can discuss the naming and whether to use name.
We may want to review the behavior of search in another ticket, but it could use the Dataset.title for now.
Instead of
datasetsbeing a dictionary of id and title, let's just make it a list ofDatasets. (Some day we can also add nested Catalogs.) For the purpose of a convenient view, we can define__str__onDatasetand/orCatalogto present the id and title.Datasetis currently constructed withMetadatawhich eagerly reads dataset metadata from LaTiS. This is not always cheap in latis2. We can get around this by makingmetadataa function onDatasetso the call is made only if a user specifically asks for it. Some day, we may integrate the dataset metadata with the catalog and this problem will go away. In the mean time, we probably want at least theidandtitleto be members of aDataset. We can discuss the naming and whether to usename.We may want to review the behavior of
searchin another ticket, but it could use theDataset.titlefor now.