diff --git a/CHANGELOG.md b/CHANGELOG.md index bfa98d16e5..5014bc9e16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - Update pre-commit hook astral-sh/ruff-pre-commit to v0.1.15 ([#2705](https://github.com/nf-core/tools/pull/2705)) - fix changelog titles ([#2708](https://github.com/nf-core/tools/pull/2708)) +- Print relative path not absolute path in logo cmd log output ([#2709](https://github.com/nf-core/tools/pull/2709)) ## [v2.12 - Aluminium Wolf](https://github.com/nf-core/tools/releases/tag/2.11) - [2024-01-29] diff --git a/nf_core/__main__.py b/nf_core/__main__.py index 7970c34081..a39c3cf732 100644 --- a/nf_core/__main__.py +++ b/nf_core/__main__.py @@ -174,6 +174,10 @@ def nf_core_cli(ctx, verbose, hide_progress, log_file): ) ) + # don't show rich debug logging in verbose mode + rich_logger = logging.getLogger("rich") + rich_logger.setLevel(logging.INFO) + # Set up logs to a file if we asked for one if log_file: log_fh = logging.FileHandler(log_file, encoding="utf-8") @@ -2068,6 +2072,11 @@ def logo(logo_text, dir, name, theme, width, format, force): if dir == ".": dir = Path.cwd() logo_path = create_logo(logo_text, dir, name, theme, width, format, force) + # Print path to logo relative to current working directory + try: + logo_path = Path(logo_path).relative_to(Path.cwd()) + except ValueError: + logo_path = Path(logo_path) log.info(f"Created logo: [magenta]{logo_path}[/]") except UserWarning as e: log.error(e) diff --git a/nf_core/create_logo.py b/nf_core/create_logo.py index 4dfebd3712..1e96b7032c 100644 --- a/nf_core/create_logo.py +++ b/nf_core/create_logo.py @@ -104,7 +104,7 @@ def create_logo( # Save img.save(logo_path, "PNG") - log.debug(f"Saved logo to: {logo_path}") + log.debug(f"Saved logo to: '{logo_path}'") # Return the logo return logo_path