-
Notifications
You must be signed in to change notification settings - Fork 80
Start improving search #988
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
Conversation
@antgonza @adamrp @ElDeveloper This is ready for review, and needs to be merged before some work on #900 can continue. |
Changes Unknown when pulling 3d29605 on squirrelo:start-improving-search into * on biocore:master*. |
This isn't actually failing, but for some reason the following failure happense infrequently (see how the other test session passed) ======================================================================
FAIL: test_categories (qiita_db.test.test_metadata_template.DecoratedClass)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/biocore/qiita/qiita_db/test/test_metadata_template.py", line 1311, in test_categories
self.assertEqual(obs, exp)
AssertionError: Items in the second set but not the first:
'longitude' I've opened issue for it |
@@ -1144,6 +1144,21 @@ def study(self): | |||
"processed_data_id=%s".format(self._study_processed_table), | |||
[self._id])[0] | |||
|
|||
@property | |||
def samples(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.
Change this function to make use of a single SQL query. Right now is executing at least 4.
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.
Ah, this is a vestige of the old way of finding processed data samples. Do we want to keep this function still?
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.
If you don't need this property, why are you adding it here? Remove then.
@squirrelo few comments |
thanks @squirrelo pulled down and it looks like works correctly. |
Also @antgonza note the demo DB you have is not consistent and will not work with this pull request because of that. There are missing prep tables referenced, etc. |
Thanks, I fixed those when @josenavas added queues for submission.
|
I just noticed that @squirrelo closed the other PR. Anyways, the changes done in here limit the metadata columns, so this PR cannot be merged until the columns are limited in the metadata template and a data patch is in place to fix the existing templates |
(column_name = 'study_id' OR column_name = 'processed_data_id')""" | ||
|
||
tables = [c[0] for c in conn_handler.execute_fetchall(sql)] | ||
for t in tables: |
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.
It is not ok to drop the columns, as you don't know which data are those columns holding. Please re-name the column names.
@squirrelo one more comment |
627f758
to
f8d3fce
Compare
Thanks @squirrelo |
Nop, :'(
|
Nop that you can't try or nop it didn't fix the issue? |
didn't fix the issue.
|
Same error or new error? |
@antgonza did you apply the patch? |
@squirrelo just noticed that the patch is not complete. You need to re-generate the filepaths for those sample/prep templates that changed and the QIIME mapping file. Check patch num 14 to see how it's done. |
Given the increasing complexity of this pull request and the offline discussion about the schema changes that will have a drastic effect on this pull request, I'm closing this for now. |
This puts base changes in place to make the search object more easily extendable. It also breaks the computational part of searches into qiita_ware, and centralizes the search stuff into qiita_ware as a passthrough and computational work.
Additionally, it allows searching over prep template data and data-type of processed data.