Coverage for skema/gromet/metadata/__init__.py: 100%

32 statements  

« prev     ^ index     » next       coverage.py v7.5.0, created at 2024-04-30 17:15 +0000

1# coding: utf-8 

2 

3# flake8: noqa 

4""" 

5 GroMEt Metadata spec 

6 

7 Grounded Model Exchange (GroMEt) Metadata schema specification __Using Swagger to Generate Class Structure__ To automatically generate Python or Java models corresponding to this document, you can use [swagger-codegen](https://swagger.io/tools/swagger-codegen/). We can use this to generate client code based off of this spec that will also generate the class structure. 1. Install via the method described for your operating system [here](https://github.com/swagger-api/swagger-codegen#Prerequisites). Make sure to install a version after 3.0 that will support openapi 3. 2. Run swagger-codegen with the options in the example below. The URL references where the yaml for this documentation is stored on github. Make sure to replace CURRENT_VERSION with the correct version. (The current version is `0.1.4`.) To generate Java classes rather, change the `-l python` to `-l java`. Change the value to the `-o` option to the desired output location. ``` swagger-codegen generate -l python -o ./client -i https://raw.githubusercontent.com/ml4ai/automates-v2/master/docs/source/gromet_metadata_v{CURRENT_VERSION}.yaml ``` 3. Once it executes, the client code will be generated at your specified location. For python, the classes will be located in `$OUTPUT_PATH/swagger_client/models/`. For java, they will be located in `$OUTPUT_PATH/src/main/java/io/swagger/client/model/` If generating GroMEt Metadata schema data model classes in SKEMA (AutoMATES), then after generating the above, follow the instructions here: ``` <automates>/automates/model_assembly/gromet/metadata/README.md ``` # noqa: E501 

8 

9 OpenAPI spec version: 0.1.8 

10 Contact: claytonm@arizona.edu 

11 Generated by: https://github.com/swagger-api/swagger-codegen.git 

12""" 

13 

14from __future__ import absolute_import 

15 

16# import models into model package 

17from skema.gromet.metadata.bibjson import Bibjson 

18from skema.gromet.metadata.code_file_reference import CodeFileReference 

19from skema.gromet.metadata.comment_type import CommentType 

20from skema.gromet.metadata.debug import Debug 

21from skema.gromet.metadata.equation_definition import EquationDefinition 

22from skema.gromet.metadata.equation_extraction import EquationExtraction 

23from skema.gromet.metadata.equation_literal_value import EquationLiteralValue 

24from skema.gromet.metadata.gromet_creation import GrometCreation 

25from skema.gromet.metadata.literal_value import LiteralValue 

26from skema.gromet.metadata.metadata import Metadata 

27from skema.gromet.metadata.program_analysis_record_bookkeeping import ProgramAnalysisRecordBookkeeping 

28from skema.gromet.metadata.provenance import Provenance 

29from skema.gromet.metadata.source_code_bool_and import SourceCodeBoolAnd 

30from skema.gromet.metadata.source_code_bool_or import SourceCodeBoolOr 

31from skema.gromet.metadata.source_code_collection import SourceCodeCollection 

32from skema.gromet.metadata.source_code_comment import SourceCodeComment 

33from skema.gromet.metadata.source_code_data_type import SourceCodeDataType 

34from skema.gromet.metadata.source_code_loop_init import SourceCodeLoopInit 

35from skema.gromet.metadata.source_code_loop_update import SourceCodeLoopUpdate 

36from skema.gromet.metadata.source_code_port_default_val import SourceCodePortDefaultVal 

37from skema.gromet.metadata.source_code_port_keyword_arg import SourceCodePortKeywordArg 

38from skema.gromet.metadata.source_code_reference import SourceCodeReference 

39from skema.gromet.metadata.text_description import TextDescription 

40from skema.gromet.metadata.text_extraction import TextExtraction 

41from skema.gromet.metadata.text_extraction_metadata import TextExtractionMetadata 

42from skema.gromet.metadata.text_grounding import TextGrounding 

43from skema.gromet.metadata.text_literal_value import TextLiteralValue 

44from skema.gromet.metadata.text_units import TextUnits 

45from skema.gromet.metadata.textual_document_collection import TextualDocumentCollection 

46from skema.gromet.metadata.textual_document_reference import TextualDocumentReference