1
0
Fork 0

Fix import issue in tests ;Add a basic main example

parallel_struct_est
philpMartin 4 years ago
parent 813c2943bd
commit 8e1666a607
  1. 0
      main_package/.scannerwork/.sonar_lock
  2. 6
      main_package/.scannerwork/report-task.txt
  3. 39
      main_package/basic_main.py
  4. 1
      main_package/classes/abstract_sample_path.py
  5. 1
      main_package/classes/cache.py
  6. 8
      main_package/classes/json_importer.py
  7. 5
      main_package/classes/network_graph.py
  8. 7
      main_package/classes/parameters_estimator.py
  9. 2
      main_package/classes/sample_path.py
  10. 4
      main_package/classes/set_of_cims.py
  11. 1
      main_package/classes/structure.py
  12. 18
      main_package/classes/structure_estimator.py
  13. 963
      main_package/tests/coverage.xml
  14. 2
      main_package/tests/test_cache.py
  15. 2
      main_package/tests/test_cim.py
  16. 4
      main_package/tests/test_json_importer.py
  17. 3
      main_package/tests/test_networkgraph.py
  18. 3
      main_package/tests/test_parameters_estimator.py
  19. 2
      main_package/tests/test_sample_path.py
  20. 2
      main_package/tests/test_setofcims.py
  21. 5
      main_package/tests/test_sets_of_cims_container.py
  22. 2
      main_package/tests/test_structure.py
  23. 19
      main_package/tests/test_structure_estimator.py
  24. 2
      main_package/tests/test_trajectory.py

@ -0,0 +1,6 @@
projectKey=Ctbn_Project
serverUrl=http://localhost:9000
serverVersion=8.4.1.35646
dashboardUrl=http://localhost:9000/dashboard?id=Ctbn_Project
ceTaskId=AXPs4gCNB9mzoAo2hiLI
ceTaskUrl=http://localhost:9000/api/ce/task?id=AXPs4gCNB9mzoAo2hiLI

@ -0,0 +1,39 @@
import glob
import os
import sys
sys.path.append("./classes/")
import network_graph as ng
import sample_path as sp
import set_of_cims as sofc
import parameters_estimator as pe
import json_importer as ji
def main():
read_files = glob.glob(os.path.join('./data', "*.json")) #Take all json files in this dir
#import data
importer = ji.JsonImporter(read_files[0], 'samples', 'dyn.str', 'variables', 'Time', 'Name')
#Create a SamplePath Obj
s1 = sp.SamplePath(importer)
#Build The trajectries and the structural infos
s1.build_trajectories()
s1.build_structure()
#From The Structure Object build the Graph
g = ng.NetworkGraph(s1.structure)
#Select a node you want to estimate the parameters
node = g.nodes[1]
#Init the graph specifically for THIS node
g.fast_init(node)
#Use SamplePath and Grpah to create a ParametersEstimator Object
p1 = pe.ParametersEstimator(s1, g)
#Init the peEst specifically for THIS node
p1.fast_init(node)
#Compute the parameters
sofc1 = p1.compute_parameters_for_node(node)
#The est CIMS are inside the resultant SetOfCIms Obj
print(sofc1.actual_cims)
if __name__ == "__main__":
main()

@ -1,4 +1,5 @@
from abc import ABC, abstractmethod
import abstract_importer as ai

@ -1,4 +1,5 @@
import typing
import set_of_cims as sofc

@ -1,11 +1,13 @@
import pandas as pd
import json
import typing
from abstract_importer import AbstractImporter
import pandas as pd
import abstract_importer as ai
class JsonImporter(AbstractImporter):
class JsonImporter(ai.AbstractImporter):
"""
Implements the Interface AbstractImporter and adds all the necessary methods to process and prepare the data in json ext.
with the following structure:

@ -1,7 +1,8 @@
import typing
import networkx as nx
import numpy as np
import typing
class NetworkGraph:
@ -21,7 +22,7 @@ class NetworkGraph:
:_transition_scalar_indexing_structure: the indexing structure for transition computation
:_time_filtering: the columns filtering structure used in the computation of the state res times
:_transition_filtering: the columns filtering structure used in the computation of the transition from one state to another
:self._p_combs_structure: all the possibile parents states combination for every node in the net
:self._p_combs_structure: all the possible parents states combination for every node in the net
"""
def __init__(self, graph_struct):

@ -1,9 +1,10 @@
import numpy as np
import sets_of_cims_container as acims
import set_of_cims as sofc
import sample_path as sp
import network_graph as ng
import sample_path as sp
import set_of_cims as sofc
import sets_of_cims_container as acims
class ParametersEstimator:

@ -1,7 +1,7 @@
import abstract_sample_path as asam
import json_importer as imp
import trajectory as tr
import structure as st
import trajectory as tr
class SamplePath(asam.AbstractSamplePath):

@ -1,5 +1,7 @@
import numpy as np
import typing
import numpy as np
import conditional_intensity_matrix as cim

@ -1,4 +1,5 @@
import typing as ty
import numpy as np

@ -1,20 +1,20 @@
import numpy as np
import itertools
import networkx as nx
from networkx.readwrite import json_graph
import json
import typing
from scipy.stats import f as f_dist
from scipy.stats import chi2 as chi2_dist
import networkx as nx
import numpy as np
from networkx.readwrite import json_graph
from scipy.stats import chi2 as chi2_dist
from scipy.stats import f as f_dist
import sample_path as sp
import structure as st
import network_graph as ng
import cache as ch
import conditional_intensity_matrix as condim
import network_graph as ng
import parameters_estimator as pe
import cache as ch
import sample_path as sp
import structure as st
class StructureEstimator:

@ -0,0 +1,963 @@
<?xml version="1.0" ?>
<coverage version="5.2" timestamp="1597406229874" lines-valid="891" lines-covered="638" line-rate="0.716" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0">
<!-- Generated by coverage.py: https://coverage.readthedocs.io -->
<!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd -->
<sources>
<source></source>
</sources>
<packages>
<package name="." line-rate="1" branch-rate="0" complexity="0">
<classes>
<class name="test_json_importer.py" filename="test_json_importer.py" complexity="0" line-rate="1" branch-rate="0">
<methods/>
<lines>
<line number="1" hits="1"/>
<line number="2" hits="1"/>
<line number="3" hits="1"/>
<line number="4" hits="1"/>
<line number="5" hits="1"/>
<line number="6" hits="1"/>
<line number="7" hits="1"/>
<line number="8" hits="1"/>
<line number="10" hits="1"/>
<line number="12" hits="1"/>
<line number="16" hits="1"/>
<line number="18" hits="1"/>
<line number="19" hits="1"/>
<line number="20" hits="1"/>
<line number="22" hits="1"/>
<line number="23" hits="1"/>
<line number="24" hits="1"/>
<line number="25" hits="1"/>
<line number="26" hits="1"/>
<line number="27" hits="1"/>
<line number="28" hits="1"/>
<line number="29" hits="1"/>
<line number="30" hits="1"/>
<line number="31" hits="1"/>
<line number="32" hits="1"/>
<line number="33" hits="1"/>
<line number="34" hits="1"/>
<line number="36" hits="1"/>
<line number="37" hits="1"/>
<line number="38" hits="1"/>
<line number="39" hits="1"/>
<line number="40" hits="1"/>
<line number="41" hits="1"/>
<line number="42" hits="1"/>
<line number="43" hits="1"/>
<line number="44" hits="1"/>
<line number="45" hits="1"/>
<line number="47" hits="1"/>
<line number="48" hits="1"/>
<line number="49" hits="1"/>
<line number="50" hits="1"/>
<line number="51" hits="1"/>
<line number="53" hits="1"/>
<line number="54" hits="1"/>
<line number="55" hits="1"/>
<line number="57" hits="1"/>
<line number="58" hits="1"/>
<line number="59" hits="1"/>
<line number="61" hits="1"/>
<line number="62" hits="1"/>
<line number="63" hits="1"/>
<line number="64" hits="1"/>
<line number="66" hits="1"/>
<line number="67" hits="1"/>
<line number="68" hits="1"/>
<line number="69" hits="1"/>
<line number="71" hits="1"/>
<line number="72" hits="1"/>
<line number="73" hits="1"/>
<line number="74" hits="1"/>
<line number="75" hits="1"/>
<line number="76" hits="1"/>
<line number="77" hits="1"/>
<line number="78" hits="1"/>
<line number="80" hits="1"/>
<line number="82" hits="1"/>
<line number="84" hits="1"/>
<line number="85" hits="1"/>
<line number="86" hits="1"/>
<line number="87" hits="1"/>
<line number="88" hits="1"/>
<line number="89" hits="1"/>
<line number="90" hits="1"/>
<line number="92" hits="1"/>
<line number="93" hits="1"/>
<line number="94" hits="1"/>
<line number="95" hits="1"/>
<line number="96" hits="1"/>
<line number="97" hits="1"/>
<line number="98" hits="1"/>
<line number="99" hits="1"/>
<line number="101" hits="1"/>
<line number="102" hits="1"/>
<line number="103" hits="1"/>
<line number="104" hits="1"/>
<line number="105" hits="1"/>
<line number="107" hits="1"/>
<line number="108" hits="1"/>
<line number="109" hits="1"/>
<line number="110" hits="1"/>
<line number="111" hits="1"/>
<line number="112" hits="1"/>
<line number="113" hits="1"/>
<line number="114" hits="1"/>
<line number="115" hits="1"/>
<line number="116" hits="1"/>
<line number="117" hits="1"/>
<line number="118" hits="1"/>
<line number="119" hits="1"/>
<line number="120" hits="1"/>
<line number="121" hits="1"/>
<line number="122" hits="1"/>
<line number="124" hits="1"/>
<line number="125" hits="1"/>
<line number="126" hits="1"/>
<line number="127" hits="1"/>
<line number="128" hits="1"/>
<line number="129" hits="1"/>
<line number="131" hits="1"/>
<line number="132" hits="1"/>
<line number="133" hits="1"/>
<line number="134" hits="1"/>
<line number="136" hits="1"/>
<line number="138" hits="1"/>
<line number="139" hits="1"/>
<line number="140" hits="1"/>
<line number="141" hits="1"/>
<line number="142" hits="1"/>
<line number="143" hits="1"/>
<line number="145" hits="1"/>
<line number="146" hits="1"/>
<line number="147" hits="1"/>
<line number="154" hits="1"/>
<line number="156" hits="1"/>
<line number="157" hits="1"/>
<line number="158" hits="1"/>
<line number="160" hits="1"/>
<line number="161" hits="1"/>
<line number="162" hits="1"/>
<line number="163" hits="1"/>
<line number="164" hits="1"/>
<line number="166" hits="1"/>
<line number="169" hits="1"/>
<line number="170" hits="1"/>
</lines>
</class>
<class name="test_sample_path.py" filename="test_sample_path.py" complexity="0" line-rate="1" branch-rate="0">
<methods/>
<lines>
<line number="1" hits="1"/>
<line number="2" hits="1"/>
<line number="3" hits="1"/>
<line number="4" hits="1"/>
<line number="5" hits="1"/>
<line number="6" hits="1"/>
<line number="7" hits="1"/>
<line number="8" hits="1"/>
<line number="9" hits="1"/>
<line number="12" hits="1"/>
<line number="14" hits="1"/>
<line number="15" hits="1"/>
<line number="16" hits="1"/>
<line number="17" hits="1"/>
<line number="19" hits="1"/>
<line number="20" hits="1"/>
<line number="21" hits="1"/>
<line number="22" hits="1"/>
<line number="23" hits="1"/>
<line number="24" hits="1"/>
<line number="25" hits="1"/>
<line number="26" hits="1"/>
<line number="27" hits="1"/>
<line number="28" hits="1"/>
<line number="29" hits="1"/>
<line number="30" hits="1"/>
<line number="33" hits="1"/>
<line number="34" hits="1"/>
</lines>
</class>
<class name="test_trajectory.py" filename="test_trajectory.py" complexity="0" line-rate="1" branch-rate="0">
<methods/>
<lines>
<line number="1" hits="1"/>
<line number="2" hits="1"/>
<line number="3" hits="1"/>
<line number="4" hits="1"/>
<line number="6" hits="1"/>
<line number="9" hits="1"/>
<line number="11" hits="1"/>
<line number="12" hits="1"/>
<line number="13" hits="1"/>
<line number="14" hits="1"/>
<line number="15" hits="1"/>
<line number="16" hits="1"/>
<line number="17" hits="1"/>
<line number="18" hits="1"/>
<line number="20" hits="1"/>
<line number="21" hits="1"/>
<line number="22" hits="1"/>
<line number="24" hits="1"/>
<line number="25" hits="1"/>
<line number="26" hits="1"/>
<line number="27" hits="1"/>
<line number="28" hits="1"/>
<line number="30" hits="1"/>
<line number="31" hits="1"/>
<line number="32" hits="1"/>
<line number="33" hits="1"/>
<line number="35" hits="1"/>
<line number="36" hits="1"/>
<line number="37" hits="1"/>
<line number="38" hits="1"/>
<line number="40" hits="1"/>
<line number="41" hits="1"/>
<line number="42" hits="1"/>
<line number="43" hits="1"/>
<line number="46" hits="1"/>
<line number="47" hits="1"/>
</lines>
</class>
</classes>
</package>
<package name=".Users.Zalum.Desktop.Tesi.CTBN_Project.main_package.classes" line-rate="0.9059" branch-rate="0" complexity="0">
<classes>
<class name="abstract_importer.py" filename="/Users/Zalum/Desktop/Tesi/CTBN_Project/main_package/classes/abstract_importer.py" complexity="0" line-rate="0.8182" branch-rate="0">
<methods/>
<lines>
<line number="1" hits="1"/>
<line number="4" hits="1"/>
<line number="12" hits="1"/>
<line number="13" hits="1"/>
<line number="14" hits="1"/>
<line number="16" hits="1"/>
<line number="17" hits="1"/>
<line number="18" hits="0"/>
<line number="20" hits="1"/>
<line number="21" hits="1"/>
<line number="22" hits="0"/>
</lines>
</class>
<class name="abstract_sample_path.py" filename="/Users/Zalum/Desktop/Tesi/CTBN_Project/main_package/classes/abstract_sample_path.py" complexity="0" line-rate="0.8571" branch-rate="0">
<methods/>
<lines>
<line number="1" hits="1"/>
<line number="2" hits="1"/>
<line number="5" hits="1"/>
<line number="7" hits="1"/>
<line number="8" hits="1"/>
<line number="9" hits="1"/>
<line number="10" hits="1"/>
<line number="11" hits="1"/>
<line number="13" hits="1"/>
<line number="14" hits="1"/>
<line number="25" hits="0"/>
<line number="27" hits="1"/>
<line number="28" hits="1"/>
<line number="37" hits="0"/>
</lines>
</class>
<class name="json_importer.py" filename="/Users/Zalum/Desktop/Tesi/CTBN_Project/main_package/classes/json_importer.py" complexity="0" line-rate="1" branch-rate="0">
<methods/>
<lines>
<line number="2" hits="1"/>
<line number="3" hits="1"/>
<line number="4" hits="1"/>
<line number="5" hits="1"/>
<line number="8" hits="1"/>
<line number="30" hits="1"/>
<line number="32" hits="1"/>
<line number="33" hits="1"/>
<line number="34" hits="1"/>
<line number="35" hits="1"/>
<line number="36" hits="1"/>
<line number="37" hits="1"/>
<line number="38" hits="1"/>
<line number="39" hits="1"/>
<line number="40" hits="1"/>
<line number="41" hits="1"/>
<line number="42" hits="1"/>
<line number="44" hits="1"/>
<line number="52" hits="1"/>
<line number="53" hits="1"/>
<line number="54" hits="1"/>
<line number="55" hits="1"/>
<line number="56" hits="1"/>
<line number="57" hits="1"/>
<line number="59" hits="1"/>
<line number="67" hits="1"/>
<line number="69" hits="1"/>
<line number="78" hits="1"/>
<line number="81" hits="1"/>
<line number="92" hits="1"/>
<line number="96" hits="1"/>
<line number="97" hits="1"/>
<line number="98" hits="1"/>
<line number="99" hits="1"/>
<line number="100" hits="1"/>
<line number="102" hits="1"/>
<line number="116" hits="1"/>
<line number="117" hits="1"/>
<line number="118" hits="1"/>
<line number="122" hits="1"/>
<line number="134" hits="1"/>
<line number="136" hits="1"/>
<line number="149" hits="1"/>
<line number="150" hits="1"/>
<line number="151" hits="1"/>
<line number="152" hits="1"/>
<line number="153" hits="1"/>
<line number="154" hits="1"/>
<line number="156" hits="1"/>
<line number="171" hits="1"/>
<line number="172" hits="1"/>
<line number="174" hits="1"/>
<line number="175" hits="1"/>
<line number="176" hits="1"/>
<line number="177" hits="1"/>
<line number="179" hits="1"/>
<line number="189" hits="1"/>
<line number="190" hits="1"/>
<line number="191" hits="1"/>
<line number="193" hits="1"/>
<line number="194" hits="1"/>
<line number="195" hits="1"/>
<line number="196" hits="1"/>
<line number="198" hits="1"/>
<line number="201" hits="1"/>
<line number="209" hits="1"/>
<line number="212" hits="1"/>
<line number="214" hits="1"/>
<line number="222" hits="1"/>
<line number="224" hits="1"/>
<line number="228" hits="1"/>
<line number="229" hits="1"/>
<line number="231" hits="1"/>
<line number="232" hits="1"/>
<line number="233" hits="1"/>
<line number="234" hits="1"/>
<line number="235" hits="1"/>
<line number="236" hits="1"/>
<line number="237" hits="1"/>
<line number="238" hits="1"/>
<line number="240" hits="1"/>
<line number="241" hits="1"/>
<line number="242" hits="1"/>
<line number="244" hits="1"/>
<line number="245" hits="1"/>
<line number="246" hits="1"/>
<line number="248" hits="1"/>
<line number="249" hits="1"/>
<line number="250" hits="1"/>
</lines>
</class>
<class name="sample_path.py" filename="/Users/Zalum/Desktop/Tesi/CTBN_Project/main_package/classes/sample_path.py" complexity="0" line-rate="0.963" branch-rate="0">
<methods/>
<lines>
<line number="1" hits="1"/>
<line number="2" hits="1"/>
<line number="3" hits="1"/>
<line number="4" hits="1"/>
<line number="7" hits="1"/>
<line number="22" hits="1"/>
<line number="24" hits="1"/>
<line number="27" hits="1"/>
<line number="29" hits="1"/>
<line number="39" hits="1"/>
<line number="40" hits="1"/>
<line number="44" hits="1"/>
<line number="46" hits="1"/>
<line number="54" hits="1"/>
<line number="55" hits="1"/>
<line number="57" hits="1"/>
<line number="58" hits="1"/>
<line number="59" hits="1"/>
<line number="60" hits="1"/>
<line number="63" hits="1"/>
<line number="64" hits="1"/>
<line number="65" hits="1"/>
<line number="67" hits="1"/>
<line number="68" hits="1"/>
<line number="69" hits="1"/>
<line number="71" hits="1"/>
<line number="72" hits="0"/>
</lines>
</class>
<class name="structure.py" filename="/Users/Zalum/Desktop/Tesi/CTBN_Project/main_package/classes/structure.py" complexity="0" line-rate="0.65" branch-rate="0">
<methods/>
<lines>
<line number="1" hits="1"/>
<line number="2" hits="1"/>
<line number="5" hits="1"/>
<line number="16" hits="1"/>
<line number="18" hits="1"/>
<line number="19" hits="1"/>
<line number="20" hits="1"/>
<line number="21" hits="1"/>
<line number="22" hits="1"/>
<line number="24" hits="1"/>
<line number="25" hits="1"/>
<line number="28" hits="0"/>
<line number="30" hits="1"/>
<line number="31" hits="1"/>
<line number="32" hits="0"/>
<line number="34" hits="1"/>
<line number="35" hits="1"/>
<line number="36" hits="0"/>
<line number="38" hits="1"/>
<line number="39" hits="1"/>
<line number="40" hits="0"/>
<line number="42" hits="1"/>
<line number="43" hits="1"/>
<line number="44" hits="0"/>
<line number="46" hits="1"/>
<line number="47" hits="0"/>
<line number="49" hits="1"/>
<line number="50" hits="0"/>
<line number="51" hits="0"/>
<line number="53" hits="1"/>
<line number="54" hits="0"/>
<line number="56" hits="1"/>
<line number="57" hits="0"/>
<line number="58" hits="0"/>
<line number="60" hits="1"/>
<line number="61" hits="1"/>
<line number="64" hits="1"/>
<line number="66" hits="0"/>
<line number="67" hits="0"/>
<line number="72" hits="0"/>
</lines>
</class>
<class name="trajectory.py" filename="/Users/Zalum/Desktop/Tesi/CTBN_Project/main_package/classes/trajectory.py" complexity="0" line-rate="1" branch-rate="0">
<methods/>
<lines>
<line number="2" hits="1"/>
<line number="5" hits="1"/>
<line number="17" hits="1"/>
<line number="18" hits="1"/>
<line number="19" hits="1"/>
<line number="20" hits="1"/>
<line number="21" hits="1"/>
<line number="22" hits="1"/>
<line number="24" hits="1"/>
<line number="25" hits="1"/>
<line number="32" hits="1"/>
<line number="34" hits="1"/>
<line number="35" hits="1"/>
<line number="42" hits="1"/>
<line number="44" hits="1"/>
<line number="45" hits="1"/>
<line number="46" hits="1"/>
<line number="48" hits="1"/>
<line number="49" hits="1"/>
<line number="51" hits="1"/>
<line number="52" hits="1"/>
</lines>
</class>
</classes>
</package>
<package name=".Users.Zalum.Library.Python.3.8.lib.python.site-packages" line-rate="0.5234" branch-rate="0" complexity="0">
<classes>
<class name="six.py" filename="/Users/Zalum/Library/Python/3.8/lib/python/site-packages/six.py" complexity="0" line-rate="0.5234" branch-rate="0">
<methods/>
<lines>
<line number="21" hits="1"/>
<line number="23" hits="1"/>
<line number="25" hits="1"/>
<line number="26" hits="1"/>
<line number="27" hits="1"/>
<line number="28" hits="1"/>
<line number="29" hits="1"/>
<line number="31" hits="1"/>
<line number="32" hits="1"/>
<line number="36" hits="1"/>
<line number="37" hits="1"/>
<line number="38" hits="1"/>
<line number="40" hits="1"/>
<line number="41" hits="1"/>
<line number="42" hits="1"/>
<line number="43" hits="1"/>
<line number="44" hits="1"/>
<line number="45" hits="1"/>
<line number="47" hits="1"/>
<line number="49" hits="0"/>
<line number="50" hits="0"/>
<line number="51" hits="0"/>
<line number="52" hits="0"/>
<line number="53" hits="0"/>
<line number="55" hits="0"/>
<line number="57" hits="0"/>
<line number="60" hits="0"/>
<line number="62" hits="0"/>
<line number="63" hits="0"/>
<line number="64" hits="0"/>
<line number="65" hits="0"/>
<line number="66" hits="0"/>
<line number="68" hits="0"/>
<line number="71" hits="0"/>
<line number="72" hits="0"/>
<line number="75" hits="1"/>
<line number="77" hits="1"/>
<line number="80" hits="1"/>
<line number="82" hits="1"/>
<line number="83" hits="1"/>
<line number="86" hits="1"/>
<line number="88" hits="1"/>
<line number="89" hits="1"/>
<line number="91" hits="1"/>
<line number="92" hits="1"/>
<line number="93" hits="1"/>
<line number="94" hits="1"/>
<line number="97" hits="1"/>
<line number="98" hits="0"/>
<line number="99" hits="0"/>
<line number="100" hits="1"/>
<line number="103" hits="1"/>
<line number="105" hits="1"/>
<line number="106" hits="1"/>
<line number="107" hits="1"/>
<line number="108" hits="1"/>
<line number="109" hits="1"/>
<line number="110" hits="1"/>
<line number="112" hits="0"/>
<line number="114" hits="1"/>
<line number="115" hits="1"/>
<line number="117" hits="1"/>
<line number="118" hits="0"/>
<line number="119" hits="0"/>
<line number="120" hits="0"/>
<line number="121" hits="0"/>
<line number="124" hits="1"/>
<line number="126" hits="1"/>
<line number="127" hits="1"/>
<line number="128" hits="1"/>
<line number="130" hits="1"/>
<line number="131" hits="0"/>
<line number="132" hits="0"/>
<line number="133" hits="0"/>
<line number="136" hits="1"/>
<line number="139" hits="1"/>
<line number="141" hits="1"/>
<line number="142" hits="1"/>
<line number="143" hits="1"/>
<line number="144" hits="1"/>
<line number="145" hits="0"/>
<line number="146" hits="1"/>
<line number="147" hits="1"/>
<line number="148" hits="1"/>
<line number="149" hits="1"/>
<line number="151" hits="1"/>
<line number="152" hits="1"/>
<line number="154" hits="0"/>
<line number="155" hits="0"/>
<line number="156" hits="0"/>
<line number="157" hits="0"/>
<line number="159" hits="1"/>
<line number="160" hits="0"/>
<line number="161" hits="0"/>
<line number="164" hits="1"/>
<line number="173" hits="1"/>
<line number="174" hits="1"/>
<line number="175" hits="1"/>
<line number="177" hits="1"/>
<line number="178" hits="1"/>
<line number="179" hits="1"/>
<line number="181" hits="1"/>
<line number="182" hits="1"/>
<line number="184" hits="1"/>
<line number="185" hits="1"/>
<line number="186" hits="1"/>
<line number="187" hits="1"/>
<line number="189" hits="1"/>
<line number="190" hits="1"/>
<line number="191" hits="1"/>
<line number="192" hits="0"/>
<line number="193" hits="0"/>
<line number="195" hits="1"/>
<line number="196" hits="1"/>
<line number="198" hits="1"/>
<line number="199" hits="1"/>
<line number="200" hits="1"/>
<line number="201" hits="1"/>
<line number="202" hits="1"/>
<line number="203" hits="0"/>
<line number="205" hits="1"/>
<line number="206" hits="1"/>
<line number="207" hits="1"/>
<line number="209" hits="1"/>
<line number="216" hits="1"/>
<line number="218" hits="1"/>
<line number="222" hits="0"/>
<line number="223" hits="0"/>
<line number="224" hits="1"/>
<line number="226" hits="1"/>
<line number="229" hits="1"/>
<line number="232" hits="1"/>
<line number="235" hits="1"/>
<line number="307" hits="1"/>
<line number="308" hits="0"/>
<line number="312" hits="1"/>
<line number="313" hits="1"/>
<line number="314" hits="1"/>
<line number="315" hits="1"/>
<line number="316" hits="1"/>
<line number="318" hits="1"/>
<line number="320" hits="1"/>
<line number="321" hits="1"/>
<line number="324" hits="1"/>
<line number="329" hits="1"/>
<line number="356" hits="1"/>
<line number="357" hits="1"/>
<line number="358" hits="1"/>
<line number="360" hits="1"/>
<line number="362" hits="1"/>
<line number="366" hits="1"/>
<line number="371" hits="1"/>
<line number="376" hits="1"/>
<line number="377" hits="1"/>
<line number="378" hits="1"/>
<line number="380" hits="1"/>
<line number="382" hits="1"/>
<line number="386" hits="1"/>
<line number="391" hits="1"/>
<line number="428" hits="1"/>
<line number="429" hits="1"/>
<line number="430" hits="1"/>
<line number="432" hits="1"/>
<line number="434" hits="1"/>
<line number="438" hits="1"/>
<line number="443" hits="1"/>
<line number="449" hits="1"/>
<line number="450" hits="1"/>
<line number="451" hits="1"/>
<line number="453" hits="1"/>
<line number="455" hits="1"/>
<line number="459" hits="1"/>
<line number="464" hits="1"/>
<line number="467" hits="1"/>
<line number="468" hits="1"/>
<line number="469" hits="1"/>
<line number="471" hits="1"/>
<line number="473" hits="1"/>
<line number="477" hits="1"/>
<line number="480" hits="1"/>
<line number="481" hits="1"/>
<line number="482" hits="1"/>
<line number="483" hits="1"/>
<line number="484" hits="1"/>
<line number="485" hits="1"/>
<line number="487" hits="1"/>
<line number="488" hits="0"/>
<line number="490" hits="1"/>
<line number="494" hits="1"/>
<line number="496" hits="0"/>
<line number="499" hits="1"/>
<line number="501" hits="0"/>
<line number="502" hits="0"/>
<line number="503" hits="0"/>
<line number="504" hits="0"/>
<line number="505" hits="0"/>
<line number="506" hits="0"/>
<line number="507" hits="0"/>
<line number="510" hits="1"/>
<line number="511" hits="1"/>
<line number="512" hits="1"/>
<line number="514" hits="1"/>
<line number="515" hits="1"/>
<line number="516" hits="1"/>
<line number="517" hits="1"/>
<line number="519" hits="0"/>
<line number="520" hits="0"/>
<line number="522" hits="0"/>
<line number="523" hits="0"/>
<line number="524" hits="0"/>
<line number="525" hits="0"/>
<line number="528" hits="1"/>
<line number="529" hits="1"/>
<line number="530" hits="0"/>
<line number="531" hits="0"/>
<line number="532" hits="0"/>
<line number="533" hits="1"/>
<line number="536" hits="1"/>
<line number="537" hits="1"/>
<line number="538" hits="0"/>
<line number="539" hits="0"/>
<line number="540" hits="0"/>
<line number="543" hits="1"/>
<line number="544" hits="1"/>
<line number="545" hits="0"/>
<line number="547" hits="1"/>
<line number="549" hits="1"/>
<line number="550" hits="0"/>
<line number="552" hits="1"/>
<line number="554" hits="0"/>
<line number="555" hits="0"/>
<line number="557" hits="0"/>
<line number="558" hits="0"/>
<line number="560" hits="0"/>
<line number="561" hits="0"/>
<line number="563" hits="0"/>
<line number="565" hits="0"/>
<line number="566" hits="0"/>
<line number="568" hits="0"/>
<line number="569" hits="1"/>
<line number="573" hits="1"/>
<line number="574" hits="1"/>
<line number="575" hits="1"/>
<line number="576" hits="1"/>
<line number="577" hits="1"/>
<line number="578" hits="1"/>
<line number="581" hits="1"/>
<line number="582" hits="1"/>
<line number="583" hits="0"/>
<line number="585" hits="1"/>
<line number="586" hits="0"/>
<line number="588" hits="1"/>
<line number="589" hits="0"/>
<line number="591" hits="1"/>
<line number="592" hits="0"/>
<line number="594" hits="1"/>
<line number="596" hits="1"/>
<line number="598" hits="1"/>
<line number="600" hits="0"/>
<line number="601" hits="0"/>
<line number="603" hits="0"/>
<line number="604" hits="0"/>
<line number="606" hits="0"/>
<line number="607" hits="0"/>
<line number="609" hits="0"/>
<line number="610" hits="0"/>
<line number="612" hits="0"/>
<line number="614" hits="0"/>
<line number="616" hits="0"/>
<line number="618" hits="1"/>
<line number="619" hits="1"/>
<line number="620" hits="1"/>
<line number="622" hits="1"/>
<line number="626" hits="1"/>
<line number="627" hits="1"/>
<line number="628" hits="0"/>
<line number="630" hits="1"/>
<line number="631" hits="0"/>
<line number="632" hits="1"/>
<line number="633" hits="1"/>
<line number="634" hits="1"/>
<line number="635" hits="1"/>
<line number="636" hits="1"/>
<line number="637" hits="1"/>
<line number="638" hits="1"/>
<line number="639" hits="1"/>
<line number="640" hits="1"/>
<line number="641" hits="1"/>
<line number="642" hits="1"/>
<line number="643" hits="1"/>
<line number="644" hits="1"/>
<line number="645" hits="0"/>
<line number="646" hits="0"/>
<line number="647" hits="0"/>
<line number="649" hits="1"/>
<line number="650" hits="1"/>
<line number="651" hits="1"/>
<line number="653" hits="0"/>
<line number="654" hits="0"/>
<line number="657" hits="0"/>
<line number="658" hits="0"/>
<line number="659" hits="0"/>
<line number="660" hits="0"/>
<line number="662" hits="0"/>
<line number="663" hits="0"/>
<line number="665" hits="0"/>
<line number="666" hits="0"/>
<line number="667" hits="0"/>
<line number="668" hits="0"/>
<line number="669" hits="0"/>
<line number="670" hits="0"/>
<line number="671" hits="0"/>
<line number="672" hits="0"/>
<line number="673" hits="0"/>
<line number="674" hits="1"/>
<line number="675" hits="1"/>
<line number="678" hits="1"/>
<line number="679" hits="0"/>
<line number="682" hits="1"/>
<line number="683" hits="0"/>
<line number="686" hits="1"/>
<line number="687" hits="0"/>
<line number="690" hits="1"/>
<line number="691" hits="0"/>
<line number="694" hits="1"/>
<line number="695" hits="1"/>
<line number="697" hits="1"/>
<line number="698" hits="0"/>
<line number="699" hits="0"/>
<line number="700" hits="0"/>
<line number="701" hits="0"/>
<line number="702" hits="0"/>
<line number="703" hits="0"/>
<line number="705" hits="0"/>
<line number="706" hits="0"/>
<line number="709" hits="0"/>
<line number="711" hits="0"/>
<line number="712" hits="0"/>
<line number="713" hits="0"/>
<line number="714" hits="0"/>
<line number="715" hits="0"/>
<line number="716" hits="0"/>
<line number="717" hits="0"/>
<line number="718" hits="0"/>
<line number="719" hits="0"/>
<line number="721" hits="0"/>
<line number="729" hits="1"/>
<line number="730" hits="1"/>
<line number="737" hits="0"/>
<line number="738" hits="0"/>
<line number="741" hits="1"/>
<line number="742" hits="1"/>
<line number="743" hits="0"/>
<line number="745" hits="0"/>
<line number="746" hits="0"/>
<line number="747" hits="0"/>
<line number="749" hits="0"/>
<line number="750" hits="0"/>
<line number="751" hits="0"/>
<line number="753" hits="0"/>
<line number="756" hits="0"/>
<line number="757" hits="0"/>
<line number="758" hits="0"/>
<line number="759" hits="0"/>
<line number="760" hits="0"/>
<line number="761" hits="0"/>
<line number="762" hits="0"/>
<line number="763" hits="0"/>
<line number="764" hits="0"/>
<line number="765" hits="0"/>
<line number="766" hits="0"/>
<line number="767" hits="0"/>
<line number="768" hits="0"/>
<line number="769" hits="0"/>
<line number="770" hits="0"/>
<line number="771" hits="0"/>
<line number="772" hits="0"/>
<line number="773" hits="0"/>
<line number="774" hits="0"/>
<line number="775" hits="0"/>
<line number="776" hits="0"/>
<line number="777" hits="0"/>
<line number="778" hits="0"/>
<line number="779" hits="0"/>
<line number="780" hits="0"/>
<line number="781" hits="0"/>
<line number="782" hits="0"/>
<line number="783" hits="0"/>
<line number="785" hits="0"/>
<line number="786" hits="0"/>
<line number="787" hits="0"/>
<line number="788" hits="0"/>
<line number="789" hits="0"/>
<line number="790" hits="0"/>
<line number="791" hits="0"/>
<line number="792" hits="0"/>
<line number="793" hits="0"/>
<line number="794" hits="0"/>
<line number="795" hits="0"/>
<line number="796" hits="1"/>
<line number="797" hits="0"/>
<line number="799" hits="0"/>
<line number="800" hits="0"/>
<line number="801" hits="0"/>
<line number="802" hits="0"/>
<line number="803" hits="0"/>
<line number="804" hits="0"/>
<line number="806" hits="1"/>
<line number="808" hits="1"/>
<line number="814" hits="0"/>
<line number="817" hits="0"/>
<line number="818" hits="0"/>
<line number="819" hits="0"/>
<line number="820" hits="0"/>
<line number="821" hits="0"/>
<line number="823" hits="0"/>
<line number="824" hits="0"/>
<line number="825" hits="0"/>
<line number="826" hits="0"/>
<line number="827" hits="0"/>
<line number="828" hits="0"/>
<line number="830" hits="0"/>
<line number="832" hits="0"/>
<line number="834" hits="0"/>
<line number="837" hits="1"/>
<line number="840" hits="1"/>
<line number="845" hits="1"/>
<line number="847" hits="1"/>
<line number="848" hits="1"/>
<line number="851" hits="1"/>
<line number="852" hits="1"/>
<line number="853" hits="0"/>
<line number="855" hits="0"/>
<line number="856" hits="1"/>
<line number="858" hits="1"/>
<line number="859" hits="1"/>
<line number="860" hits="1"/>
<line number="861" hits="1"/>
<line number="864" hits="1"/>
<line number="866" hits="1"/>
<line number="867" hits="1"/>
<line number="868" hits="1"/>
<line number="869" hits="1"/>
<line number="870" hits="0"/>
<line number="871" hits="0"/>
<line number="872" hits="0"/>
<line number="873" hits="0"/>
<line number="874" hits="1"/>
<line number="875" hits="1"/>
<line number="876" hits="1"/>
<line number="877" hits="1"/>
<line number="878" hits="1"/>
<line number="879" hits="1"/>
<line number="882" hits="1"/>
<line number="893" hits="0"/>
<line number="894" hits="0"/>
<line number="895" hits="0"/>
<line number="896" hits="0"/>
<line number="898" hits="0"/>
<line number="901" hits="1"/>
<line number="912" hits="0"/>
<line number="913" hits="0"/>
<line number="914" hits="0"/>
<line number="915" hits="0"/>
<line number="916" hits="0"/>
<line number="917" hits="0"/>
<line number="918" hits="0"/>
<line number="921" hits="1"/>
<line number="932" hits="0"/>
<line number="933" hits="0"/>
<line number="934" hits="0"/>
<line number="935" hits="0"/>
<line number="937" hits="0"/>
<line number="940" hits="1"/>
<line number="948" hits="0"/>
<line number="949" hits="0"/>
<line number="950" hits="0"/>
<line number="953" hits="0"/>
<line number="954" hits="0"/>
<line number="955" hits="0"/>
<line number="961" hits="1"/>
<line number="962" hits="1"/>
<line number="963" hits="1"/>
<line number="964" hits="1"/>
<line number="968" hits="1"/>
<line number="969" hits="1"/>
<line number="974" hits="1"/>
<line number="976" hits="0"/>
<line number="977" hits="0"/>
<line number="978" hits="1"/>
<line number="980" hits="1"/>
</lines>
</class>
</classes>
</package>
</packages>
</coverage>

@ -1,5 +1,5 @@
import sys
sys.path.append("/Users/Zalum/Desktop/Tesi/CTBN_Project/main_package/classes/")
sys.path.append("../classes/")
import unittest
import numpy as np

@ -1,5 +1,5 @@
import sys
sys.path.append("/Users/Zalum/Desktop/Tesi/CTBN_Project/main_package/classes/")
sys.path.append("../classes/")
import unittest
import numpy as np

@ -1,5 +1,5 @@
import sys
sys.path.append("/Users/Zalum/Desktop/Tesi/CTBN_Project/main_package/classes/")
sys.path.append("../classes/")
import unittest
import os
import glob
@ -7,8 +7,6 @@ import numpy as np
import pandas as pd
import json_importer as ji
from line_profiler import LineProfiler
import json

@ -1,12 +1,11 @@
import sys
sys.path.append("/Users/Zalum/Desktop/Tesi/CTBN_Project/main_package/classes/")
sys.path.append("../classes/")
import unittest
import glob
import os
import networkx as nx
import numpy as np
import itertools
from line_profiler import LineProfiler
import sample_path as sp
import network_graph as ng

@ -1,10 +1,9 @@
import sys
sys.path.append("/Users/Zalum/Desktop/Tesi/CTBN_Project/main_package/classes/")
sys.path.append("../classes/")
import unittest
import numpy as np
import glob
import os
from line_profiler import LineProfiler
import network_graph as ng
import sample_path as sp

@ -1,5 +1,5 @@
import sys
sys.path.append("/Users/Zalum/Desktop/Tesi/CTBN_Project/main_package/classes/")
sys.path.append("../classes/")
import unittest
import glob
import os

@ -1,5 +1,5 @@
import sys
sys.path.append("/Users/Zalum/Desktop/Tesi/CTBN_Project/main_package/classes/")
sys.path.append("../classes/")
import unittest
import numpy as np
import itertools

@ -1,7 +1,8 @@
import sys
sys.path.append("../classes/")
import unittest
import sets_of_cims_container as scc
import set_of_cims as sc
import sets_of_cims_container as scc
class TestSetsOfCimsContainer(unittest.TestCase):

@ -1,5 +1,5 @@
import sys
sys.path.append("/Users/Zalum/Desktop/Tesi/CTBN_Project/main_package/classes/")
sys.path.append("../classes/")
import unittest
import numpy as np
import structure as st

@ -1,24 +1,25 @@
import sys
sys.path.append("/Users/Zalum/Desktop/Tesi/CTBN_Project/main_package/classes/")
import unittest
import numpy as np
import networkx as nx
sys.path.append("../classes/")
import glob
import os
import math
from line_profiler import LineProfiler
import os
import unittest
import networkx as nx
import numpy as np
import psutil
from line_profiler import LineProfiler
import json_importer as ji
import cache as ch
import sample_path as sp
import structure_estimator as se
import cache as ch
import json_importer as ji
class TestStructureEstimator(unittest.TestCase):
@classmethod
def setUpClass(cls) -> None:
def setUpClass(cls):
cls.read_files = glob.glob(os.path.join('../data', "*.json"))
cls.importer = ji.JsonImporter(cls.read_files[0], 'samples', 'dyn.str', 'variables', 'Time', 'Name')
cls.s1 = sp.SamplePath(cls.importer)

@ -1,5 +1,5 @@
import sys
sys.path.append("/Users/Zalum/Desktop/Tesi/CTBN_Project/main_package/classes/")
sys.path.append("../classes/")
import unittest
import numpy as np