Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
pass repo_path
  • Loading branch information
mirpedrol committed Dec 2, 2025
commit b8004aa0d2c6ac8559169711dc390d08400f46f2
2 changes: 1 addition & 1 deletion nf_core/components/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def install(self, component: str | dict[str, str], silent: bool = False) -> bool
# Regenerate container configuration files for the pipeline when modules are installed
if self.component_type == "modules":
try:
ContainerConfigs(self.directory).generate_container_configs()
ContainerConfigs(self.directory, self.modules_repo.repo_path).generate_container_configs()
except UserWarning as e:
log.warning(f"Could not regenerate container configuration files: {e}")

Expand Down
2 changes: 1 addition & 1 deletion nf_core/components/remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def remove(self, component, repo_url=None, repo_path=None, removed_by=None, remo
# Regenerate container configuration files for the pipeline when modules are removed
if self.component_type == "modules":
try:
ContainerConfigs(self.directory).generate_container_configs()
ContainerConfigs(self.directory, repo_path).generate_container_configs()
except UserWarning as e:
log.warning(f"Could not regenerate container configuration files: {e}")

Expand Down
2 changes: 1 addition & 1 deletion nf_core/components/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def update(self, component=None, silent=False, updated=None, check_diff_exist=Tr
# Regenerate container configuration files for the pipeline when modules are updated
if self.component_type == "modules":
try:
ContainerConfigs(self.directory).generate_container_configs()
ContainerConfigs(self.directory, modules_repo.repo_path).generate_container_configs()
except UserWarning as e:
log.warning(f"Could not regenerate container configuration files: {e}")
recursive_update = True
Expand Down
5 changes: 4 additions & 1 deletion nf_core/pipelines/containers_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ class ContainerConfigs:

Args:
workflow_directory (str | Path): The directory containing the workflow files.
org (str): Organisation path.
"""

def __init__(
self,
workflow_directory: str | Path = ".",
org: str = "nf-core",
):
self.workflow_directory = Path(workflow_directory)
self.org: str = org

def generate_container_configs(self) -> None:
"""Generate the container configuration files for a pipeline."""
Expand Down Expand Up @@ -97,7 +100,7 @@ def generate_all_container_configs(self, default_config: str) -> None:
module_path = Path(module_name.lower())

try:
with open(self.workflow_directory / "modules" / module_path / "meta.yml") as fh:
with open(self.workflow_directory / "modules" / module_path / self.org / "meta.yml") as fh:
meta = yaml.safe_load(fh)
except FileNotFoundError:
log.warning(f"Could not find meta.yml for {module_name}")
Expand Down
Loading