Skip to content

feat: add tablassert publish-hf for Hugging Face dataset export - #298

Open
ArdaTkn wants to merge 1 commit into
SkyeAv:mainfrom
ArdaTkn:feat/hf-export
Open

ArdaTkn wants to merge 1 commit into
SkyeAv:mainfrom
ArdaTkn:feat/hf-export

Conversation

@ArdaTkn

@ArdaTkn ArdaTkn commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Closes #269.

Summary

  • Add hf = ["huggingface-hub>=0.25.0"] optional extra in pyproject.toml (relocked uv.lock) and register "hf" in src/tablassert/extras.py.
  • Add tablassert publish-hf -f GRAPH-CONFIG -r REPO_ID [--private] [--dry-run] in src/tablassert/cli.py:
    • Gates on biolink.validate_kgx, refusing to publish missing or invalid KGX artifacts.
    • Generates a RIG-derived README.md dataset card with nodes/edges Parquet configs, converts NDJSON to Parquet for the HF viewer, and attaches raw NDJSON + .RIG.yaml.
    • Supports --dry-run to print the exact upload plan without contacting the Hub; reads auth from HF_TOKEN / HF cache only (never from config YAML, never logged).
  • Update README.md, docs/installation.md, docs/cli.md, llms.txt, tests/test_docs_cli_coverage.py, tests/test_extras.py, scripts/vulture_whitelist.py, and CHANGELOG.md.
  • Add offline unit tests in tests/test_publish_hf.py.

Local gate

  • uv lock --check: PASS
  • scripts/check_changelog.py --base upstream/main: PASS
  • ruff check . / ruff format --check .: clean
  • pyright: 0 errors
  • vulture / deptry .: clean
  • mkdocs build --strict: clean
  • pytest tests/test_publish_hf.py tests/test_extras.py tests/test_docs_cli_coverage.py tests/test_docs_source_of_truth.py tests/test_docs_style.py: 231 passed

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

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

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ac26da14-eb69-4d11-b169-b305c556fa07
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@ArdaTkn

ArdaTkn commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Hardened feat/hf-export in 6ec46e7:

  • Optional-RIG compatibility: _hf_dataset_card and artifact path resolution now guard g.rig is None (falling back to g.infores_id / g.artifact_path / Path(".")) so publish-hf works cleanly with feat: make the rig: graph section optional #288.
  • Full validate_kgx check: Checks report.get("ok", ...) in addition to failure counts, and adds test_publish_hf_refuses_missing_artifacts.

Local gates passing: check_changelog.py, ruff, pyright, vulture, deptry, and pytest (232 passed).

@ArdaTkn
ArdaTkn force-pushed the feat/hf-export branch 2 times, most recently from 6ec46e7 to 32711ab Compare November 19, 2026 23:41

This branch has not been deployed

No deployments
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.

Add Hugging Face dataset export for KGX outputs

1 participant