Skip to content

'update': extend to handle inconsistencies between 'projects.info' and contents of analysis directory - #1154

Merged
pjbriggs merged 9 commits into
develfrom
update-cmd-handle-inconsistent-projects.info
Mar 26, 2026
Merged

pjbriggs merged 9 commits into
develfrom
update-cmd-handle-inconsistent-projects.info

Conversation

@pjbriggs

@pjbriggs pjbriggs commented Mar 20, 2026

Copy link
Copy Markdown
Member

Extends the update command to enable handling of inconsistencies between the contents of the projects.info metadata 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:

  1. The projects.info file includes an entry for a project directory which doesn't exist (i.e. missing project), and
  2. A project directory exists which doesn't have a matching entry in projects.info (i.e. unlisted project).

If either of these cases is encountered then running the update command with the new --project-dirs argument will synchronise the projects.info file 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 update command 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 the projects.info file;
  • --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 update command, 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:

auto_process.py update --paths --project-metadata --qc-reports

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
pjbriggs force-pushed the update-cmd-handle-inconsistent-projects.info branch from 99f2e4f to cebd425 Compare March 25, 2026 08:46
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).
@pjbriggs
pjbriggs merged commit d603584 into devel Mar 26, 2026
7 checks passed
@pjbriggs
pjbriggs deleted the update-cmd-handle-inconsistent-projects.info branch March 26, 2026 09:00
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.

1 participant