-
Notifications
You must be signed in to change notification settings - Fork 718
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into usearch/unoise3
- Loading branch information
Showing
5,482 changed files
with
157,340 additions
and
77,652 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Update module | ||
description: Update a module in nf-core/modules | ||
title: "update module: TOOL/SUBTOOL" | ||
labels: update module | ||
body: | ||
- type: checkboxes | ||
attributes: | ||
label: Is there an existing module for this? | ||
description: This module already exists with the [`nf-core modules list`](https://github.com/nf-core/tools#list-modules) command | ||
options: | ||
- label: I have searched for the existing module | ||
required: true | ||
|
||
- type: checkboxes | ||
attributes: | ||
label: Is there an open PR for this? | ||
description: There is no [open pull request](https://github.com/nf-core/modules/pulls) for this module | ||
options: | ||
- label: I have searched for existing PRs | ||
required: true | ||
|
||
- type: checkboxes | ||
attributes: | ||
label: Is there an open issue for this? | ||
description: There is no [open issue](https://github.com/nf-core/modules/issues) for this module | ||
options: | ||
- label: I have searched for existing issues | ||
required: true | ||
|
||
- type: checkboxes | ||
attributes: | ||
label: Are you going to work on this? | ||
description: If I'm planning to work on this module, I added myself to the `Assignees` to facilitate tracking who is working on the module | ||
options: | ||
- label: If I'm planning to work on this module, I added myself to the `Assignees` to facilitate tracking who is working on the module | ||
required: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
#!/usr/bin/env -S uv run | ||
# /// script | ||
# requires-python = ">=3.10" | ||
# dependencies = [ | ||
# "requests", | ||
# "rich", | ||
# ] | ||
# /// | ||
|
||
import logging | ||
|
||
import requests | ||
import rich_click as click | ||
from rich.logging import RichHandler | ||
|
||
# Replace the basic logger setup with rich logging | ||
logging.basicConfig( | ||
level=logging.INFO, | ||
format="%(message)s", | ||
handlers=[ | ||
RichHandler( | ||
rich_tracebacks=True, | ||
show_time=False, | ||
markup=True, | ||
) | ||
], | ||
) | ||
logger = logging.getLogger(__name__) | ||
click.rich_click.SHOW_ARGUMENTS = True | ||
|
||
|
||
@click.command() | ||
@click.option( | ||
"--platform-pat", | ||
envvar="SEQERA_ACCESS_TOKEN", | ||
show_envvar=True, | ||
help="Platform authentication token", | ||
) | ||
@click.argument("image_name") | ||
def main(image_name, platform_pat): | ||
"""Script to return a HTTPS Singularity image URL from Seqera Containers.""" | ||
|
||
if image_name.startswith("oras://"): | ||
image_name = image_name.replace("oras://", "") | ||
|
||
wave_api_url_base = "https://wave.seqera.io" | ||
wave_api_url = f"{wave_api_url_base}/v1alpha1/inspect" | ||
container_url_base = "https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256" | ||
|
||
request_data = {"containerImage": image_name} | ||
if platform_pat: | ||
request_data["toweraccesstoken"] = platform_pat | ||
else: | ||
logger.debug("'--platform-pat' / '$TOWER_ACCESS_TOKEN' not set, no auth to wave back end") | ||
|
||
try: | ||
logger.debug(f"Calling image inspect at {wave_api_url} for image url '{image_name}'") | ||
response = requests.post( | ||
url=wave_api_url, | ||
json=request_data, | ||
headers={"content-type": "application/json"}, | ||
) | ||
|
||
data = response.json() | ||
logger.debug(data) | ||
layers = data.get("container", {}).get("manifest", {}).get("layers", []) | ||
is_singularity = len(layers) == 1 and layers[0].get("mediaType", "").endswith(".sif") | ||
logger.debug(layers) | ||
if not is_singularity: | ||
raise ValueError("Not a singularity image") | ||
if "digest" not in layers[0]: | ||
raise ValueError("no 'digest' in first layer found") | ||
|
||
digest = layers[0]["digest"].replace("sha256:", "") | ||
container_url = f"{container_url_base}/{digest[:2]}/{digest}/data" | ||
print(container_url) | ||
|
||
except requests.RequestException as exc: | ||
raise ValueError(f"An error occurred while requesting {wave_api_url}\n {exc}") | ||
|
||
|
||
if __name__ == "__main__": | ||
try: | ||
main() | ||
except ValueError as exc: | ||
logger.error(f"[red]{exc}[/red]") | ||
exit(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.