Skip to content

API fails to handle metadataBlocks: "astrophysics" & "biomedical" #164

@jmurugan-fzj

Description

@jmurugan-fzj

Bug report

The latest version of dataset-create-new-all-default-fields.json allows also "astrophysics" & "biomedical" related metadata to be populated for a newly created data set. But the present version of src/pyDataverse/models.py does not seem to be capable of handling these metadata blocks.

image

1. Describe your environment

  • OS: Linux, Ubuntu 22.04.1, 64bit
  • pyDataverse: 0.3.1
  • Python: 3.10.12
  • Dataverse: v. 6.0 build 1512-366fd41

2. Actual behaviour:

  • Create a new dataset with the "astrophysics" & "biomedical" metadata and notice that the metadata information is not populated in dataverse
    ds = Dataset()
    ds.set({"title": "Test Data Set"})
    ds.set({"license": "CC0 1.0"})
    ds.set({"astroType": ["Mosaic"],
            "astroFacility": ["AIK-2", "AIK-3"],
            "studyDesignType": ["Case Control", "Cross Sectional"],
            "studyAssayOrganism": ["Arabidopsis thaliana", "Bos taurus", "Zea mays"]})
    ds.validate_json()
   native_api.create_dataset(dataverse=dataverse_id, metadata=ds.json(), auth=True)
  • I have tried populating from different blocks, most of them succeeded except these two blocks
    image

3. Expected behaviour:

  • API should be able to populate also the metadata blocks: "astrophysics" & "biomedical"..

4. Steps to reproduce

  1. Create a new data-set using the method mentioned in the "expected behavior" above
  2. Check the created data set in dataverse to see that the "astrophysics" & "biomedical" metadata are missing..

5. Possible solution

  • As I mentioned above in the description model needs to be extended to populate other metadata blocks also.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:incomingNewly created issue to be forwardedtype:bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions