-
Notifications
You must be signed in to change notification settings - Fork 6
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
Get user history #5
Conversation
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.
Cool enhancement, I added a few comments and I think you also need to adjust the setup.py file to install the new binary.
galaxy_ie_helpers/__init__.py
Outdated
hc = HistoryClient(gi) | ||
history = hc.show_history(history_id, visible=True, contents=True) | ||
# I add a None element, to be sure the list has at least 2 elements | ||
# It's neccessary, in the case case where the list give to R, it will |
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.
s/case//
galaxy_ie_helpers/__init__.py
Outdated
# I add a None element, to be sure the list has at least 2 elements | ||
# It's neccessary, in the case case where the list give to R, it will | ||
# be interpreted as a list of list, and not only a list. | ||
history.append(None) |
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 we hack around this on the R side? The None will be confusing I guess for other users of this function.
galaxy_ie_helpers/__init__.py
Outdated
|
||
if __name__ == '__main__': | ||
parser = argparse.ArgumentParser(description='Connect to Galaxy through the API') | ||
parser.add_argument('--action', help='Action to execute', choices=['get', 'put']) | ||
parser.add_argument('--action', help='Action to execute', choices=['get', 'put','get_history_user']) |
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.
get_user_history?
Yes, we can do this on the R side, but the function python.call of rPython library, will return :
On the R side it could look like
This is a bit heavy, but it's imposed by the fact R doesn't handle dictionnary objet as Python (mentioned there I guess you right, I shouldn't have modified the python function to suit R problems, the function has to be the most flexible possible. |
108efa6
to
50deea5
Compare
Hello @bgruening, I have noticed this PR is still open , may be it can be merged if it's ok for you? |
Sorry, forgot about that :( |
Thanks! @erasche is working on a new awesome concept of mounting in entire histories during container start, so this will also make your life easier we hope! |
Hello Björn,
![image](https://user-images.githubusercontent.com/26431997/36725946-47ac9266-1bb8-11e8-855b-7313b0894be8.png)
I take this opportunity (#4) to propose a function
Actually I use this to get the user history ( not a specific dataset). I think it could be useful in case where you want to get the list of all datasets and their names ( and choose only csv,txt etc..) , to display it to the user, and (this is the point) to display it on client side to have a dropdown button for example .
There is the R function to get the dataset and parse for only csv file_type.
It's an shiny use case example :
Once you get v as a named list, you can easely display it as show above. When the user click on the name of his dataset, in fact this is the hid wil be used to get the dataset.