Skip to content

Commit

Permalink
Merge branch 'dev' into patch
Browse files Browse the repository at this point in the history
  • Loading branch information
mirpedrol authored Oct 12, 2022
2 parents 87949fb + 5be0720 commit 2bfed71
Show file tree
Hide file tree
Showing 9 changed files with 216 additions and 141 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
### General

- Fix error in tagging GitPod docker images during releases
- Fix bug when updating modules from old version in old folder structure
- Don't remove local copy of modules repo, only update it with fetch ([#1881](https://github.com/nf-core/tools/pull/1881))
- Add subworkflow commands create-test-yml, create and install ([#1897](https://github.com/nf-core/tools/pull/1897))
- Update subworkflows install so it installs also imported modules and subworkflows ([#1904](https://github.com/nf-core/tools/pull/1904))
- `check_up_to_date()` function from `modules_json` also checks for subworkflows.

### Modules

Expand Down
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ A python package with helper tools for the nf-core community.
## Table of contents <!-- omit in toc -->

- [`nf-core` tools installation](#installation)
- [`nf-core` tools update](#update-tools)
- [`nf-core list` - List available pipelines](#listing-pipelines)
- [`nf-core launch` - Run a pipeline with interactive parameter prompts](#launch-a-pipeline)
- [`nf-core download` - Download pipeline for offline use](#downloading-pipelines-for-offline-use)
Expand Down Expand Up @@ -186,6 +187,22 @@ If you would prefer to skip this check, set the environment variable `NFCORE_NO_
export NFCORE_NO_VERSION_CHECK=1
```

### Update tools

It is advisable to keep nf-core/tools updated to the most recent version. The command to update depends on the system used to install it, for example if you have installed it with conda you can use:

```bash
conda update nf-core
```

if you used pip:

```bash
pip install --upgrade nf-core
```

Please refer to the respective documentation for further details to manage packages, as for example [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html#updating-packages) or [pip](https://packaging.python.org/en/latest/tutorials/installing-packages/#upgrading-packages).

## Listing pipelines

The command `nf-core list` shows all available nf-core pipelines along with their latest version, when that was published and how recently the pipeline code was pulled to your local system (if at all).
Expand Down Expand Up @@ -216,7 +233,7 @@ Archived pipelines are not returned by default. To include them, use the `--show
## Launch a pipeline

Some nextflow pipelines have a considerable number of command line flags that can be used.
To help with this, you can use the `nf-core launch` command
To help with this, you can use the `nf-core launch` command.
You can choose between a web-based graphical interface or an interactive command-line wizard tool to enter the pipeline parameters for your run.
Both interfaces show documentation alongside each parameter and validate your inputs.

Expand Down Expand Up @@ -500,7 +517,7 @@ To help developers working with pipeline schema, nf-core tools has three `schema
Nextflow can take input parameters in a JSON or YAML file when running a pipeline using the `-params-file` option.
This command validates such a file against the pipeline schema.

`Usage is `nf-core schema validate <pipeline> <parameter file>`. eg with the pipeline downloaded [above](#download-pipeline), you can run:
Usage is `nf-core schema validate <pipeline> <parameter file>`. eg with the pipeline downloaded [above](#download-pipeline), you can run:

<!-- RICH-CODEX
working_dir: tmp
Expand Down
13 changes: 8 additions & 5 deletions nf_core/modules/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(
self.prompt = prompt
self.sha = sha

def install(self, module):
def install(self, module, silent=False):
if self.repo_type == "modules":
log.error("You cannot install a module in a clone of nf-core/modules")
return False
Expand Down Expand Up @@ -87,7 +87,6 @@ def install(self, module):
# Check that the module is not already installed
if (current_version is not None and os.path.exists(module_dir)) and not self.force:
log.info("Module is already installed.")
print(f"Module {module} is already installed.")

self.force = questionary.confirm(
f"Module {module} is already installed. Do you want to force the reinstallation?",
Expand Down Expand Up @@ -143,10 +142,14 @@ def install(self, module):
if not self.install_module_files(module, version, self.modules_repo, install_folder):
return False

# Print include statement
module_name = "_".join(module.upper().split("/"))
log.info(f"Include statement: include {{ {module_name} }} from '.{os.path.join(install_folder, module)}/main'")
if not silent:
# Print include statement
module_name = "_".join(module.upper().split("/"))
log.info(
f"Include statement: include {{ {module_name} }} from '.{os.path.join(install_folder, module)}/main'"
)

# Update module.json with newly installed module
modules_json.load()
modules_json.update(self.modules_repo, module, version)
return True
Loading

0 comments on commit 2bfed71

Please sign in to comment.