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

better logging if directory not correctly specified #942

Merged
merged 3 commits into from
Mar 23, 2021
Merged
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
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,8 +2,8 @@

## v1.13.2dev

### Tools code

* Added better logging message if a user doesn't specificy the directory correctly with `nf-core modules` commands [[#942](https://github.com/nf-core/tools/pull/942)]
* Fixed parameter validation bug caused by JSONObject [[#937](https://github.com/nf-core/tools/issues/937)]
* Split the `create-lint-wf` tests up into separate steps in GitHub Actions to make the CI results easier to read
* Added automated PR comments to the Markdownlint and Python Black lint CI tests to explain failures

5 changes: 4 additions & 1 deletion nf_core/modules/create.py
Original file line number Diff line number Diff line change
@@ -251,7 +251,10 @@ def get_repo_type(self, directory):
elif os.path.exists(os.path.join(directory, "software")):
return "modules"
else:
raise UserWarning(f"Could not determine repository type: '{directory}'")
raise UserWarning(
f"This directory does not look like a clone of nf-core/modules or an nf-core pipeline: '{directory}'"
" Please point to a valid directory."
)

def get_module_dirs(self):
"""Given a directory and a tool/subtool, set the file paths and check if they already exist