Open pvanheus opened 1 year ago
On the point of having checking if the PubMLST alleles files have been modified - currently they don't provide the right headers but there is an open issue: https://github.com/kjolley/BIGSdb/issues/913
On the point of having checking if the PubMLST alleles files have been modified - currently they don't provide the right headers but there is an open issue: kjolley/BIGSdb#913
Following on from this, Keith Jolley pointed out to me that alleles, schemes and isolates all have a last_updated
or last_added
attribute that can be used to get info on updates - e.g. http://rest.pubmlst.org/db/pubmlst_neisseria_seqdef/loci/PorA_VR1/alleles.
Currently the tool can update DB by downloading updated files from PubMLST, and, with the specification of a
--db
location, this update can run even if the tool's install location is read-only (as in the case of e.g. a system-wide install on a multi-user system or in the case of the tool encapsulated in a Docker container). The resulting updated DB will, however, be incomplete.A work-around is possible where the install-time DB is combined with the updated files downloaded from PubMLST, but preferably the tool should allow the DB to be updated to an arbitrary DB location without resulting in an incomplete DB.
Additionally, the tool should only download files if a newer file is available, i.e. it should use the 'If-Modified-Since' header for HTTP/HTTPS requests. While this is not super-easy with
urlretrieve
it is possible with (https://stackoverflow.com/a/59602931).