galaxy-genome-annotation / python-apollo

Python library for talking to Apollo API
MIT License
11 stars 11 forks source link

Fix metadata test #18

Closed nathandunn closed 4 years ago

nathandunn commented 4 years ago
nathandunn commented 4 years ago

Should be fixed with the Apollo develop branch now.

@abretaud You have to submit the JSON as strings as string, not JSON is native to the Apollo back-end.

abretaud commented 4 years ago

@nathandunn added another test failing: https://github.com/galaxy-genome-annotation/python-apollo/pull/17/commits/c82ad2d728dd85d0b085aa1a3dcae7ecfc6c5b74 = deleting an organism by its id with the remote api

abretaud commented 4 years ago

Another failing test: for some reason when updating an organism in remote mode, publicMode is set to True while it should not: https://github.com/galaxy-genome-annotation/python-apollo/pull/17/commits/b81efaed55a10ca199198c27c4c1b11f3122a857#diff-6ed0ac4ee19d8186384f9c6da0f89f1fR51

abretaud commented 4 years ago

Another test case that fails: when updating an organism with the same fasta but a different directory, sequences are duplicated in the db

(sorry for the flow of bug reports!)

nathandunn commented 4 years ago

Another test case that fails: when updating an organism with the same fasta but a different directory, sequences are duplicated in the db

That is the correct implementation. It duplicates the sequence in the database, since a sequence is owned by an organism.

(sorry for the flow of bug reports!)

Not a problem. I've added them to fix up at the top.

abretaud commented 4 years ago

That is the correct implementation. It duplicates the sequence in the database, since a sequence is owned by an organism.

Arf I didn't know it was implemented like this, did it change or was it always like this? So the annotations are lost? I often want to update an org like this just because I generated a new jbrowse in galaxy with the same reference sequence, but different tracks/display settings Would it be possible (optional?) to reuse the old sequence in the db if they are the same in the new data dir (same name+length)?

nathandunn commented 4 years ago

Arf I didn't know it was implemented like this, did it change or was it always like this? So the annotations are lost? I often want to update an org like this just because I generated a new jbrowse in galaxy with the same reference sequence, but different tracks/display settings Would it be possible (optional?) to reuse the old sequence in the db if they are the same in the new data dir (same name+length)?

I think I was talking about duplicating genomes. I'll add it here: https://github.com/GMOD/Apollo/issues/2293

nathandunn commented 4 years ago

Incorrectly closed this when merging a separate repository (!!!)

nathandunn commented 4 years ago

@abretaud Are you planning on using the travis cache?

nathandunn commented 4 years ago

All tests with local apollo, but still getting failures with the docker versions.

nathandunn commented 4 years ago

@abretaud this works for me locally:

image

__default: local
local:
    url: "http://localhost:8080/apollo"
    username: "admin@local.host"
    password: "password"
nathandunn commented 4 years ago

@abretaud Any ideas why we get the 4 errors from the quay build?

abretaud commented 4 years ago

@nathandunn I think the 2 org deletion errors come from the change in the api at https://github.com/GMOD/Apollo/pull/2298/files#diff-dd23bc0329e522c1d6a07295b706dc1fR53 -> would it be possible to keep the same param name as before? I think it's never desirable to change an api signature, and here I think "organism" is as good as "id" I'll look at the 2 others

nathandunn commented 4 years ago

@nathandunn I think the 2 org deletion errors come from the change in the api at https://github.com/GMOD/Apollo/pull/2298/files#diff-dd23bc0329e522c1d6a07295b706dc1fR53 -> would it be possible to keep the same param name as before? I think it's never desirable to change an api signature, and here I think "organism" is as good as "id" I'll look at the 2 others

I should have backported the changes so it will work with either.

I think what is going on (at least locally for me) is that quay.io not pulling the latest latest image. Even locally its given me an image that is 10 days old. That explains why things were breaking with docker, though working locally.

I'll update the API to provide for both in a bit.

nathandunn commented 4 years ago

@abretaud / @erasche

So good news / bad news.

  1. works against a local Apollo just fine, all tests pass
  2. works against a local DOCKER build just fine (docker build .), all tests pass
  3. fails (4) against an automated docker build against quay.io or docker hub builds of either develop or the tag
  4. works, build locally and pushing up tag (quay.io/gmod/apollo:local-build-test), all tests pass.

I think the problem is that it is pulling an older version (instead of the current has):

https://github.com/GMOD/Apollo/blob/develop/Dockerfile#L24

Created this issue to fix this: https://github.com/GMOD/Apollo/issues/2299

I'm going to re-run this against latest. Not sure why the develop doesn't update on the github site, but its always going to be a version behind regardless.

nathandunn commented 4 years ago

@abretaud So all of the code fixes we did worked, but the docker image being built remotely wasn't getting the newest image. I updated it to use git clone directly (it always pulls off of develop at the moment), but if you have a better idea of a way to do this.

This test should work regardless now.

nathandunn commented 4 years ago

@abretaud I think that this can / should be merged (pending review).

Let me know if there should be further changes.