Closed sirloon closed 6 years ago
done in https://github.com/biothings/biothings.api/commit/7101f5336948a9e7059007ee8ad213c41e6c8c89
Here's how it works:
{
"version": "0.1",
"dumper" : {
"data_url" : "https://www.cancergenomeinterpreter.org/data/cgi_biomarkers_latest.zip",
"uncompress" : true,
"release" : "version:get_release"
},
"uploader" : {
"parser" : "parser:load_data",
"on_duplicates" : "ignore"
}
}
Added “release” key under “dumper”. It refers to module “version.py” and a function inside, named “get_release”.
Content of version.py:
def get_release(self):
return "1.3"
the signature has “self”, it is the dumper instance (self) and all of its methods, properties, etc... In order, for instance, to access the filenames (URLs) and get the release number from it, self.class.SRC_URLS can be used.
get_release should return a release number
Several options: