bio-guoda / preston

a biodiversity dataset tracker
MIT License
25 stars 1 forks source link

content unknown to zenodo creates zenodo query response #270

Closed jhpoelen closed 7 months ago

jhpoelen commented 7 months ago

when running

preston s --algo md5 --no-cache --remote https://zenodo.org,https://dataverse.org

to retrieve a cat picture from DataVerse https://github.com/bio-guoda/preston/issues/269#issuecomment-1856253928

using

http://localhost:8080/hash://md5/7d62417b5b689ed91dcd25f10c9c2132

an unexpected result is generated:

{
  "hits": {
    "hits": [],
    "total": 0
  },
  "aggregations": {
    "access_status": {
      "buckets": [],
      "label": "Access status"
    },
    "resource_type": {
      "buckets": [],
      "label": "Resource types"
    },
    "subject": {
      "buckets": [],
      "label": "Subjects"
    },
    "file_type": {
      "buckets": [],
      "label": "File type"
    }
  }
}

which appears to be an internal zenodo reply to a content id-based query.

Expected was a picture of a cat.

jhpoelen commented 7 months ago

After applying fix in 0.7.10, we now have -

curl "http://localhost:8080/hash://md5/7d62417b5b689ed91dcd25f10c9c2132"\
 | md5sum

7d62417b5b689ed91dcd25f10c9c2132

as well as,

curl "https://linker.bio/hash://md5/7d62417b5b689ed91dcd25f10c9c2132"\
 | md5sum

7d62417b5b689ed91dcd25f10c9c2132