Skip to content

Commit

Permalink
Merge branch 'release_18.01' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
martenson committed Feb 12, 2018
2 parents e58aaef + aefe0e1 commit 201d765
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/tool_shed/tools/tool_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def load_tool_from_config(self, repository_id, full_path):
tool_location_fetcher=ToolLocationFetcher(),
)
try:
tool = create_tool_from_source(config_file=full_path, app=self.app, tool_source=tool_source, repository_id=repository_id)
tool = create_tool_from_source(config_file=full_path, app=self.app, tool_source=tool_source, repository_id=repository_id, allow_code_files=False)
valid = True
error_message = None
except KeyError as e:
Expand Down
12 changes: 6 additions & 6 deletions templates/webapps/galaxy/workflow/sharing.mako
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
</blockquote>
%if item.published:
This ${item_class_name_lc} is publicly listed and searchable in Galaxy's <a href='${h.url_for( controller=controller_name, action='list_published' )}' target="_top">Published ${item_class_plural_name}</a> section.
This ${item_class_name_lc} is publicly listed and searchable in Galaxy's <a href='${h.url_for('/workflows/list_published')}' target="_top">Published ${item_class_plural_name}</a> section.
%endif
</div>
<div>
Expand All @@ -160,15 +160,15 @@
<div class="toolParamHelp">Disables ${item_class_name_lc}'s link so that it is not accessible.</div>
<br />
<input class="action-button" type="submit" name="publish" value="Publish ${item_class_name}" method="POST">
<div class="toolParamHelp">Publishes the ${item_class_name_lc} to Galaxy's <a href='${h.url_for( controller=controller_name, action='list_published' )}' target="_top">Published ${item_class_plural_name}</a> section, where it is publicly listed and searchable.</div>
<div class="toolParamHelp">Publishes the ${item_class_name_lc} to Galaxy's <a href='${h.url_for('/workflows/list_published')}' target="_top">Published ${item_class_plural_name}</a> section, where it is publicly listed and searchable.</div>
<br />
%else: ## item.published == True
## Item is importable and published. User can unpublish or disable import and unpublish.
<input class="action-button" type="submit" name="unpublish" value="Unpublish ${item_class_name}">
<div class="toolParamHelp">Removes this ${item_class_name_lc} from Galaxy's <a href='${h.url_for(controller=controller_name, action='list_published' )}' target="_top">Published ${item_class_plural_name}</a> section so that it is not publicly listed or searchable.</div>
<div class="toolParamHelp">Removes this ${item_class_name_lc} from Galaxy's <a href='${h.url_for('/workflows/list_published')}' target="_top">Published ${item_class_plural_name}</a> section so that it is not publicly listed or searchable.</div>
<br />
<input class="action-button" type="submit" name="disable_link_access_and_unpublish" value="Disable Access to ${item_class_name} via Link and Unpublish">
<div class="toolParamHelp">Disables this ${item_class_name_lc}'s link so that it is not accessible and removes ${item_class_name_lc} from Galaxy's <a href='${h.url_for(controller=controller_name, action='list_published' )}' target='_top'>Published ${item_class_plural_name}</a> section so that it is not publicly listed or searchable.</div>
<div class="toolParamHelp">Disables this ${item_class_name_lc}'s link so that it is not accessible and removes ${item_class_name_lc} from Galaxy's <a href='${h.url_for('/workflows/list_published')}' target='_top'>Published ${item_class_plural_name}</a> section so that it is not publicly listed or searchable.</div>
%endif
</form>
</div>
Expand All @@ -181,7 +181,7 @@
<br />
<input class="action-button" type="submit" name="make_accessible_and_publish" value="Make ${item_class_name} Accessible and Publish" method="POST">
<div class="toolParamHelp">
Makes the ${item_class_name_lc} accessible via link (see above) and publishes the ${item_class_name_lc} to Galaxy's <a href='${h.url_for(controller=controller_name, action='list_published' )}' target='_top'>Published ${item_class_plural_name}</a> section, where it is publicly listed and searchable.
Makes the ${item_class_name_lc} accessible via link (see above) and publishes the ${item_class_name_lc} to Galaxy's <a href='${h.url_for('/workflows/list_published')}' target='_top'>Published ${item_class_plural_name}</a> section, where it is publicly listed and searchable.
</div>
</form>
%endif
Expand Down Expand Up @@ -262,7 +262,7 @@
</%def>

<%def name="render_header()">
<a href="${h.url_for(controller=self.controller, action="list" )}">Go back to ${self.item_class_plural_name} List</a>
<a href="${h.url_for('/workflows/list')}">Go back to ${self.item_class_plural_name} List</a>
</%def>


Expand Down
8 changes: 8 additions & 0 deletions test/unit/tools/test_tool_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ def test_validate_valid_tool():
assert message is None


def test_tool_validation_denies_allow_codefile():
with get_tool_validator() as tv, setup_bismark() as repo_dir:
full_path = os.path.join(repo_dir, 'bismark_methylation_extractor.xml')
tool, valid, message = tv.load_tool_from_config(repository_id=None,
full_path=full_path)
assert tool._allow_code_files is False


def test_validate_tool_without_index():
with get_tool_validator() as tv, setup_bismark() as repo_dir:
full_path = os.path.join(repo_dir, 'bismark_bowtie2_wrapper.xml')
Expand Down

0 comments on commit 201d765

Please sign in to comment.