biolink / biolinkml

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

enums are not imported in generated python code #368

Closed cmungall closed 3 years ago

cmungall commented 3 years ago

E.g

id: https://microbiomedata/schema

prefixes:
  biolinkml: https://w3id.org/biolink/biolinkml/

imports:
  - biolinkml:types
  - issues_368_imports

classes:

  c:
    is_a: parent_class
    slots:
      - s

slots:
  s:
    range: e

where the imported file is:

id: https://microbiomedata/schema/mixs

classes:
  parent_class: {}

enums:
  e:
    permissible_values:
      a: A
      b: B
$ gen-python --no-mergeimports tests/test_issues/input/issue_368.yaml

makes:

...
from . issues_368_imports import ParentClass
...

but the python should also import E