-
Notifications
You must be signed in to change notification settings - Fork 114
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 Dataset Collections to Object Oriented API #179
Conversation
Not too sure what's causing the checks to fail. I get the same errors with |
@amclean199 Thanks for working on this! I'm coming back from holidays, I hope to help in the next days. The tests fails because of the following PEP-8 error: ./tests/TestGalaxyObjects.py:632:31: E225 missing whitespace around operator |
collections.HistoryDatasetElement(name="sample2", id=dataset2.id), | ||
] | ||
) | ||
return collection_description | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add one more blank line here, flake8 is complaining:
./tests/TestGalaxyObjects.py:653:1: E302 expected 2 blank lines, found 1
Oh okay I see how it works now. Thanks @nsoranzo. I think with that last commit everything for this PR should be ready for review unless I missed anything. |
@@ -16,6 +16,7 @@ | |||
import bioblend.galaxy.objects.wrappers as wrappers | |||
import bioblend.galaxy.objects.galaxy_instance as galaxy_instance | |||
from bioblend import ConnectionError | |||
from bioblend.galaxy import dataset_collections as collections |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you not rename the import? I find it easier to grep the whole name.
You should add |
BASE_ATTRS = Wrapper.BASE_ATTRS + ( | ||
'state', 'deleted' | ||
) | ||
POLLING_INTERVAL = 1 # for state monitoring |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
POLLING_INTERVAL
is unused, can be removed.
return self.gi.histories | ||
|
||
@property | ||
def _stream_url(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is not used and does not make sense for a dataset collection, please remove.
Okay I have made all the changes you have requested but I found a flaw in running workflows with dataset collections. Right now the workflow run method only looks for datasets in the output history on line 456: |
Currently, the object-oriented |
@amaclean199 I'm having a look at this, but please see also related issue #171. |
def tearDown(self): | ||
self.wf.delete() | ||
|
||
@test_util.skip_unless_galaxy('release_14.06') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd move 'release_14.06'
to the class decorator at line 743 and remove this line.
To distinguish between datasets and dataset collections - I'd just look at |
I'm testing this patch which seems to work
|
@nsoranzo Awesome yeah that looks good, works for me too! |
@nsoranzo are you going to push the patch? |
@amaclean199 I'm still checking if everything works on older releases. I can push the patch to your branch if you give permissions to my account or I can open a pull request. |
Okay sounds good you have permissions now. |
Also: - Expose collection_type attribute of DatasetCollection. - Rework new tests.
@amaclean199 Pushed, let's see how the Travis build goes. |
@amaclean199 Build passed, this can be merged if it's ok with you. |
Great, yeah that's fine with me 👍 |
Add Dataset Collections to Object Oriented API
Thanks a lot @amaclean199! |
Not ready for merge, just posting what I have working so far.
Hoping to resolve #162 so that dataset collections can be created and used in workflows with the object oriented API.
The new test to create a dataset collection passes. Next up is to modify
convert_input_map()
or add a different method so that dataset collections can be used as inputs for workflows.