diff --git a/tests/test_issues/output/__pycache__/importee.cpython-38.pyc b/tests/test_issues/output/__pycache__/importee.cpython-38.pyc index 8cd641c5..d8bb0dea 100644 Binary files a/tests/test_issues/output/__pycache__/importee.cpython-38.pyc and b/tests/test_issues/output/__pycache__/importee.cpython-38.pyc differ diff --git a/tests/test_issues/output/__pycache__/issues_368_imports.cpython-38.pyc b/tests/test_issues/output/__pycache__/issues_368_imports.cpython-38.pyc index cf7d805b..3e27444c 100644 Binary files a/tests/test_issues/output/__pycache__/issues_368_imports.cpython-38.pyc and b/tests/test_issues/output/__pycache__/issues_368_imports.cpython-38.pyc differ diff --git a/tests/test_issues/output/issue_167b.py b/tests/test_issues/output/issue_167b.py index 39f9b2f3..c85db89f 100644 --- a/tests/test_issues/output/issue_167b.py +++ b/tests/test_issues/output/issue_167b.py @@ -1,7 +1,4 @@ -# Auto generated from issue_167b.yaml by pythongen.py version: 0.9.0 -# Generation date: 2021-02-25 00:02 -# Schema: annotations_test -# + # id: http://example.org/tests/issue167b # description: # license: https://creativecommons.org/publicdomain/zero/1.0/ @@ -34,6 +31,7 @@ # Namespaces BIOLINKML = CurieNamespace('biolinkml', 'https://w3id.org/biolink/biolinkml/') EX = CurieNamespace('ex', 'http://example.org/') +META = CurieNamespace('meta', 'https://w3id.org/biolink/biolinkml/meta/') DEFAULT_ = EX diff --git a/tests/test_issues/output/issue_167b2.py b/tests/test_issues/output/issue_167b2.py new file mode 100644 index 00000000..a88fea00 --- /dev/null +++ b/tests/test_issues/output/issue_167b2.py @@ -0,0 +1,74 @@ + +# id: http://example.org/tests/issue167b +# 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 + + +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/') +EX = CurieNamespace('ex', 'http://example.org/') +DEFAULT_ = EX + + +# Types + +# Class references + + + +class MyClass(YAMLRoot): + """ + Annotations as tag value pairs. Note that altLabel is defined in the default namespace, not in the SKOS namespace + """ + _inherited_slots: ClassVar[List[str]] = [] + + class_class_uri: ClassVar[URIRef] = EX.MyClass + class_class_curie: ClassVar[str] = "ex:MyClass" + class_name: ClassVar[str] = "my class" + class_model_uri: ClassVar[URIRef] = EX.MyClass + + +class MyClass2(YAMLRoot): + """ + -> This form of annotations is a tag/value format, which allows annotations to be annotated. Note, however, that + the annotation source is NOT a CURIE, rather just a string. + """ + _inherited_slots: ClassVar[List[str]] = [] + + class_class_uri: ClassVar[URIRef] = EX.MyClass2 + class_class_curie: ClassVar[str] = "ex:MyClass2" + class_name: ClassVar[str] = "my class 2" + class_model_uri: ClassVar[URIRef] = EX.MyClass2 + + +# Enumerations + + +# Slots +class slots: + pass + diff --git a/tests/test_issues/output/issue_260/__pycache__/__init__.cpython-38.pyc b/tests/test_issues/output/issue_260/__pycache__/__init__.cpython-38.pyc index 33d94fec..67057734 100644 Binary files a/tests/test_issues/output/issue_260/__pycache__/__init__.cpython-38.pyc and b/tests/test_issues/output/issue_260/__pycache__/__init__.cpython-38.pyc differ diff --git a/tests/test_issues/output/issue_260/__pycache__/issue_260a.cpython-38.pyc b/tests/test_issues/output/issue_260/__pycache__/issue_260a.cpython-38.pyc index a76a2d9f..a17bc466 100644 Binary files a/tests/test_issues/output/issue_260/__pycache__/issue_260a.cpython-38.pyc and b/tests/test_issues/output/issue_260/__pycache__/issue_260a.cpython-38.pyc differ diff --git a/tests/test_issues/output/issue_260/__pycache__/issue_260b.cpython-38.pyc b/tests/test_issues/output/issue_260/__pycache__/issue_260b.cpython-38.pyc index 7c2af602..eb36f7a6 100644 Binary files a/tests/test_issues/output/issue_260/__pycache__/issue_260b.cpython-38.pyc and b/tests/test_issues/output/issue_260/__pycache__/issue_260b.cpython-38.pyc differ diff --git a/tests/test_issues/output/issue_260/__pycache__/issue_260c.cpython-38.pyc b/tests/test_issues/output/issue_260/__pycache__/issue_260c.cpython-38.pyc index ca674350..85d41a33 100644 Binary files a/tests/test_issues/output/issue_260/__pycache__/issue_260c.cpython-38.pyc and b/tests/test_issues/output/issue_260/__pycache__/issue_260c.cpython-38.pyc differ diff --git a/tests/test_issues/output/issue_344_context.json b/tests/test_issues/output/issue_344_context.json index d74ec82b..2e04200a 100644 --- a/tests/test_issues/output/issue_344_context.json +++ b/tests/test_issues/output/issue_344_context.json @@ -1,5 +1,5 @@ { - "_comments": "Auto generated from issue_344.yaml by jsonldcontextgen.py version: 0.1.1\nGeneration date: 2021-02-25 00:02\nSchema: annotations_test\n\nid: http://example.org/tests/issue344\ndescription: \nlicense: \n", + "_comments": "Auto generated from issue_344.yaml by jsonldcontextgen.py version: 0.1.1\nid: http://example.org/tests/issue344\ndescription: \nlicense: \n", "@context": { "type": "@type", "GO": {