'update': extend to handle inconsistencies between 'projects.info' and contents of analysis directory - #1154
Merged
Conversation
Extends the 'update' command so that entries for projects which are listed in 'projects.info' but which are missing from filesystem are commented out.
Extends the functionality of the 'update' command to also add entries for unlisted project directories to the 'projects.info' file.
…cing project dirs.
Ignores project directories ending with special names ("*.bak", "*.tmp" and "*.orig") when adding unlisted projects to 'projects.info'.
pjbriggs
force-pushed
the
update-cmd-handle-inconsistent-projects.info
branch
from
March 25, 2026 08:46
99f2e4f to
cebd425
Compare
Fix bug in unit test for "update" when listed project no longer exists on the filesystem (was always passing).
…ction call. Adds arguments to the 'update' function so that individual operations (updating paths, syncing projects etc) can be selected when the function is invoked (all operations are selected by default).
…tions. Adds options to the 'update' command to specify which update(s) to perform (i.e. '--paths', '--project-metadata', '--project-dirs', '--qc-reports'). Changes the default behaviour (now does nothing unless one or more options are specified).
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.
Extends the
updatecommand to enable handling of inconsistencies between the contents of theprojects.infometadata file (which lists project directory names along with metadata such as user, PI, library etc) and the contents of the analysis directory on the file system.There are two specific cases:
projects.infofile includes an entry for a project directory which doesn't exist (i.e. missing project), andprojects.info(i.e. unlisted project).If either of these cases is encountered then running the
updatecommand with the new--project-dirsargument will synchronise theprojects.infofile by either commenting out the entry for a missing project, or by adding an entry for an unlisted project.In addition the other functions of the
updatecommand must now be explicitly requested by specifying the relevant command line option:--paths: updates the paths stored in the top-level parameter and metadata files of the analysis directory;--project-metadata: synchronises the metadata stored in each project directory with the contents of theprojects.infofile;--qc-reports: forces regeneration of QC reports for projects where the metadata has been updated since the original report was created.Note that this is a change to the default behaviour of the
updatecommand, which previous did not accept any arguments and which automatically performed all of the above functions. So now to recover the default behaviour it's necessary to do: