Skip to content

Commit

Permalink
Merge branch 'dev' into test-template-customisation
Browse files Browse the repository at this point in the history
  • Loading branch information
ewels authored Sep 1, 2024
2 parents 5b9eff5 + 3d475d5 commit 8fb9982
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
- Linting will now check if the schema is correct for the used validation plugin ([#3116])(https://github.com/nf-core/tools/pull/3116)
- Linting will now check the use of the right validation plugin include statements in the workflow scripts ([#3116])(https://github.com/nf-core/tools/pull/3116)
- Full linting for correct use of nf-schema and nf-validation ([#3116](https://github.com/nf-core/tools/pull/3116))
- Handle cases where the directory path contains the name of the component ([#3147](https://github.com/nf-core/tools/pull/3147))

### Pipeline create command

Expand Down
7 changes: 6 additions & 1 deletion nf_core/components/nfcore_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ def __init__(
self.process_name = ""
self.environment_yml: Optional[Path] = Path(self.component_dir, "environment.yml")

repo_dir = self.component_dir.parts[: self.component_dir.parts.index(self.component_name.split("/")[0])][-1]
name_index = (
len(self.component_dir.parts)
- 1
- self.component_dir.parts[::-1].index(self.component_name.split("/")[0])
)
repo_dir = self.component_dir.parts[:name_index][-1]
self.org = repo_dir
self.nftest_testdir = Path(self.component_dir, "tests")
self.nftest_main_nf = Path(self.nftest_testdir, "main.nf.test")
Expand Down

0 comments on commit 8fb9982

Please sign in to comment.