biolink / biolinkml

DEPRECATED: replaced by linkml
https://github.com/linkml/linkml
Creative Commons Zero v1.0 Universal
23 stars 12 forks source link

Namespace gen revisions #278

Closed RichardBruskiewich closed 3 years ago

RichardBruskiewich commented 4 years ago

@hsolbrig, here's the 'NameSpace' generator code base as it now sits. I've tested it manually and it seems to be OK (fixed a few small border cases along the way).

Note that I've not yet changed the way I tag the class name using the {self.schema.name}. You will have to kindly advise what additional code generation tweaks are needed to fix that issue.

For the moment, this implementation seems to satisfy the original BiolinkML issue #101 use cases.

You will also need to advise me exactly how the model specific NameSpace module is going to be placed in the Biolink Model Python code base. At the moment, the only generated Python code is sitting in https://github.com/biolink/biolink-model/tree/master/biolink; however, in principle, developers (like myself) may wish to import and use the module in a standalone fashion in our code base, something like

from biolink.namespace import BiolinkNameSpace as bns

and/or

from biolink.namespace import curie, object_id, fix_curies

and so on...