Skip to content

Commit

Permalink
Output files removed. Included comments clarifying that input files s…
Browse files Browse the repository at this point in the history
…hould be changed depending on the user.
  • Loading branch information
GersonEsquivel committed Mar 14, 2024
1 parent 347f86c commit 14c3bd0
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 270 deletions.
46 changes: 0 additions & 46 deletions XML_to_SON/Templates/Enrichment.tmpl

This file was deleted.

75 changes: 0 additions & 75 deletions XML_to_SON/Templates/FuelFab.tmpl

This file was deleted.

31 changes: 0 additions & 31 deletions XML_to_SON/Templates/KFacility.tmpl

This file was deleted.

43 changes: 0 additions & 43 deletions XML_to_SON/Templates/Predator.tmpl

This file was deleted.

22 changes: 0 additions & 22 deletions XML_to_SON/Templates/Prey.tmpl

This file was deleted.

25 changes: 0 additions & 25 deletions XML_to_SON/Templates/Sink.tmpl

This file was deleted.

22 changes: 0 additions & 22 deletions XML_to_SON/Templates/Source.tmpl

This file was deleted.

12 changes: 6 additions & 6 deletions XML_to_SON/grammar_parser_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def process_element_mjson(node, parent_attrib={}):
ele_dict[name] = attributes
return ele_dict

file = os.path.dirname(__file__) + '\\m.json'
file = os.path.dirname(__file__) + '\\m.json' # A sample file is being used currently. The file should be changed depending on the user/purpose.
with open(file, 'r') as file:
m_json = json.load(file)

Expand Down Expand Up @@ -189,7 +189,7 @@ def process_element_mjson(node, parent_attrib={}):
processed_institutions.update(processed_and_wrapped)
institutions.append(entity_name)

tree = ET.parse('schema.xml')
tree = ET.parse('sample_schema.xml') # A sample file is being used currently. The file should be changed depending on the user/purpose.
root = tree.getroot()
ns = re.match(r'\{.*\}', root.tag).group(0)
simulation = root[0][0]
Expand Down Expand Up @@ -323,7 +323,7 @@ def save_template_for_all_schemas(processed_schemas, annotations, folder_name =
file.write(template_string)
print(f"Template for {key_name} saved as {filename}")


save_template_for_all_schemas(processed_facilities, m_json["annotations"])
save_template_for_all_schemas(processed_regions, m_json["annotations"])
save_template_for_all_schemas(processed_institutions, m_json["annotations"])
# These following lines create the templates and save them in a folder named "Templates"
# save_template_for_all_schemas(processed_facilities, m_json["annotations"])
# save_template_for_all_schemas(processed_regions, m_json["annotations"])
# save_template_for_all_schemas(processed_institutions, m_json["annotations"])
File renamed without changes.

0 comments on commit 14c3bd0

Please sign in to comment.