Skip to content

Create analysis from cart #1041

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

Conversation

squirrelo
Copy link
Contributor

This adds the from_default flag to the Analysis object, allowing you to create a new analysis from previously selected samples. This also modifies the analysis creation to use queues.

This pull request relies on #1038 so please merge that one first. Merged. Many of the file changes are from that, only Analysis.create() and the test_analysis_from_default test function were modified in this pull request.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0%) to 79.12% when pulling 36aea60 on squirrelo:create-analysis-from-cart into 2199bdd on biocore:cart-branch.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 79.12% when pulling aabbf17 on squirrelo:create-analysis-from-cart into 79b1101 on biocore:cart-branch.

@squirrelo
Copy link
Contributor Author

Ready for review

dflt_id = owner.default_analysis
sql = """INSERT INTO qiita.{0}
(email, name, description, analysis_status_id)
VALUES (%s, %s, %s, 3)
Copy link
Contributor

Choose a reason for hiding this comment

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

can we avoid hardcoding IDs? We never now when these can change. Using the convert_to_id function should make the trick.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

convert_to_id doesn't currently work with status tables, hence issue #292. I have updated the convert_to_id function to work around the issue for now though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Aaaand that update breaks all the things. Using a specific SQL statement here and tagged with issue ID.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you.

@josenavas
Copy link
Contributor

Just a small comment.

@squirrelo squirrelo force-pushed the create-analysis-from-cart branch from ac92e6a to f06eb57 Compare April 8, 2015 20:20
@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 79.13% when pulling f06eb57 on squirrelo:create-analysis-from-cart into 79b1101 on biocore:cart-branch.

@squirrelo
Copy link
Contributor Author

Changes made and ready for another review.

description, status_id))
# MAGIC NUMBER 3: command selection step
# needed so we skip the sample selection step
sql = """INSERT INTO qiita.analysis_workflow
Copy link
Contributor

Choose a reason for hiding this comment

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

I just noticed this. Why is the analysis_workflow table needed? Is it only handling a column called step, and there is no further control on it, so it looks like that column can be included in the analysis object???

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The table was supposed to be a housekeeping table to track what step the analysis is on and any other things that needed tracking during analysis creation. I guess it turns out we didn't need as much housekeeping as originally thought.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I think we are keeping track of everything else in the multiple tables that build up the analysis and the step just limits what can be done on the analysis. I've created a new issue #1052 and I assigned to beta. Later we can decide to exactly which alpha release it belongs, but I don't think it is either 0.1 or 0.2. Thanks for the feedback!

@josenavas
Copy link
Contributor

@squirrelo just one comment that should not block the PR, but I'd like to get an answer to check if we actually need to open an issue for that, as it looks like that table is not needed at all.
Thanks!

@josenavas
Copy link
Contributor

👍

@squirrelo
Copy link
Contributor Author

Can this get a second reviewer?

@ElDeveloper
Copy link
Contributor

I'll do this in a bit.

ElDeveloper added a commit that referenced this pull request Apr 9, 2015
@ElDeveloper ElDeveloper merged commit c1fc3c8 into qiita-spots:cart-branch Apr 9, 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.

4 participants