report¶
Phase 6 — compile the verification log, comparison table, JSON, and methodology statement.
report
¶
Compile the verification log, comparison table, and methodology statement.
Phase 6 of the crossverify pipeline. Renders the collected check results and cross-tool comparison rows into the Markdown and JSON artifacts written to the output directory.
_counts(results)
¶
Tally (passed, failed, info) from a list of CheckResult objects.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
results
|
Iterable of |
required |
Returns:
| Type | Description |
|---|---|
|
A |
Source code in crossverify/report.py
comparison_table_md(rows)
¶
Render cross-tool comparison rows as a Markdown table.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rows
|
List of comparison-row mappings, each with |
required |
Returns:
| Type | Description |
|---|---|
|
A Markdown table as a string, or a placeholder sentence when |
|
|
Always terminated by a trailing newline. |
Source code in crossverify/report.py
_methodology(project, env, comparison_rows, template_path)
¶
Render the methodology statement by substituting fields into the template.
Builds the substitution fields from the project, environment, and comparison
summary, then fills the template. template_path may be an
importlib.resources Traversable (which has its own read_text) or a
filesystem path/str (wrapped in Path); both are handled.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
The :class: |
required | |
env
|
Environment mapping with |
required | |
comparison_rows
|
List of comparison-row mappings; their count and the number
with truthy |
required | |
template_path
|
Traversable or filesystem path/str to the methodology template. |
required |
Returns:
| Type | Description |
|---|---|
|
The rendered methodology statement as a string. |
Source code in crossverify/report.py
_render(template_text, fields)
¶
Fill $name placeholders from fields.
Uses string.Template.safe_substitute so a user-edited template with an
unknown or malformed placeholder leaves the token intact instead of raising
or exposing attribute access (unlike str.format).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template_text
|
Template body containing |
required | |
fields
|
Mapping of placeholder name to substitution value. |
required |
Returns:
| Type | Description |
|---|---|
|
The template text with known placeholders substituted and unknown ones left |
|
|
intact. |
Source code in crossverify/report.py
compile_report(project, out_dir, all_results, intake_artifacts, comparison_rows, env, template_path)
¶
Write the verification log, comparison table, methodology, and JSON summary.
Groups all_results by phase, tallies pass/fail/info counts, and emits four
files into out_dir: verification_log.md, comparison_table.md,
methodology_statement.md, and verification_results.json. The output
directory is created if it does not exist.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
The :class: |
required | |
out_dir
|
Destination directory for the artifacts; coerced to |
required | |
all_results
|
Iterable of |
required | |
intake_artifacts
|
Mapping with Phase-1 text blocks under |
required | |
comparison_rows
|
List of cross-tool comparison-row mappings for Phase 5. |
required | |
env
|
Environment mapping with |
required | |
template_path
|
Traversable or path/str to the methodology template. |
required |
Returns:
| Type | Description |
|---|---|
|
The full machine-readable results dict — the contents of |
|
|
|
|
|
Python-vs-R |
|
|
|
Source code in crossverify/report.py
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | |
env_info(r_version_str)
¶
Assemble the environment block recorded in the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
r_version_str
|
Pre-resolved R version string (e.g. from :func: |
required |
Returns:
| Type | Description |
|---|---|
|
A dict with |
|
|
|