
Get or set global multi-reviewer review-tracking configuration
Source:R/cbe_review_extract.R
review_config.RdDecouples project-specific reviewer identities from the review-tracking
mechanics in docx_review_extract, mirroring how
pipeline_config decouples study name and stage labels from
the core compute-graph classes: the number and names of reviewers are
data supplied by the calling project, not hardcoded here.
Usage
review_config(
fork_reviewers = NULL,
signoff_reviewers = NULL,
documents_sheet_mode = NULL,
csv_reviewer_columns = NULL,
pipeline_catalog = NULL,
stem_aliases = NULL,
analysis_dir = NULL,
input_dirs = NULL,
fork_mode = NULL,
reset = FALSE
)Arguments
- fork_reviewers
Character vector of fork-reviewer identifiers. An id is used as a column name, as a fork-workbook file suffix and (with
documents_sheet_mode = "per_reviewer") in a sheet name, so it is validated: ids must be unique (ignoring case) and consist of 1-20 letters, digits or underscores; they must not be the name of a built-in tracker column (for examplefile,authororresolved) and must not end in_comment. A violation is an error, and nothing is changed.- signoff_reviewers
Character vector of document-level sign-off reviewer identifiers (same rules as
fork_reviewers; an id cannot be both a fork and a sign-off reviewer). Defaults to none.- documents_sheet_mode
One of
"columns"(default; a single "Documents" sheet with one column, or column pair, per reviewer) or"per_reviewer"(a shared "Documents" sheet with counts andresolvedonly, plus one additional "Documents_<id>" sheet per reviewer carrying just that reviewer's status/comment columns). This applies to the master workbook; a fork workbook always has one plain "Documents" sheet.- csv_reviewer_columns
Which reviewer columns the CSV exports (
comments.csv,tracked_changes.csv,suggested_changes.csv) contain."fork"(default) keeps the fork reviewers' sign-off and comment columns but leaves out the sign-off reviewers' columns and the Wordauthorcolumn;"none"leaves out every reviewer column and the author;"all"writes every column, including the sign-off reviewers' and the author, which is what the CSVs held before this option existed.- pipeline_catalog
The analysis stages the reviewed documents belong to, used to label (
pipeline_stage) and order documents. A list of stages, each a list with astem(the document's file name without extension, date and reviewer initials, compared in lower case) and optionallyheading,nameandstage(the label shown; default"Heading <heading>: <name>", else the name, else the stem); a data frame with those columns also works. The order of the list is the order of the documents. The package ships no stages: unless a catalog (or areports_to_render.xlsxmanifest inanalysis_dir) is supplied, every document gets the stage"Unknown / Extra". A file whose stem is not in the catalog is matched to the most similar stem when they are at least 60 percent alike. Uselist()to clear.- stem_aliases
Named character vector of file-name stems (as typed, for example a recurring typo) and the catalog stems they stand for. Defaults to none.
- analysis_dir
Folder, relative to the working directory (or to the
TEMPLECBE_ANALYSIS_ROOTenvironment variable) or absolute, that holdsreports_to_render.xlsxand the.qmdsources shown on the docXwalk sheet. Defaults to none: no manifest or source index is looked up. Usecharacter(0)to clear.- input_dirs
Character vector of folders (relative to the working directory or
TEMPLECBE_ANALYSIS_ROOT, or absolute) in whichdocx_review_extractlooks, in order, for.docxfiles wheninput_diris not given. Defaults to none, so the working directory is used. Usecharacter(0)to clear.- fork_mode
Who sees whom in the fork workbooks.
"redacted"(default) gives each reviewer a fork without the other fork reviewers' sign-off and note columns (single-blind review)."collaborative"keeps every fork reviewer's columns in every fork, so reviewers can read each other's notes and confirm consensus. Either way the sign-off reviewers' columns and the Wordauthornever go into a fork, and a reviewer's edits to another reviewer's columns are not merged back: only the fork's own columns are.- reset
If
TRUE, forget everything set earlier (every argument above) and return to the defaults before applying any other argument given in the same call; the arguments are validated first, so a rejected call changes nothing.review_config(reset = TRUE)alone just restores the defaults. Defaults toFALSE.
Details
Two reviewer categories are supported:
fork_reviewers: reviewers who sign off on individual comments and suggested changes. Each gets a personal fork workbook (review_tracker_<id>.xlsx) that holds only that reviewer's own columns: no other reviewer's columns, no sign-off reviewer's columns and no Word author names appear on any sheet, and the "Documents" sheet carries just the counts and that reviewer's own rolled-up column (there is no "Documents_<id>" sheet in a fork). In a fork theresolvedcolumns reflect that reviewer's own sign-offs only; in the master workbook a document'sresolvedstatus is TRUE only when every fork reviewer has signed off on every comment and suggested change in that document.signoff_reviewers: reviewers who sign off once per document (e.g. a final PI read), tracked on the master workbook's "Documents" sheet (a status column plus a free-text comment column). They are not counted towardresolved, and they never appear in a fork workbook or, by default, in the CSV exports (seecsv_reviewer_columns). The master's Comments and SuggestedChanges sheets also carry their column pair, so that anything typed there is kept.
Existing review_tracker_*.xlsx files continue to work: column
data is preserved by header union regardless of configuration, but for
the app's reviewer-aware behavior
(rollups, resolved status, fork filtering) to line up with a file's
existing columns, keep configuring the same reviewer identifiers used
when that file was created.