Skip to content

feat: config-driven rig.source_files and indented RIG YAML output - #121

Merged
SkyeAv merged 1 commit into
mainfrom
better-rig-formatting
Aug 25, 2026
Merged

feat: config-driven rig.source_files and indented RIG YAML output#121
SkyeAv merged 1 commit into
mainfrom
better-rig-formatting

Conversation

@SkyeAv

@SkyeAv SkyeAv commented Aug 25, 2026

Copy link
Copy Markdown
Owner

What

  • Readable RIG YAML: generated .RIG.yaml files now indent block sequences under their parent key (PyYAML's default indentless style made nested edge_type_info entries hard to scan), allow unicode, and wrap at 120 columns so long prose fields like ui_explanation stay intact. Scoped to to_yaml, which only the RIG writer uses.
  • Config-driven source_files: new optional rig.source_files key (flat list of upstream source file names/URLs) in the graph config. When set, it is applied sorted/deduplicated to every target_info.edge_type_info entry's source_files.

Why

  • RIGs were hard to read with indentless sequences.
  • source_files was previously scraped from edge source_record_urls; it is now an authored config fact and never derived from edge provenance. Edges themselves still emit source_record_urls unchanged.

Changes

  • src/tablassert/models.py: RIGConfig.source_files field.
  • src/tablassert/rig.py: dropped the source_record_urls scraping in rig_edge_type_info; compile_rig applies rig.source_files to every edge type.
  • src/tablassert/ingests.py: _IndentedSafeDumper used by to_yaml.
  • Tests updated (test_rig.py, test_lib.py) plus new coverage for config-applied source_files and indented output; docs/configuration/graph.md documents the new key.

Verification

  • Full suite: 1036 passed. (One failure + one import error are pre-existing environment gaps: missing numpy and the [qc] extra.)

RIG target_info.edge_type_info source_files now come from an optional
rig.source_files graph-config key (applied to every edge type) instead of
being scraped from edge source_record_urls; edges still emit
source_record_urls unchanged. Generated .RIG.yaml files are written with
block sequences indented under their parent key, unicode allowed, and a
120-column wrap so long prose fields stay readable.
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8fe38ed7-676e-4544-a3a2-8887d3416773


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@SkyeAv
SkyeAv merged commit 01935e6 into main Aug 25, 2026
5 checks passed
SkyeAv added a commit that referenced this pull request Aug 25, 2026
Cut 16.0.0 and bump the package version in pyproject.toml, uv.lock, and
CITATION.cff.

Major: edge ids are canonicalized before hashing (nested object keys
sorted at every depth; false hashed instead of dropped), so every
existing edge id changes once — readers pinning ids must re-key against
the rebuilt graph. The same PR adds opt-in uuid_fields so a graph config
declares which edge fields constitute identity (930,081 of 1,265,355
ids moved under the whole-record hash on a re-analysis, none under a
declared list), derives the UUID namespace from the graph infores with
a uuid_domain override, aborts the build on duplicate derived ids
instead of shipping them, adds a duplicate-edge-ids QC assertion, and
cuts dedup memory 25x (2469 MB -> 100 MB peak, 477s -> 37s on
MultiomicsKG 3.0.0) (#122). Also adds config-driven rig.source_files
with indented RIG YAML output (#121).

Changelog:
- The 16.0.0 section shipped with #122; added the missing Added entry
  covering rig.source_files and the RIG YAML formatting from #121.

Docs: none needed here; both PRs shipped with their own docs.

Testing:
- uv run pytest -q -> 1107 passed, 15 skipped (94% coverage)
- uv run ruff check . && uv run ruff format --check . && uv run pyright -> clean / 0 errors
- uv lock --check -> up to date
- uv run mkdocs build --strict -> clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant