Skip to content

Fix _almost_ all qiita db tests #1099

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

Merged
merged 8 commits into from
Apr 28, 2015

Conversation

josenavas
Copy link
Contributor

Built on top of #1075

Fixes most of the qiita_db tests. The only tests that are not fixed are the analysis.py tests. The reason is that fixing those tests requires a bit more work and I do not want to blow-up the size of this PR.

@squirrelo
Copy link
Contributor

I thought we agreed that you were going to fix each test file in separate pull requests. This is way too large to review.

@josenavas
Copy link
Contributor Author

This is including all the changes in the previous PR. The actual changes here are minimal...

@squirrelo
Copy link
Contributor

That was not made clear anywhere in the pull request. Please remember to add that information for future pull requests.

@josenavas
Copy link
Contributor Author

Will do, sorry about that. I'll update the description to reflect that.

@josenavas josenavas mentioned this pull request Apr 25, 2015
@josenavas
Copy link
Contributor Author

Just pulled from upstream!

# column names from required_sample_info table
required_cols = set(get_table_cols("required_sample_info"))
# column names from study_sample table
required_cols = set(get_table_cols("study_sample"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check isn't required any more, since all we have in the table now is study id and sample id, correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're correct. Removing! Your feedback on this code is really useful, as I had some problems understanding it...

@squirrelo
Copy link
Contributor

Couple of comments.

exp_samp_sql = ("SELECT r.sample_id,r.host_subject_id FROM "
"qiita.required_sample_info r JOIN qiita.sample_{0} sa"
exp_st_sql = ("SELECT study_id FROM qiita.study_sample_columns "
"WHERE lower(column_name) = lower('host_subject_id') "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need to have lower('host_subject_id') is there?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i.e. there's no need to call lower on that string.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is actually built programmatically, and lowers everything it gets so that search is case-insensitive.

@ElDeveloper
Copy link
Contributor

@josenavas, looks in really good shape, I only had two rather minor comments 👍 on my end granted that @squirrelo's comments are addressed.

@josenavas
Copy link
Contributor Author

Thanks guys, ready for another round!

@ElDeveloper
Copy link
Contributor

👍

@ElDeveloper
Copy link
Contributor

@squirrelo, would you mind merging if all looks good to you?

@squirrelo
Copy link
Contributor

I'm getting "Internal Server Error, please try again later" When using search now. Can you look into this and fix it?

@squirrelo
Copy link
Contributor

Nevermind, local system issue. Merging.

squirrelo added a commit that referenced this pull request Apr 28, 2015
@squirrelo squirrelo merged commit b26a867 into qiita-spots:relax-md-req Apr 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants