-
Notifications
You must be signed in to change notification settings - Fork 80
Transfer copy raw data #2267
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
antgonza
merged 14 commits into
qiita-spots:remove-moi
from
josenavas:transfer-copy-raw-data
Aug 31, 2017
Merged
Transfer copy raw data #2267
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a47c13b
Move qiita_db/private.py -> qiita_ware/private_plugin.py
josenavas c16b177
Transferring VAMPS submission to internal job
josenavas 58cd5ae
Merge branch 'remove-moi' of https://github.com/biocore/qiita into tr…
josenavas 263f956
Solving merge conflicts
josenavas efa1924
Merge branch 'transfer-submit-to-vamps' into transfer-copy-raw-data
josenavas 4f43236
Fixing merge conflicts
josenavas a528e04
Adding tests to private plugin
josenavas 0bf7307
Removing import
josenavas 6ee9022
Fixing import
josenavas c13e8bd
Merge branch 'transfer-submit-to-vamps' into transfer-copy-raw-data
josenavas c3bc77c
Modifying GUI to use the plugin
josenavas 10d8cfd
Fixing import
josenavas 044e562
Merge branch 'remove-moi' of https://github.com/biocore/qiita into tr…
josenavas f2a12c6
Adding success test
josenavas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# ----------------------------------------------------------------------------- | ||
# Copyright (c) 2014--, The Qiita Development Team. | ||
# | ||
# Distributed under the terms of the BSD 3-clause License. | ||
# | ||
# The full license is in the file LICENSE, distributed with this software. | ||
# ----------------------------------------------------------------------------- | ||
|
||
from unittest import TestCase, main | ||
|
||
from qiita_core.util import qiita_test_checker | ||
from qiita_db.software import Software, Parameters | ||
from qiita_db.processing_job import ProcessingJob | ||
from qiita_db.user import User | ||
from qiita_ware.private_plugin import private_task | ||
|
||
|
||
@qiita_test_checker() | ||
class TestPrivatePlugin(TestCase): | ||
def _create_job(self, cmd, values_dict): | ||
user = User('test@foo.bar') | ||
qiita_plugin = Software.from_name_and_version('Qiita', 'alpha') | ||
cmd = qiita_plugin.get_command('copy_artifact') | ||
params = Parameters.load(cmd, values_dict=values_dict) | ||
job = ProcessingJob.create(user, params) | ||
job._set_status('queued') | ||
return job | ||
|
||
def test_copy_artifact(self): | ||
job = self._create_job('copy_artifact', | ||
{'artifact': 1, 'prep_template': 1}) | ||
|
||
private_task(job.id) | ||
self.assertEqual(job.status, 'error') | ||
self.assertIn("Prep template 1 already has an artifact associated", | ||
job.log.msg) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
is it possible to add a test for success?