Boavizta / boaviztapi

🛠 Giving access to BOAVIZTA reference data and methodologies trough a RESTful API
GNU Affero General Public License v3.0
73 stars 23 forks source link

Indicate origin of data in API results #91

Closed demeringo closed 2 years ago

demeringo commented 2 years ago

Problem

End user of the API would be interested in getting metadata, in addition to the impacts.

Solution

This is to be discussed in term of feasibility and if it could/should implemented on all routes or not.

Likely use it only through and extra verbose -optional- mode

Alternatives

Additional context or elements

da-ekchajzer commented 2 years ago

We have implemented Boattribute for each of the component's attribute which adds metadata to the attributes. When an attribute's value is completed (not given by the user or not set by default) we specify the source in the attribute's metada.

Example

    "die_size_per_core": {
      "value": 0.289,
      "unit": "mm2",
      "status": "COMPLETED",
      "source": "https://en.wikichip.org/wiki/intel/microarchitectures/skylake_(server)"
}
da-ekchajzer commented 2 years ago

The behavior have been implemented in Boattributes. The data sources will be completed as we go along !

See https://github.com/Boavizta/boaviztapi/blob/dev/boaviztapi/model/boattribute.py