Skip to content

Commit

Permalink
Merge pull request #3193 from antgonza/min-fix-for-plugin-testing
Browse files Browse the repository at this point in the history
minimal fix for plugin testing
  • Loading branch information
charles-cowart authored Mar 23, 2022
2 parents fbe1f01 + 51f5351 commit 2a341b5
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions qiita_db/handlers/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,16 @@ class ReloadPluginAPItestHandler(OauthBaseHandler):
def post(self):
"""Reloads the plugins"""
conf_files = sorted(glob(join(qiita_config.plugin_dir, "*.conf")))
for fp in conf_files:
software = qdb.software.Software.from_file(fp, update=True)
software.activate()

software.register_commands()
software = set([qdb.software.Software.from_file(fp, update=True)
for fp in conf_files])
definition = set(
[s for s in software if s.type == 'artifact definition'])
transformation = software - definition
for s in definition:
s.activate()
s.register_commands()
for s in transformation:
s.activate()
s.register_commands()

self.finish()

0 comments on commit 2a341b5

Please sign in to comment.