Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix running --no-report #2212

Merged
merged 4 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/multiqc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,16 @@ jobs:
cd test_data
multiqc -m star -o tests/multiqc_report_dev -t default_dev -k json --file-list data/special_cases/file_list.txt

- name: No report
if: matrix.python-version == env.latest_python
run: |
cd test_data
multiqc -m star test_data/data/modules/star --no-report -n no-report
if [[ -f no-report.html ]]; then
echo "Running with the --no-report flag should not produce an HTML" >&2
exit 1
fi

- name: Empty directory (confirm no report)
if: matrix.python-version == env.latest_python
run: |
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- Create CODE_OF_CONDUCT.md ([#2195](https://github.com/ewels/MultiQC/pull/2195))
- BCLConvert: fix mean quality, fix count-per-lane barplot ([#2197](https://github.com/ewels/MultiQC/pull/2197))
- Re-add `run()` into the `multiqc` namespace ([#2202](https://github.com/ewels/MultiQC/pull/2202))
- Fix running `--no-report` ([#2212](https://github.com/ewels/MultiQC/pull/2212))

### New Modules

Expand Down
3 changes: 2 additions & 1 deletion multiqc/multiqc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,8 @@ def __rich_measure__(self, console: rich.console.Console, options: rich.console.
)
shutil.rmtree(config.data_tmp_dir)

logger.debug("Full report path: {}".format(os.path.realpath(config.output_fn)))
if config.output_fn is not None:
logger.debug(f"Full report path: {os.path.realpath(config.output_fn)}")

# Copy across the static plot images if requested
if config.export_plots:
Expand Down