inspirehep / inspire-schemas

Inspire JSON schemas and utilities to use them.
GNU General Public License v2.0
8 stars 26 forks source link

Add files entries in schemas #200

Closed StellaCh closed 7 years ago

StellaCh commented 7 years ago

The plots are generated by plotextract, and need the following metadata:

The documents will have the following metadata:

michamos commented 7 years ago

@david-caro @zzacharo @ammirate do we really want to store the format of the plot there? isn't this computed already by invenio-files-rest?

michamos commented 7 years ago

And what is the name of the plot for? how is this different from key (which is the filename AFAIU)?

StellaCh commented 7 years ago

As far as I understand, the name was given by the user who uploaded the plot and the key is generated from the system, right @david-caro ?

david-caro commented 7 years ago

Yep, the name is the name the user gave to it, like fig1.png, while the key is what we use to uniquely identify that file (as two plots might have the same name, but not the same key).

@david-caro @zzacharo @ammirate do we really want to store the format of the plot there? isn't this computed already by invenio-files-rest?

It's in the schema, but afaik it does not get generated by invenio-files-rest anywhere (https://labs.inspirehep.net/api/holdingpen/682187)... though I might be missing something. In any case, the idea of having the metadata we need/want for the plots and documents in a separated key allows us to decouple it from invenio-files-rest (or any other external module for that matter) and evolve it on our own, using the .files property as a storage backend only.