Skip to content

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

Merged
DhanashreePetare merged 19 commits into
dbpedia:gsoc-2026from
DhanashreePetare:gsoc-2026
Jun 29, 2026
Merged

gsoc26: Mapping Conversion Layer (Layer 3), #60#63
DhanashreePetare merged 19 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: 7c4f6505-bf9f-4fc9-adf7-6f1d86d8cd8f

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.

Comment thread tests/test_mapping_conversions.py Outdated
Comment thread tests/test_mapping_conversions.py
Comment thread tests/test_mapping_conversions.py Outdated
Comment thread tests/test_mapping_conversions.py Outdated
Comment thread tests/test_mapping_conversions.py
Comment thread tests/test_mapping_conversions.py Outdated
@Integer-Ctrl

Integer-Ctrl commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Please use Resolve conversation on the review comments when done

Oh, what a timing 😃

Then, on my part, I commented on everything I had in mind. So you can proceed merging when you feel ready

@dbpedia dbpedia deleted a comment from coderabbitai Bot Jun 29, 2026
@DhanashreePetare DhanashreePetare merged commit 9d31ac3 into dbpedia:gsoc-2026 Jun 29, 2026
2 checks passed

@DhanashreePetare DhanashreePetare left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved.

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.

2 participants