Skip to content

Commit

Permalink
Separated out dataclass sample from schemas to get correct dialect
Browse files Browse the repository at this point in the history
  • Loading branch information
Semprini committed May 19, 2024
1 parent 21b64a3 commit c393f40
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
13 changes: 13 additions & 0 deletions sample_recipes/sparxdb/config-sparxdb-dataclass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root_package: "{EE550A71-3A5F-473d-A3AF-773E900C74ED}"
model_package: "{D6D3BF36-E897-4a8b-8CA9-62ADAAD696ED}"
source: sqlite:///./sample_recipes/sparxdb/sample.qea
parser: sparxdb
dest_root: ./build/sample_sparxdb_dataclass
templates_folder: ./mdg/templates
default_dialect: python
generation_artifacts:
# Dataclass Avro
- dest: "{{package.name}}_dataclasses.py"
level: package
source: "Python/dataclass_avro.py.jinja"
filter: "{% if package.classes %}True{% else %}False{% endif %}"
7 changes: 1 addition & 6 deletions sample_recipes/sparxdb/config-sparxdb-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source: sqlite:///./sample_recipes/sparxdb/sample.qea
parser: sparxdb
dest_root: ./build/sample_sparxdb_schema
templates_folder: ./mdg/templates
default_dialect: python
default_dialect: default
generation_artifacts:
# Avro Schema
- dest: "avro/{{cls.package.name}}.{{ cls.name }}.avsc"
Expand All @@ -16,11 +16,6 @@ generation_artifacts:
level: package
source: Schema/openapi.yaml.jinja
filter: "{% if package.classes %}True{% else %}False{% endif %}"
# Dataclass Avro
- dest: "python/{{package.name}}_dataclasses.py"
level: package
source: "Python/dataclass_avro.py.jinja"
filter: "{% if package.classes %}True{% else %}False{% endif %}"
test_templates:
- dest: ./build/json{{ins.package.path}}/{{ins.stereotype}}.json
format: json
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def find_packages(srcdir):

setuptools.setup(
name='pymdg',
version='1.1.0',
version='1.2.0',
author='Semprini',
author_email='[email protected]',
description='Model driven genration - from UML to Code & Docs',
Expand Down

0 comments on commit c393f40

Please sign in to comment.