-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Generation rules creator for Asset Encumberance #1342
- Loading branch information
1 parent
dc3c3b9
commit ae56986
Showing
18 changed files
with
188 additions
and
54 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
59 changes: 59 additions & 0 deletions
59
bird/birdseed_creator/src/entry_points/create_outline_transformations_ae.py
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,59 @@ | ||
# coding=UTF-8# | ||
# Copyright (c) 2020 Bird Software Solutions Ltd | ||
# This program and the accompanying materials | ||
# are made available under the terms of the Eclipse Public License 2.0 | ||
# which accompanies this distribution, and is available at | ||
# https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
# Contributors: | ||
# Neil Mackenzie - initial API and implementation | ||
# | ||
from context.context import Context | ||
from context.sdd_context import SDDContext | ||
from entry_points.website_to_sddmodel import RunWebsiteToSDDModel | ||
from entry_points.sddmodel_to_datamodel_ae import RunSDDModelToDataModelAE | ||
from persister.persist_to_file import PersistToFile | ||
from process_steps.sddmodel_plus_datamodel_to_outline_transformations.main_catagory_finder import MainCatagoryFinder | ||
from process_steps.sddmodel_plus_datamodel_to_outline_transformations.generation_rule_creator import GenerationRuleCreator | ||
|
||
|
||
class GenerateGenerationRulesAE: | ||
|
||
def run(self,context,sdd_context): | ||
|
||
|
||
# we will create an ecore4reg representation of BIRD also | ||
# use codes not long names for columns | ||
context.use_codes = True | ||
# when finding source columns form the input layer, related | ||
# to items in the output layer we find columns with matching | ||
# variables not matching domains | ||
context.find_variable_with_same_domain = False | ||
# find the main catagories related with reports. | ||
MainCatagoryFinder().create_report_to_main_catogory_maps(context,sdd_context) | ||
# create the generation rules | ||
GenerationRuleCreator().generate_generation_rules(context,sdd_context) | ||
# save the generated files in useful formats | ||
|
||
|
||
|
||
|
||
if __name__ == '__main__': | ||
sdd_context = SDDContext() | ||
context = Context() | ||
context.file_directory = '/workspaces/efbt/bird/birdseed_creator/resources' | ||
context.output_directory = '/workspaces/efbt/bird/birdseed_creator/results' | ||
sdd_context.file_directory = '/workspaces/efbt/bird/birdseed_creator/resources' | ||
sdd_context.output_directory = '/workspaces/efbt/bird/birdseed_creator/results' | ||
|
||
|
||
RunWebsiteToSDDModel().run(sdd_context) | ||
RunSDDModelToDataModelAE().run(context,sdd_context) | ||
GenerateGenerationRulesAE().run(context,sdd_context) | ||
persister = PersistToFile() | ||
persister.save_model_as_regdna_file(context) | ||
persister.persist_generation_transformations(context) | ||
persister.persist_generation_transformations_to_csv(context) | ||
|
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
53 changes: 53 additions & 0 deletions
53
bird/birdseed_creator/src/entry_points/sddmodel_to_datamodel_finrep.py
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,53 @@ | ||
# coding=UTF-8# | ||
# Copyright (c) 2020 Bird Software Solutions Ltd | ||
# This program and the accompanying materials | ||
# are made available under the terms of the Eclipse Public License 2.0 | ||
# which accompanies this distribution, and is available at | ||
# https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
# Contributors: | ||
# Neil Mackenzie - initial API and implementation | ||
# | ||
''' | ||
Created on 25 April 2022 | ||
''' | ||
|
||
from entry_points.website_to_sddmodel import RunWebsiteToSDDModel | ||
from context.context import Context | ||
from context.sdd_context import SDDContext | ||
from process_steps.sddmodel_to_datamodel.translate_sddmodel_to_datamodel import TranslateSDDModelToDataModel | ||
from persister.persist_to_file import PersistToFile | ||
from utils.relationship_enricher import RelationshipEnricher | ||
|
||
class RunSDDModelToDataModelFinrep: | ||
|
||
def run(self,context,sdd_context): | ||
context.persist_to_regdna = True | ||
context.load_eil_from_website = True | ||
context.reporting_framework = "FINREP" | ||
context.reporting_framework_version = ["3","3.0-Ind","FINREP 3.0-Ind"] | ||
TranslateSDDModelToDataModel().do_import(context,sdd_context) | ||
RelationshipEnricher().enrich(context) | ||
|
||
|
||
|
||
if __name__ == '__main__': | ||
sdd_context = SDDContext() | ||
context = Context() | ||
context.file_directory = '/workspaces/efbt/bird/birdseed_creator/resources' | ||
context.output_directory = '/workspaces/efbt/bird/birdseed_creator/results' | ||
sdd_context.file_directory = '/workspaces/efbt/bird/birdseed_creator/resources' | ||
sdd_context.output_directory = '/workspaces/efbt/bird/birdseed_creator/results' | ||
RunWebsiteToSDDModel().run(sdd_context) | ||
RunSDDModelToDataModelFinrep().run(context,sdd_context) | ||
persister = PersistToFile() | ||
persister.save_model_as_regdna_file(context) | ||
persister.save_model_as_xmi_file(context) | ||
|
||
|
||
|
||
|
||
|
||
|
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
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
Oops, something went wrong.