Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating DB outside of tool-installation directory should be possible #41

Open
pvanheus opened this issue Jun 12, 2023 · 2 comments
Open
Milestone

Comments

@pvanheus
Copy link

pvanheus commented Jun 12, 2023

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).

@pvanheus
Copy link
Author

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

@pvanheus
Copy link
Author

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.

@stroehleina stroehleina added this to the Version 1.0 milestone Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants