WIP shorten paths in QC report ZIP files - #1105
Merged
Merged
Conversation
…r Python versions.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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(inutils) 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).ZipMakerreplaces the code previously used in thereportfunction (inqc/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 fromreportqc.py(incli) with a new--shorten-pathsCLI option, and turned on or off in the QC pipeline with a new argumentshorten_zip_paths(in therunmethod 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 theqcsection of the configuration file, disabled by default), and this setting is used by theauto_process.py run_qccommand and the standalone QC runnerrun_qc.py.run_qc.pyalso has a new--shorten-zip-pathsoption which can override the default setting.Closes #1099.