Skip to content

abstract common add_mapping code into parent generator#283

Merged
cmungall merged 4 commits intomainfrom
fix-prefix-bug
Jul 29, 2021
Merged

abstract common add_mapping code into parent generator#283
cmungall merged 4 commits intomainfrom
fix-prefix-bug

Conversation

@cmungall
Copy link
Copy Markdown
Member

@cmungall cmungall commented Jul 20, 2021

Fixes #278

Also:

Fixes #163
Fixes biolink/biolink-model#667

@cmungall cmungall requested a review from hsolbrig July 20, 2021 23:52
@cmungall cmungall marked this pull request as draft July 21, 2021 00:07
SchemaLoader(METAMODEL_YAML_URI, base_dir=META_BASE_URI, importmap=kwargs.get('importmap', None),
mergeimports=self.merge_imports)
self.metamodel.resolve()
self.emit_prefixes: Set[str] = set()
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@hsolbrig doesn't seem satisfactory having to do this in every init method - move up to parent and set as a default?

@cmungall cmungall marked this pull request as ready for review July 21, 2021 15:26
@hsolbrig
Copy link
Copy Markdown
Contributor

It appears that lines 572 through 575 in generator.py are causing the above error. Why were these 4 lines introduced:

        if isinstance(defn, ClassDefinition):
             mappings.append(defn.class_uri)
        if isinstance(defn, SlotDefinition):
            mappings.append(defn.slot_uri)

@cmungall cmungall merged commit dbf4d23 into main Jul 29, 2021
@cmungall cmungall deleted the fix-prefix-bug branch July 29, 2021 02:09
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.

RDF Generator problems biolink-model RDF is unusable Abstract add_mappings code into common generator superclass

2 participants