SPARC-FAIR-Codeathon / sparc-me

A python tool to explore, enhance, and expand SPARC datasets and their descriptions
Apache License 2.0
7 stars 6 forks source link

API: Update for dataset_description #87

Closed chinchien-lin closed 1 year ago

chinchien-lin commented 1 year ago

Describing the dataset

dataset.list_elements()
dataset_description = dataset.get_category()
values = [“bob, builder”]
dataset_description.add_values(“element_name_string”, values)
dataset_description.remove_values(“element_name_string”, value)
dataset_description.clear_values(“field_string”)
values = dataset_description.get_values(“field_string”)
LinkunGao commented 1 year ago

For Tu2 steps:

  1. create dataset from template
  2. edit dataset metadata
    • description_metadata values: CRUD
  3. save the dataset template
  4. add data to dataset template
LinkunGao commented 1 year ago

Developed a MetadataEditor class for editing all metadata files(code_description, code_parameters, dataset_description, manifest, performances, resources, samples, subjects, submission). we can use MetadataEditor to edit all of them at the same time with these functions: