Closed ramcdougal closed 1 year ago
The idea is to use GitHub to download models: https://github.com/neuronsimulator/nrn-modeldb-ci/pull/72
However we still have https://github.com/neuronsimulator/nrn-modeldb-ci/issues/71
To avoid the very-high-latency cache setup we have at the moment, we need a way of efficiently getting the list of models to be tested and some kind of last-updated timestamp or commit ID. I believe this is well within the limits of the GitHub API.
Based on https://modeldb.science/api it looks like the results of https://modeldb.science/api/v1/models/id?modeling_application=NEURON and https://modeldb.science/api/v1/models/ver_date?modeling_application=NEURON could be zipped together to get a list of (id, date) pairs.
It seems "reasonable" to assume that these two queries will return results sorted by some common key, so it is safe to zip them together, but I don't see it documented that this is the case. Can you confirm @ramcdougal?
Yes, the two responses are in the same order, and the API documentation on ModelDB.science has been updated to reflect this.
In modeldb/modeldb.py,
MDB_MODEL_DOWNLOAD_URL
is set to pull from the Yale site. This link will become inoperative at somepoint in June.Instead of pulling all the data and metadata about a model to get the file contents, going forward
download_model
can get the file contents direclty via links of the formhttps://modeldb.science/eavBinDown?o={model_id}