You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multi-file validate data: list failing files in the summary (per-file pass/fail) #53
The multi-file validate data F1 F2 … mode (thanks for #49) is great for batching — we run it over ~2,670 files in CI. One reporting gap shows up at that scale:
Each file gets a Validating <file> header, and failing files get a Validation Issues block under it, but the final summary only says:
Validation Summary:
Files validated: 2670
Issues found in 5 file(s) (7 validation issue(s))
…without naming which files. Triaging then means scanning all 2,670 Validating / Validation Issues blocks.
Request
Enumerate the failing file paths in the summary (ideally a per-file pass/fail line). The sibling linkml-term-validator already does exactly this in multi-file mode:
Matching that — at minimum, listing the failing files in the summary — would make large-batch runs much easier to triage.
Optional
An --errors-only / --quiet flag to suppress the Validating <file> line for passing files (2,670 of them is a lot of noise) would complement this nicely.
Feature request: improve the validate data multi-file summary to enumerate which files failed, not just how many.
Background
This is a follow-on to #49 (merged 2026-06-17), which added multi-file validate data F1 F2 … mode. The multi-file loop builds the Validator once and reuses it across all files — a ~6× speedup for bulk CI runs (10 files: ~2.1 s vs ~12 s as separate processes). The reporter gap surfaces at scale: when running across ~2,670 files, the current summary is:
Validation Summary:
Files validated: 2670
Issues found in 5 file(s) (7 validation issue(s))
…with no indication of which 5 files failed. The only way to find them is to scroll through all 2,670 Validating <file> / Validation Issues blocks.
Relevant code
The summary logic lives in src/linkml_reference_validator/cli/validate.py, lines 340–353. The root cause is that files_with_issues is just an int counter (line 303) — the file paths are never collected.
# Current (lines 303, 336, 348–350)files_with_issues=0
...
files_with_issues+=1# only a count, path is lost
...
typer.echo(f" Issues found in {files_with_issues} file(s) ({total_results} validation issue(s))")
Minimal fix
Change files_with_issues from int to list[Path], then enumerate the failing paths in the summary:
# Proposedfailing_files: list[Path] = []
# in the loop:iffile_results:
...
failing_files.append(data_file)
# in the summary:iffailing_files:
typer.echo(f" Issues found in {len(failing_files)} file(s) ({total_results} validation issue(s)):")
forfinfailing_files:
typer.echo(f" ❌ {f}")
raisetyper.Exit(1)
else:
typer.echo(" ✅ All validations passed!")
raisetyper.Exit(0)
This matches the pattern already used by linkml-term-validator:
A --errors-only flag would suppress the Validating <file> header for passing files (2,670 of them is noise in CI). The suppress would only affect the per-file progress lines — the summary would always be printed. This is a purely additive CLI change; backward-compatible.
errors_only: Annotated[bool, typer.Option("--errors-only", "-q", help="Only print output for files with issues")] =False# in the loop:ifnoterrors_only:
typer.echo(f"\nValidating {data_file} against schema {schema_file}")
Implementation notes
The fix to failing_files is a one-liner change; the summary block is ~4 lines.
--errors-only can be a separate, subsequent PR if preferred.
@dragon-ai-agent please implement the failing-file enumeration in the summary (the minimal fix above) with TDD — write the test first, then update src/linkml_reference_validator/cli/validate.py. Also add --errors-only / --quiet flag as described. Make sure just test passes.
Activity
github-actions commentedon Jun 18, 2026
Summary
Feature request: improve the
validate datamulti-file summary to enumerate which files failed, not just how many.Background
This is a follow-on to #49 (merged 2026-06-17), which added multi-file
validate data F1 F2 …mode. The multi-file loop builds theValidatoronce and reuses it across all files — a ~6× speedup for bulk CI runs (10 files: ~2.1 s vs ~12 s as separate processes). The reporter gap surfaces at scale: when running across ~2,670 files, the current summary is:…with no indication of which 5 files failed. The only way to find them is to scroll through all 2,670
Validating <file>/Validation Issuesblocks.Relevant code
The summary logic lives in
src/linkml_reference_validator/cli/validate.py, lines 340–353. The root cause is thatfiles_with_issuesis just anintcounter (line 303) — the file paths are never collected.Minimal fix
Change
files_with_issuesfrominttolist[Path], then enumerate the failing paths in the summary:This matches the pattern already used by
linkml-term-validator:Optional enhancement:
--errors-only/--quietA
--errors-onlyflag would suppress theValidating <file>header for passing files (2,670 of them is noise in CI). The suppress would only affect the per-file progress lines — the summary would always be printed. This is a purely additive CLI change; backward-compatible.Implementation notes
failing_filesis a one-liner change; the summary block is ~4 lines.tests/for multi-file mode (added in feat(cli): accept multiple data files in 'validate data' #49) would need updating to assert the new summary format includes file paths.--errors-onlycan be a separate, subsequent PR if preferred.@dragon-ai-agent please implement the failing-file enumeration in the summary (the minimal fix above) with TDD — write the test first, then update
src/linkml_reference_validator/cli/validate.py. Also add--errors-only/--quietflag as described. Make surejust testpasses.