Skip to content

WIP shorten paths in QC report ZIP files - #1105

Merged
pjbriggs merged 11 commits into
develfrom
qc-report-shorten-paths-in-zip-file
Oct 13, 2025
Merged

pjbriggs merged 11 commits into
develfrom
qc-report-shorten-paths-in-zip-file

Conversation

@pjbriggs

@pjbriggs pjbriggs commented Oct 10, 2025

Copy link
Copy Markdown
Member

Implements new functionality to shorten the file paths stored in the ZIP archives made from the QC reports, so that they can be unpacked on platforms like Windows 11 where there are restrictions on the maximum path lengths. Issues can occur depending on when the ZIP archives are unpacked on the system, if one or more final path exceeds this maximum length.

The PR implements a new generic convenience class ZipMaker (in utils) which wraps the ZIP file creation and allows short file paths to be specified; in this case the paths are rewritten in the ZIP file with numbers substituted for subdirectory paths (and links in any HTML files are updated accordingly).

ZipMaker replaces the code previously used in the report function (in qc/reporting) to generate ZIP files, and the function has a new option to specify whether or not to shorten the paths. In turn this is accessed from reportqc.py (in cli) with a new --shorten-paths CLI option, and turned on or off in the QC pipeline with a new argument shorten_zip_paths (in the run method of the pipeline).

The default setting for whether or not to shorten paths in the ZIP file is in a new configuration option shorten_zip_paths (in the qc section of the configuration file, disabled by default), and this setting is used by the auto_process.py run_qc command and the standalone QC runner run_qc.py. run_qc.py also has a new --shorten-zip-paths option which can override the default setting.

Closes #1099.

@pjbriggs
pjbriggs merged commit e129a28 into devel Oct 13, 2025
7 checks passed
@pjbriggs
pjbriggs deleted the qc-report-shorten-paths-in-zip-file branch October 13, 2025 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problems with long file names when unpacking zipped QC reports on Windows

1 participant