-
Notifications
You must be signed in to change notification settings - Fork 80
List proc data in search #1039
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
List proc data in search #1039
Conversation
Note: most of the changes seen here are because of the merge in of #1038. Only qiita_pet/handlers/study_handlers/listing_handlers.py and qiita_pet/handlers/templates/study_list.html have changed dramatically in the pull request. |
…ist-proc-data-in-search
Ready for review. |
proc_samples : dict of lists | ||
Dictionary keyed on proc_data_id that lists all samples associated with | ||
that processed data. | ||
|
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.
Missing the return description.
@squirrelo there is a need for title in the end cell arrow for each row. When I open the page, I did not know what that means (and the fact that is explain here does not help, as users will not see the PR message). Something like available processed data or a title that indicates what that arrow does is useful. Also, there is a bug at some place:
I'm using the database created by |
Looks like it can't handle when there are no studies or proc data available. Good catch. |
Thi is only failing due to the weird longitude test bug, so ready for review again. |
@squirrelo I see 18 files changed, is that correct? I just updated the |
I think it's a merge issue, I'll double check |
…ist-proc-data-in-search
Yup, merge issue, ready for review. |
Awesome! Thanks for checking! Reviewing right now 😄 |
Ready for review again |
del info["principal_investigator_id"] | ||
del info["email"] | ||
# Build the proc data info list for the child row in datatable | ||
info["proc_data_info"] = _build_single_proc_data_info( |
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.
Thanks for moving this here!
Just one more comment @squirrelo |
study : Study object | ||
The study to build information for | ||
info : dict | ||
Information from Study.get_info |
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.
The last two arguments are missing here.
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.
added
Ready with a "static review", overall very minor comments, haven't had a chance to test with a working system as I blew up my "demo" environment. Does anyone have a "commands.sh" file and the data to add the EMP studies to the system? I'm getting a bunch of errors due to columns not complying to the required data-types. |
Otherwise can someone else review this? |
Suggestions added, ready to go. |
Thanks, can someone review (and finally merge) this on their system or share the files for me to review/load this in my system? It would be a matter of going through the interface as this has already been reviewed by @josenavas and me. |
It looks great dude! This exception came up when I tried to search based on a metadata filed in the studies page: ================================================================================
Time: 2015-04-14 11:47:30.252444
Message:
ERROR:
Error running SQL query: SELECT EXISTS(SELECT * FROM qiita.processed_data WHERE processed_data_id=%s)
ARGS: ('18S',)
Error: invalid input syntax for integer: "18S"
LINE 1: ...T * FROM qiita.processed_data WHERE processed_data_id='18S')
^
TRACE:
Traceback (most recent call last):
File "/Users/yoshikivazquezbaeza/.virtualenvs/qiita/lib/python2.7/site-packages/tornado/web.py", line 1141, in _when_complete
callback()
File "/Users/yoshikivazquezbaeza/.virtualenvs/qiita/lib/python2.7/site-packages/tornado/web.py", line 1162, in _execute_method
self._when_complete(method(*self.path_args, **self.path_kwargs),
File "/Users/yoshikivazquezbaeza/.virtualenvs/qiita/lib/python2.7/site-packages/tornado/web.py", line 2297, in wrapper
return method(self, *args, **kwargs)
File "/Users/yoshikivazquezbaeza/git_sw/qiita/qiita_pet/handlers/study_handlers/listing_handlers.py", line 299, in get
proc_samples=proc_samples)
File "/Users/yoshikivazquezbaeza/git_sw/qiita/qiita_pet/handlers/study_handlers/listing_handlers.py", line 180, in _build_study_info
study, study_proc, proc_samples)
File "/Users/yoshikivazquezbaeza/git_sw/qiita/qiita_pet/handlers/study_handlers/listing_handlers.py", line 104, in _build_single_proc_data_info
proc_data = ProcessedData(pid)
File "/Users/yoshikivazquezbaeza/git_sw/qiita/qiita_db/base.py", line 154, in __init__
if not self._check_id(id_):
File "/Users/yoshikivazquezbaeza/git_sw/qiita/qiita_db/base.py", line 140, in _check_id
"{0}_id=%s)".format(self._table), (id_, ))[0]
File "/Users/yoshikivazquezbaeza/git_sw/qiita/qiita_db/sql_connection.py", line 486, in execute_fetchone
with self._sql_executor(sql, sql_args) as pgcursor:
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/Users/yoshikivazquezbaeza/git_sw/qiita/qiita_db/sql_connection.py", line 303, in _sql_executor
(sql, str(sql_args), e)))
QiitaDBExecutionError:
Error running SQL query: SELECT EXISTS(SELECT * FROM qiita.processed_data WHERE processed_data_id=%s)
ARGS: ('18S',)
Error: invalid input syntax for integer: "18S"
LINE 1: ...T * FROM qiita.processed_data WHERE processed_data_id='18S')
^
HTTP INFO:
<strong>body</strong>:
<strong>files</strong>: {}
<strong>protocol</strong>: http
<strong>connection</strong>: <tornado.httpserver.HTTPConnection object at 0x10a651050>
<strong>uri</strong>: /study/search/?&user=test@foo.bar&sEcho=112&query=study_title%20includes%20%22soil%22&_=1429033642672
<strong>_start_time</strong>: 1429033649.39
<strong>headers</strong>: {'Accept-Language': 'en-us', 'Accept-Encoding': 'gzip, deflate', 'X-Requested-With': 'XMLHttpRequest', 'Connection': 'keep-alive', 'Accept': 'application/json, text/javascript, */*; q=0.01', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/601.1.27+ (KHTML, like Gecko) Version/8.0.5 Safari/600.5.17', 'Host': 'localhost:1111', 'Cookie': 'user="InRlc3RAZm9vLmJhciI=|1429033402|3efbd25c076741d3cceedf0d8c66ce026b070a6b"', 'Referer': 'http://localhost:1111/study/list/'}
<strong>host</strong>: localhost:1111
<strong>version</strong>: HTTP/1.1
<strong>arguments</strong>: {'query': ['study_title includes "soil"'], 'user': ['test@foo.bar'], '_': ['1429033642672'], 'sEcho': ['112']}
<strong>_finish_time</strong>: 1429033650.24
<strong>query</strong>: &user=test@foo.bar&sEcho=112&query=study_title%20includes%20%22soil%22&_=1429033642672
<strong>path</strong>: /study/search/
<strong>_cookies</strong>: Set-Cookie: user="InRlc3RAZm9vLmJhciI=|1429033402|3efbd25c076741d3cceedf0d8c66ce026b070a6b"
<strong>method</strong>: GET
<strong>remote_ip</strong>: ::1
Info: |
Thanks @ElDeveloper, was a problem with dict formatting without searches. Fixed |
Thanks @squirrelo |
This adds the processed data listings to the study listings so you can select by processed data when creating an analysis. You can look at this by going to the study listing page and expanding rows using the end cell arrow for each row.
This requires the previous pull request (#1038) to be merged first.Merged.