This repository has been archived by the owner on Oct 2, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d74c940
commit 353ba64
Showing
10 changed files
with
141 additions
and
2 deletions.
There are no files selected for viewing
Binary file modified
BIN
+0 Bytes
(100%)
tests/test_issues/output/__pycache__/importee.cpython-38.pyc
Binary file not shown.
Binary file added
BIN
+2.16 KB
tests/test_issues/output/__pycache__/issues_368_imports.cpython-38.pyc
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+0 Bytes
(100%)
tests/test_issues/output/issue_260/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
tests/test_issues/output/issue_260/__pycache__/issue_260a.cpython-38.pyc
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
tests/test_issues/output/issue_260/__pycache__/issue_260b.cpython-38.pyc
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
tests/test_issues/output/issue_260/__pycache__/issue_260c.cpython-38.pyc
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Auto generated from issue_368.yaml by pythongen.py version: 0.9.0 | ||
# Generation date: 2021-02-16 19:05 | ||
# Schema: schema | ||
# | ||
# id: https://microbiomedata/schema | ||
# description: | ||
# license: https://creativecommons.org/publicdomain/zero/1.0/ | ||
|
||
import dataclasses | ||
import sys | ||
import re | ||
from typing import Optional, List, Union, Dict, ClassVar, Any | ||
from dataclasses import dataclass | ||
from biolinkml.meta import EnumDefinition, PermissibleValue, PvFormulaOptions | ||
|
||
from biolinkml.utils.slot import Slot | ||
from biolinkml.utils.metamodelcore import empty_list, empty_dict, bnode | ||
from biolinkml.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int | ||
if sys.version_info < (3, 7, 6): | ||
from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs | ||
else: | ||
from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs | ||
from biolinkml.utils.formatutils import camelcase, underscore, sfx | ||
from biolinkml.utils.enumerations import EnumDefinitionImpl | ||
from rdflib import Namespace, URIRef | ||
from biolinkml.utils.curienamespace import CurieNamespace | ||
from . issues_368_imports import E, ParentClass | ||
|
||
metamodel_version = "1.7.0" | ||
|
||
# Overwrite dataclasses _init_fn to add **kwargs in __init__ | ||
dataclasses._init_fn = dataclasses_init_fn_with_kwargs | ||
|
||
# Namespaces | ||
BIOLINKML = CurieNamespace('biolinkml', 'https://w3id.org/biolink/biolinkml/') | ||
DEFAULT_ = CurieNamespace('', 'https://microbiomedata/schema/') | ||
|
||
|
||
# Types | ||
|
||
# Class references | ||
|
||
|
||
|
||
@dataclass | ||
class C(ParentClass): | ||
_inherited_slots: ClassVar[List[str]] = [] | ||
|
||
class_class_uri: ClassVar[URIRef] = URIRef("https://microbiomedata/schema/C") | ||
class_class_curie: ClassVar[str] = None | ||
class_name: ClassVar[str] = "c" | ||
class_model_uri: ClassVar[URIRef] = URIRef("https://microbiomedata/schema/C") | ||
|
||
s: Optional[Union[str, "E"]] = None | ||
|
||
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): | ||
if self.s is not None and not isinstance(self.s, E): | ||
self.s = E(self.s) | ||
|
||
super().__post_init__(**kwargs) | ||
|
||
|
||
# Enumerations | ||
|
||
|
||
# Slots | ||
class slots: | ||
pass | ||
|
||
slots.s = Slot(uri=DEFAULT_.s, name="s", curie=DEFAULT_.curie('s'), | ||
model_uri=DEFAULT_.s, domain=None, range=Optional[Union[str, "E"]]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Auto generated from issues_368_imports.yaml by pythongen.py version: 0.9.0 | ||
# Generation date: 2021-02-16 19:05 | ||
# Schema: mixs | ||
# | ||
# id: https://microbiomedata/schema/mixs | ||
# description: | ||
# license: | ||
|
||
import dataclasses | ||
import sys | ||
import re | ||
from typing import Optional, List, Union, Dict, ClassVar, Any | ||
from dataclasses import dataclass | ||
from biolinkml.meta import EnumDefinition, PermissibleValue, PvFormulaOptions | ||
|
||
from biolinkml.utils.slot import Slot | ||
from biolinkml.utils.metamodelcore import empty_list, empty_dict, bnode | ||
from biolinkml.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int | ||
if sys.version_info < (3, 7, 6): | ||
from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs | ||
else: | ||
from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs | ||
from biolinkml.utils.formatutils import camelcase, underscore, sfx | ||
from biolinkml.utils.enumerations import EnumDefinitionImpl | ||
from rdflib import Namespace, URIRef | ||
from biolinkml.utils.curienamespace import CurieNamespace | ||
|
||
|
||
metamodel_version = "1.7.0" | ||
|
||
# Overwrite dataclasses _init_fn to add **kwargs in __init__ | ||
dataclasses._init_fn = dataclasses_init_fn_with_kwargs | ||
|
||
# Namespaces | ||
DEFAULT_ = CurieNamespace('', 'https://microbiomedata/schema/mixs/') | ||
|
||
|
||
# Types | ||
|
||
# Class references | ||
|
||
|
||
|
||
class ParentClass(YAMLRoot): | ||
_inherited_slots: ClassVar[List[str]] = [] | ||
|
||
class_class_uri: ClassVar[URIRef] = URIRef("https://microbiomedata/schema/mixs/ParentClass") | ||
class_class_curie: ClassVar[str] = None | ||
class_name: ClassVar[str] = "parent_class" | ||
class_model_uri: ClassVar[URIRef] = URIRef("https://microbiomedata/schema/mixs/ParentClass") | ||
|
||
|
||
# Enumerations | ||
class E(EnumDefinitionImpl): | ||
|
||
a = PermissibleValue(text="a", | ||
description="A") | ||
b = PermissibleValue(text="b", | ||
description="B") | ||
|
||
_defn = EnumDefinition( | ||
name="E", | ||
) | ||
|
||
# Slots | ||
class slots: | ||
pass | ||
|