Skip to content

Enh: Update of HelperModel to support users in replacing pointers with IRIs #100

Open

Description

@LukasGold

Similarly to https://github.com/OO-LD/oold-python the osw.data.import_utility.HelperModel.transform_references or the .cast_to_superclass method should replace pointers to instances of OswBaseModel (subclasses) with IRIs returned by Entity.get_iri() prior to casting to the target class -> this would allow user to effortlessly upload the casted instances without treating attributes of the type "string" format "autocomplete" by hand

Activity

  1. self-assigned this
    on Dec 5, 2024
  2. LukasGold commented on Sep 3, 2026

    @LukasGold
    ContributorAuthor

    Triage 2026-09-03: still open. transform_references in src/osw/data/import_utility.py is a stub. The substitution logic is commented out and the method only flips references_transformed = True without touching any field.

    Open question: how should nested fields and collections be walked to find OswBaseModel instances to call get_iri() on, and how should that interact with remove_extra and none_to_default in cast_to_superclass?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions