Skip to content

Commit

Permalink
Fix running --no-report (#2212)
Browse files Browse the repository at this point in the history
* Fix --no-report

* Add no-report test case

* [automated] Update CHANGELOG.md

---------

Co-authored-by: MultiQC Bot <multiqc-bot@seqera.io>
Co-authored-by: Phil Ewels <phil.ewels@seqera.io>
  • Loading branch information
3 people committed Dec 11, 2023
1 parent 4eedd15 commit a85d3bd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
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))
- Add `.cram` to sample name cleaning defaults ([#2209](https://github.com/ewels/MultiQC/pull/2209))
- Custom content plot: do not assume first row are samples ([#2208](https://github.com/ewels/MultiQC/pull/2208))

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

0 comments on commit a85d3bd

Please sign in to comment.