Skip to content

Commit

Permalink
Merge pull request #2199 from nf-core/rm-mulled
Browse files Browse the repository at this point in the history
refactor: remove the mulled command and all related code
  • Loading branch information
mirpedrol authored Apr 5, 2023
2 parents 5e1de21 + 1bde222 commit f1fc15b
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 195 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
### Modules

- Add an `--empty-template` option to create a module without TODO statements or examples ([#2175](https://github.com/nf-core/tools/pull/2175) & [#2177](https://github.com/nf-core/tools/pull/2177))
- Removed the `nf-core modules mulled` command and all its code dependencies ([2199](https://github.com/nf-core/tools/pull/2199)).

### Subworkflows

Expand Down
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ A python package with helper tools for the nf-core community.
- [`modules lint` - Check a module against nf-core guidelines](#check-a-module-against-nf-core-guidelines)
- [`modules test` - Run the tests for a module](#run-the-tests-for-a-module-using-pytest)
- [`modules bump-versions` - Bump software versions of modules](#bump-bioconda-and-container-versions-of-modules-in)
- [`modules mulled` - Generate the name for a multi-tool container image](#generate-the-name-for-a-multi-tool-container-image)

- [`nf-core subworkflows` - commands for dealing with subworkflows](#subworkflows)
- [`subworkflows list` - List available subworkflows](#list-subworkflows)
Expand Down Expand Up @@ -972,17 +971,6 @@ bump-versions:
star/align: "2.6.1d"
```

### Generate the name for a multi-tool container image

When you want to use an image of a multi-tool container and you know the specific dependencies and their versions of that container, for example, by looking them up in the [BioContainers hash.tsv](https://github.com/BioContainers/multi-package-containers/blob/master/combinations/hash.tsv), you can use the `nf-core modules mulled` helper tool. This tool generates the name of a BioContainers mulled image.

<!-- RICH-CODEX
working_dir: tmp/modules
after_command: cd ../../ && rm -rf tmp
-->

![`nf-core modules mulled pysam==0.16.0.1 biopython==1.78`](docs/images/nf-core-modules-mulled.svg)

## Subworkflows

After the launch of nf-core modules, we can provide now also nf-core subworkflows to fully utilize the power of DSL2 modularization.
Expand Down
45 changes: 1 addition & 44 deletions nf_core/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
},
{
"name": "Developing new modules",
"commands": ["create", "create-test-yml", "lint", "bump-versions", "mulled", "test"],
"commands": ["create", "create-test-yml", "lint", "bump-versions", "test"],
},
],
"nf-core subworkflows": [
Expand Down Expand Up @@ -875,49 +875,6 @@ def bump_versions(ctx, tool, dir, all, show_all):
sys.exit(1)


# nf-core modules mulled
@modules.command()
@click.argument("specifications", required=True, nargs=-1, metavar="<tool==version> <...>")
@click.option(
"--build-number",
type=int,
default=0,
show_default=True,
metavar="<number>",
help="The build number for this image. This is an incremental value that starts at zero.",
)
def mulled(specifications, build_number):
"""
Generate the name of a BioContainers mulled image version 2.
When you know the specific dependencies and their versions of a multi-tool container image and you need the name of
that image, this command can generate it for you.
"""
from nf_core.modules.mulled import MulledImageNameGenerator

try:
image_name = MulledImageNameGenerator.generate_image_name(
MulledImageNameGenerator.parse_targets(specifications), build_number=build_number
)
except ValueError as e:
log.error(e)
sys.exit(1)
if not MulledImageNameGenerator.image_exists(image_name):
log.error("The generated multi-tool container image name does not seem to exist yet.")
log.info(
"Please double check that your provided combination of tools and versions exists in the file: "
"[link=https://github.com/BioContainers/multi-package-containers/blob/master/combinations/hash.tsv]BioContainers/multi-package-containers 'combinations/hash.tsv'[/link]"
)
log.info(
"If it does not, please add your desired combination as detailed at: "
"https://github.com/BioContainers/multi-package-containers"
)
sys.exit(1)
log.info("Mulled container hash:")
stdout.print(image_name)


# nf-core modules test
@modules.command("test")
@click.pass_context
Expand Down
1 change: 0 additions & 1 deletion nf_core/modules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from .modules_repo import ModulesRepo
from .modules_test import ModulesTest
from .modules_utils import ModuleException
from .mulled import MulledImageNameGenerator
from .patch import ModulePatch
from .remove import ModuleRemove
from .test_yml_builder import ModulesTestYmlBuilder
Expand Down
72 changes: 0 additions & 72 deletions nf_core/modules/mulled.py

This file was deleted.

1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
click
filetype
galaxy-tool-util
GitPython
jinja2
jsonschema>=3.0
Expand Down
65 changes: 0 additions & 65 deletions tests/test_mulled.py

This file was deleted.

0 comments on commit f1fc15b

Please sign in to comment.