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

add postgresql datatype #4730

Merged
merged 9 commits into from Oct 3, 2017

Conversation

Projects
None yet
3 participants
@bgruening
Member

bgruening commented Oct 1, 2017

This PR add a compressed postgresql datatype.
We assume a postgresql folder inside the compressed tarball and relative to this a postgresql/db/PG_VERSION file.

We are going for a compressed tarball for now and not for a composite datatype (e.g. html), because I assume sharing or uploading/downloading a postgresql database will become a thing ;)

I added a tiny fake example tarball as a test case. This tarball has no big data included as I wanted to have it as tiny as possible.

@galaxybot galaxybot added the triage label Oct 1, 2017

@galaxybot galaxybot added this to the 18.01 milestone Oct 1, 2017

@bgruening bgruening added area/datatypes and removed triage labels Oct 1, 2017

def sniff(self, filename):
try:
if filename and tarfile.is_tarfile(filename):

This comment has been minimized.

@erasche

erasche Oct 2, 2017

Member

both of these will be caught by the exception when you try and open / read from it. Not sure if necessary?

try:
if filename and tarfile.is_tarfile(filename):
with tarfile.open(filename, 'r') as temptar:
if 'postgresql/db/PG_VERSION' in temptar.getnames():

This comment has been minimized.

@erasche

erasche Oct 2, 2017

Member

return 'postgresql/db/PG_VERSION' in temptar.getnames() ?

@erasche erasche merged commit 6497329 into galaxyproject:dev Oct 3, 2017

6 checks passed

api test Build finished. 297 tests run, 4 skipped, 0 failed.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
framework test Build finished. 161 tests run, 0 skipped, 0 failed.
Details
integration test Build finished. 46 tests run, 0 skipped, 0 failed.
Details
lgtm analysis: JavaScript No alert changes
Details
toolshed test Build finished. 579 tests run, 0 skipped, 0 failed.
Details
@erasche

This comment has been minimized.

Member

erasche commented Oct 3, 2017

All looks good to me. Review comments in IRC were mostly concerned with writing back to source datasets which is not intended as part of tools consuming this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment