Skip to content

Conversation

@antgonza
Copy link
Member

In this PR I'm removing all kwargs from methods, generating step 2 of the pipeline (generate per sample files) and adding tests for it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Does this even work? I though that the insdc_status was a controlled vocab, except for the failed: ... status.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure, but at this point I'm just setting this section as it should work and then cleaning as needed. Note that the issue is that there is no tests for this file ... I'm gonna need to add it in a future iteration. Already added it to the joy list: #1451

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, I'm unsure if this function even needs to exist... We probably only want to use the parallel wrapper directly and this function should disappear. However, we will see as the code evolves...

@josenavas
Copy link
Contributor

@antgonza I'm a bit confused about this. IIRC, we agreed on using the ParallelWrapper right? Are you just cleaning up the submit_EBI to just have the 5 steps now and then change it later to make usage of the parallel wrapper? I just want to make sure that we are in the same page.

@antgonza
Copy link
Member Author

5 steps: Yup, same page.

@josenavas
Copy link
Contributor

Thanks @antgonza

Copy link
Contributor

Choose a reason for hiding this comment

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

Just to make sure that I understand what is going on here. Is this else covering the case in which the per sample FASTQ's have been already generated? If so, can you add a comment to make it clear?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done as a Note.

@josenavas
Copy link
Contributor

Few comments.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is needed.

Actually, I just noticed that this test file is unsafe!!! Can you put the class decorator @qiita_test_checker() to the test class, so we avoid to run the test if this a production environment? That decorator will automatically drop the schema after each test, so you don't need to delete the processed data, only the files that it generates.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, made the change but note that I divided the test in readonly and write/read cause without that decorator the test took 0.246s vs. with all the tests with the decorator it took 31.447s so with that split it takes 1.194s.

@josenavas
Copy link
Contributor

Thanks @antgonza 👍
Splitting the tests between read-only and read-write is the way to go to speed up our test suite. I've only done it for the metadata template classes but we have an issue (#1029) to keep track of that. We may need to extend that list to all our tests

@antgonza
Copy link
Member Author

Can this get another review? @ElDeveloper @squirrelo @adamrp

Copy link
Contributor

Choose a reason for hiding this comment

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

Preferably, this should be using path.join instead of string formatting.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@adamrp
Copy link
Contributor

adamrp commented Aug 27, 2015

A few comments, but I think the code looks good. We should think carefully about what we want to do for UPDATEs, because I think they are the trickiest part here.

  • For updates of metadata where none of the samples have been added or removed, I think it is relatively straightforward just to change the action that is passed.
  • For all other updates (where samples are added or removed, or sequence files need to be updated), I believe we cannot actually do the update automatically. However, if we store the proper information in the database (i.e., the EBI aliases for everything that we submit), then we can automatically send an email requesting changes.

@antgonza
Copy link
Member Author

@adamrp, thanks. I have added your comment about update to the joy list: #1451

@antgonza
Copy link
Member Author

antgonza commented Sep 3, 2015

Ping??

Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of just saving the exception message, I would save the whole traceback (for debugging purposes), seems to be something like this:

>>> from traceback import format_exc
>>> try:
...    1/0
... except:
...    x = format_exc()
... 
>>> print x
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
ZeroDivisionError: integer division or modulo by zero

@ElDeveloper
Copy link
Contributor

The whole thing looks good to me, just one more comment and this should be ready for merge.

@adamrp
Copy link
Contributor

adamrp commented Sep 3, 2015

👍

ElDeveloper added a commit that referenced this pull request Sep 3, 2015
@ElDeveloper ElDeveloper merged commit f3a3a61 into qiita-spots:ebi-improvements Sep 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants