Closed le-ander closed 1 year ago
You could try subsetting by "doi_journal" as a fix, that should work. The bug is here
DatasetGroup::def doi(self) -> List[str]:
dois = []
for _, v in self.datasets.items():
vdoi = v.doi_journal
if isinstance(vdoi, str):
vdoi = [vdoi]
dois.extend(vdoi)
return np.unique(dois).tolist()
which does not account for the case in which only doi_preprint is annotated and doi_journal is None, this probably broke during a past refactor of the DOI interface:
DatasetGroup::def doi(self) -> List[str]:
dois = []
for _, v in self.datasets.items():
vdoi_j = v.doi
dois.extend(vdoi)
return np.unique(dois).tolist()
on feature/update_old_dataloaders, subsetting a sfaira universe object using the key "doi" raises an uninformative error. I guess the key "doi" is no longer valid and either "doi_journal" or "doi_preprint" should be used. we should try to raise the usual "key not part of sfaira-controlled metadata" error instead of the current behaviour.