Skip to content

Revise ArrangementMapping to fix RDF conversion#25

Merged
Xarthisius merged 1 commit into
mainfrom
nested_path
Mar 27, 2026
Merged

Revise ArrangementMapping to fix RDF conversion#25
Xarthisius merged 1 commit into
mainfrom
nested_path

Conversation

@Xarthisius
Copy link
Copy Markdown
Contributor

This pull request updates the way arrangements and their mount paths are represented and handled throughout the codebase and documentation. The main change is the replacement of the old ArrangementRef (which paired arrangement IDs with optional paths) with a new ArrangementBinding model that unambiguously ties an arrangement, its mount path, and the performance together. This affects the API, the JSON-LD serialization, and the test suite. The documentation and tests have been updated to reflect this new model and terminology.

Key changes:

API and Model Updates

  • Replaced ArrangementRef with ArrangementBinding throughout the codebase, updating all references, imports, and usage in the Python API and documentation. Now, arrangement references are represented as (arrangement_id, mount_path) tuples or as ArrangementBinding objects, ensuring a clear association between arrangements and their mount paths. [1] [2] [3] [4]
  • Updated the add_performance method and related documentation to accept arrangements as either a string (no path) or a (id, path) tuple, with both single values and lists supported. [1] [2]

JSON-LD Serialization and Data Structure

  • Changed the JSON-LD serialization to wrap each arrangement reference in a trov:ArrangementBinding object, which includes the arrangement ID and an optional trov:boundTo mount path, replacing the previous direct @id or trov:mountPath fields. [1] [2] [3] [4]
  • Updated all test assertions and expected outputs to match the new structure, ensuring that arrangement references are now checked as bindings. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Documentation and Terminology

  • Revised documentation to clarify the new model, including updated examples, terminology (e.g., "binding" instead of "mapping"), and JSON-LD snippets. The Python API and CLI usage sections now reflect the new tuple-based interface and the use of ArrangementBinding. [1] [2] [3] [4]
  • Updated docstrings and comments to use "binding" terminology for arrangement/path associations and path-to-hash structures. [1] [2] [3] [4] [5]

CLI and Internal Parsing

  • Changed the CLI arrangement reference parsing to return (id, path) tuples instead of ArrangementRef objects, aligning with the new model and simplifying downstream handling.

Test Suite

  • Refactored all relevant tests to use the new ArrangementBinding structure and updated their expected outputs, ensuring comprehensive coverage of the new model and serialization format. [1] [2] [3] [4] [5] [6] [7] [8] [9]

These changes provide a more robust and unambiguous way to associate arrangements with their mount paths in performances, improving both the internal model and external interoperability.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 96.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.66%. Comparing base (a82c161) to head (5042b6f).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
tro_utils/models/performance.py 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #25      +/-   ##
==========================================
+ Coverage   94.61%   94.66%   +0.04%     
==========================================
  Files          15       15              
  Lines        1021     1030       +9     
==========================================
+ Hits          966      975       +9     
  Misses         55       55              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Xarthisius Xarthisius merged commit b24d0c2 into main Mar 27, 2026
8 checks passed
@Xarthisius Xarthisius deleted the nested_path branch March 27, 2026 20:51
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