33from rdflib import Graph
44import matplotlib .pyplot as plt
55from collections import defaultdict
6- from generate_config import workflow_config
76
87def load_graphs (base_dir ):
98 """
@@ -25,12 +24,11 @@ def load_graphs(base_dir):
2524 return graph_list
2625
2726
28- def query_and_build_table (graph_list ):
27+ def query_and_build_table (graph_list , tools ):
2928 """
3029 Run SPARQL query on graphs and build a table.
3130 Returns headers and table_data.
3231 """
33- tools = workflow_config ["tools" ]
3432 filter_conditions = " || " .join (
3533 f'CONTAINS(LCASE(?tool_name), "{ tool .lower ()} ")' for tool in tools
3634 )
@@ -147,7 +145,7 @@ def plot_element_size_vs_stress(headers, table_data, output_file="element_size_v
147145 parser = argparse .ArgumentParser (description = "Process JSON-LD artifacts and display simulation results." )
148146 parser .add_argument ("artifact_folder" , type = str , help = "Path to the folder containing unzipped artifacts" )
149147 args = parser .parse_args ()
150-
148+ tools = [ "fenics" , "kratos" ] # Specify the simulation tools used for filtering knowledge graphs
151149 graphs = load_graphs (args .artifact_folder )
152- headers , table_data = query_and_build_table (graphs )
150+ headers , table_data = query_and_build_table (graphs , tools )
153151 plot_element_size_vs_stress (headers , table_data , output_file = "element_size_vs_stress.pdf" )
0 commit comments