Skip to content
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

Change info message for markdown readme in repo #1398

Merged
merged 3 commits into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions planemo/shed_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,15 @@ def lint_readme(realized_repository, lint_ctx):
if os.path.exists(readme):
readme_found = readme

readme_md = os.path.join(path, "README.md")
bernt-matthias marked this conversation as resolved.
Show resolved Hide resolved
if not readme_found and os.path.exists(readme_md):
lint_ctx.warn("Tool Shed doesn't render markdown, " "README.md is invalid readme.")
return

if not readme_found:
# TODO: filter on TYPE and make this a warning if
# unrestricted repository - need to update iuc standards
# first though.
lint_ctx.info("No README found skipping.")
readme_md = os.path.join(path, "README.md")
if os.path.exists(readme_md):
lint_ctx.info("Found README in Markdown format, which is not rendered by the Tool Shed, skipping")
else:
lint_ctx.info("No README found, skipping.")
return

if readme_found.endswith(".rst"):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_shed_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_invalid_repos(self):
with self._isolate_repo("bad_readme_rst"):
self._check_exit_code(["shed_lint"], exit_code=1)
with self._isolate_repo("bad_readme_md"):
self._check_exit_code(["shed_lint"], exit_code=1)
self._check_exit_code(["shed_lint"], exit_code=0)
with self._isolate_repo("bad_repo_name"):
self._check_exit_code(["shed_lint"], exit_code=1)
with self._isolate_repo("bad_missing_include"):
Expand Down
Loading