Open kasbah opened 4 years ago
Yes I agree, I never actually got this working--not a permanent issue, I just didn't take the time to do it.
Because some values are mandatory to publish metadata such as :
I got it working with for example:
data = {
'metadata': {
'title': df.iloc[i]["Title"].split(':')[1]+"_test",
'upload_type': 'dataset',
'description': df.iloc[i]["Description"],
'creators': [{'name': 'Sylvain POULAIN',
'affiliation': 'IRD',
"orcid": "0009-0005-9789-9095"},
{'name': 'Julien BARDE',
'affiliation': 'IRD'}],
"keywords": [
"FAIR data",
"Design of Experiment",
"interoperability"],
"communities":[{'identifier':'uav'},
{'identifier':'ecfunded'}],
"language": "eng",
"license": {
"id": "CC-BY-4.0"
},
"publication_date": df.iloc[i]['Date'].split("_\n")[0].split(':')[1],
"grants": [{"links":{"self":"https://zenodo.org/api/grants/10.13039/501100000780::654241"},"acronym": "PhenoMenAl",
"program": "H2020",
"funder": {
"doi": "10.13039/501100000780",
"acronyms": [
"EC"
],
"name": "European Commission",
"links": {
"self": "https://zenodo.org/api/funders/10.13039/501100000780"
}
}
}]
}
}
r = requests.put('https://sandbox.zenodo.org/api/deposit/depositions/{}'.format(recid),
params={'access_token': ACCESS_TOKEN},
data=json.dumps(data),
headers=headers)
Seems like it's currently commented out in upload.py and un commenting it causes errors.