Skip to content

gsoc26: Mapping Conversion Layer (Layer 3), #60#63

Open
DhanashreePetare wants to merge 14 commits into
dbpedia:gsoc-2026from
DhanashreePetare:gsoc-2026
Open

gsoc26: Mapping Conversion Layer (Layer 3), #60#63
DhanashreePetare wants to merge 14 commits into
dbpedia:gsoc-2026from
DhanashreePetare:gsoc-2026

Conversation

@DhanashreePetare

Copy link
Copy Markdown
Collaborator

Pull Request

Description

Implements Layer 3 (cross-class mapping conversion) for the Databus Python Client download pipeline, building on the Layer 2 format handlers (TripleHandler, QuadHandler, TSDHandler) merged in #[link Layer 2 PR number]. Users can convert RDF triples to/from CSV, and convert between RDF triple and quad formats, using --format extended with --graph-name and --base-uri.

Related Issues
Issue #60

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • This change requires a documentation update
  • Housekeeping

Checklist:

  • My code follows the ruff code style of this project.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
    • poetry run pytest - all tests passed
    • poetry run ruff check - no linting errors

What was added:

  • databusclient/filehandling/mapping.py — 5 mapping functions using the Layer 2 handlers as IR (TripleHandler/QuadHandler/TSDHandler). Companion .meta.json preserves RDF datatypes and language tags for lossless CSV round trips. Blank nodes serialized with _: prefix for correct round-trip reconstruction.
  • --graph-name and --base-uri flags added to download command.

Tests:

  • 5 mapping round trip tests in tests/test_format_round_trips.py (IR captured before conversion, consistent with Layer 2 pattern)
  • 29 functional tests in tests/test_mapping_conversions.py covering all 5 directions plus edge cases (blank nodes, missing companion file, missing required flags)

Closes #60

@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1512cbf0-4c1d-4ccd-846f-310e3dab81eb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

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