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
Adds missing bits #1960
Adds missing bits #1960
Conversation
Changes Unknown when pulling c86d37d on josenavas:plugin-installation-activate-cmd into * on biocore:plugin-installation*. |
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.
A few comments.
self.finish() | ||
|
||
|
||
class ReloadPluginAPItestHandler(OauthBaseHandler): |
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.
This is missing a test, right?
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.
Added
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 this method idempotent? if not, should it be?
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.
same question regarding CommandActivateHandler
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.
This method is idempotent as long as the files in qiita_config.plugin_dir
do not change.
CommandActivateHandler
is idempotent.
@@ -281,6 +284,17 @@ def create(cls, software, name, description, parameters): | |||
for at in atypes] | |||
qdb.sql_connection.TRN.add(sql_type, sql_params, many=True) | |||
|
|||
# Add the outputs to the command | |||
if outputs: |
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.
Just want to confirm that now there are no tests without output. I think is fine due to how it work but want to double check it.
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.
Added
@@ -425,6 +439,31 @@ def outputs(self): | |||
qdb.sql_connection.TRN.add(sql, [self.id]) | |||
return qdb.sql_connection.TRN.execute_fetchindex() | |||
|
|||
@property | |||
def active(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.
This doesn't have an actual tests, right?
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.
I tested it through the function test_activate
so it is implicitly tested.
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.
K
Changes Unknown when pulling afc8707 on josenavas:plugin-installation-activate-cmd into * on biocore:plugin-installation*. |
👍 , @wasade, could you review? Thanks. |
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.
few comments
The list filepath types that the new artifact type supports, and | ||
if they're required or not in an artifact instance of this type | ||
|
||
Raises |
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 the only type of unacceptable artifact a duplicate one?
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.
This is creating a new artifact type (not a new artifact) and I couldn't think in any other case where a new type is unacceptable.
self.finish() | ||
|
||
|
||
class ReloadPluginAPItestHandler(OauthBaseHandler): |
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 this method idempotent? if not, should it be?
self.finish() | ||
|
||
|
||
class ReloadPluginAPItestHandler(OauthBaseHandler): |
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.
same question regarding CommandActivateHandler
|
||
obs = qdb.artifact.Artifact.types() | ||
exp = [['BIOM', 'BIOM table'], | ||
['Demultiplexed', 'Demultiplexed and QC sequeneces'], |
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.
typo in sequences
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.
Good catch, opened #1961 cause this is a larger issue.
(r"/qiita_db/artifacts/(.*)/", ArtifactHandler), | ||
(r"/qiita_db/prep_template/(.*)/data/", PrepTemplateDataHandler), | ||
(r"/qiita_db/prep_template/(.*)/", PrepTemplateDBHandler), | ||
(r"/qiita_db/references/(.*)/", ReferenceHandler), | ||
(r"/qiita_db/plugins/(.*)/(.*)/commands/(.*)/activate/", |
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.
just curious, why not do named regex? eg ?P<foo>[^/]+/?P<bar>[^/]+/
?
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.
I'm not sure what is the benefit?
@wasade thanks for review. Merging so we can continue reviews. |
Adds the missing code to be able to successfully install commands and types and adds some endpoints so the plugins can correctly run the tests.