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

Feature request: create modules dir when it doesn't exist #2563

Closed
krokicki opened this issue Dec 8, 2023 · 0 comments
Closed

Feature request: create modules dir when it doesn't exist #2563

krokicki opened this issue Dec 8, 2023 · 0 comments
Assignees

Comments

@krokicki
Copy link
Contributor

krokicki commented Dec 8, 2023

Description of feature

When installing modules into a non-nf-core pipeline, you have to create an empty modules directory manually, otherwise you get this rather unfriendly error:

ERROR    Can't find a ./modules directory. Is this a DSL2 pipeline?
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮

...

│ dules/modules_json.py:70 in create                                                               │
│                                                                                                  │
│     67 │   │   new_modules_json = {"name": pipeline_name.strip("'"), "homePage": pipeline_url.s  │
│     68 │   │                                                                                     │
│     69 │   │   if not self.modules_dir.exists():                                                 │
│ ❱   70 │   │   │   raise UserWarning("Can't find a ./modules directory. Is this a DSL2 pipeline  │
│     71 │   │                                                                                     │
│     72 │   │   # Get repositories                                                                │
│     73 │   │   repos, _ = self.get_pipeline_module_repositories("modules", self.modules_dir)     │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
UserWarning: Can't find a ./modules directory. Is this a DSL2 pipeline?

It would be nice if the directory was just created automatically. It would make it easier to install modules and subworkflows in non-nf-core contexts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants