IQSS / dataverse

Open source research data repository software
http://dataverse.org
Other
882 stars 494 forks source link

Harvesting : Add granularity to ListRecords when using from parameter #11038

Open luddaniel opened 1 day ago

luddaniel commented 1 day ago

What this PR does / why we need it:

It performs an Identify request before a ListRecords request with from parameter to add the correct granularity.

Which issue(s) this PR closes:

Suggestions on how to test this:

Test with YYYY-MM-DD granularity, without PR it will FAIL in 2nd run, with PR it will work :

{
  "nickName": "nakala",
  "dataverseAlias": "root",
  "type": "oai",
  "style": "default",
  "harvestUrl": "https://api.nakala.fr/oai2",
  "archiveUrl": "https://api.nakala.fr",
  "archiveDescription": "This Dataset is harvested from our partners. Clicking the link will take you directly to the archival source of the data.",
  "metadataFormat": "oai_dc",
  "set": "doi_10.34847_nkl.002f8m36",
  "schedule": "none",
  "allowHarvestingMissingCVV": true
}
curl -H "X-Dataverse-key: $API_KEY" -H "Content-Type: application/json" -X POST  "http://localhost:8080/api/harvest/clients/nakala" --upload-file "client.json"

Test with YYYY-MM-DDThh:mm:ssZ granularity, non regression test, it work still work with the PR :

{
  "nickName": "ird",
  "dataverseAlias": "root",
  "type": "oai",
  "style": "dataverse",
  "harvestUrl": "https://dataverse.ird.fr/oai",
  "archiveUrl": "https://dataverse.ird.fr",
  "archiveDescription": "This Dataset is harvested from our partners. Clicking the link will take you directly to the archival source of the data.",
  "metadataFormat": "dataverse_json",
  "schedule": "none",
  "allowHarvestingMissingCVV": true
}
curl -H "X-Dataverse-key: $API_KEY" -H "Content-Type: application/json" -X POST  "http://localhost:8080/api/harvest/clients/ird" --upload-file "client.json"

Is there a release notes update needed for this change?: Yes