Skip to content

Commit

Permalink
Merge pull request #28 from george0st/changes
Browse files Browse the repository at this point in the history
Bump qgate-graph & tune tests
  • Loading branch information
george0st authored Sep 3, 2024
2 parents a81128e + 9c4ab11 commit 7ab6cc2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ contourpy>=1.0.0,<=1.3.0
psutil>=5.9.0,<=6.0.0
packaging>=21.0

qgate_graph==1.4.12
qgate_graph==1.4.13

coverage>=7
coverage-badge>=1
Expand Down
2 changes: 1 addition & 1 deletion qgate_perf/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Store the version here so:

__version__ = '0.4.12'
__version__ = '0.4.13'
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ contourpy>=1.0.0,<=1.3.0
psutil>=5.9.0,<=6.0.0
packaging>=21.0

qgate_graph==1.4.12
qgate_graph==1.4.13
18 changes: 12 additions & 6 deletions tests/test_graph.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import datetime
import glob
import unittest
from qgate_perf.parallel_executor import ParallelExecutor
Expand Down Expand Up @@ -67,11 +68,12 @@ def test_graph(self):
setup))
generator.create_graph(self.OUTPUT_ADR)

file=glob.glob(path.join(self.OUTPUT_ADR, "graph-perf", "4 sec", f"PRF-test_aus_ger-*-bulk-10x10.png"))
today = datetime.datetime.now().strftime("%Y-%m-%d")
file=glob.glob(path.join(self.OUTPUT_ADR, "graph-perf", "4 sec", today, f"PRF-test_aus_ger-*-bulk-10x10.png"))
self.assertTrue(len(file) == 1)
print(file[0])

file=glob.glob(path.join(self.OUTPUT_ADR, "graph-perf", "4 sec", f"PRF-test_aus_ger-*-bulk-100x10.png"))
file=glob.glob(path.join(self.OUTPUT_ADR, "graph-perf", "4 sec", today, f"PRF-test_aus_ger-*-bulk-100x10.png"))
self.assertTrue(len(file) == 1)
print(file[0])

Expand All @@ -87,7 +89,8 @@ def test_graph_run_exception(self):
self.assertFalse(generator.run(1,1, setup))
generator.create_graph(self.OUTPUT_ADR)

file=glob.glob(path.join(self.OUTPUT_ADR, "graph-perf", "4 sec", f"PRF-test_exception-*-bulk-1x1.png"))
today = datetime.datetime.now().strftime("%Y-%m-%d")
file=glob.glob(path.join(self.OUTPUT_ADR, "graph-perf", "4 sec", today, f"PRF-test_exception-*-bulk-1x1.png"))
self.assertTrue(len(file) == 1)
print(file[0])

Expand All @@ -103,7 +106,8 @@ def test_graph_runexecutor_exception(self):
self.assertFalse(generator.run_executor([[2,2]], setup))
generator.create_graph(self.OUTPUT_ADR)

file=glob.glob(path.join(self.OUTPUT_ADR, "graph-perf", "4 sec", f"PRF-test_exception2-*-bulk-1x1.png"))
today = datetime.datetime.now().strftime("%Y-%m-%d")
file=glob.glob(path.join(self.OUTPUT_ADR, "graph-perf", "4 sec", today, f"PRF-test_exception2-*-bulk-1x1.png"))
self.assertTrue(len(file) == 1)
print(file[0])

Expand All @@ -124,12 +128,14 @@ def test_graph_runbulkexecutor_exception_random(self):
generator.run_bulk_executor([[1,1], [1,5]], [[4,4],[8,4],[16,4]], setup)
generator.create_graph(self.OUTPUT_ADR)

today = datetime.datetime.now().strftime("%Y-%m-%d")

# check relevant files
file=glob.glob(path.join(self.OUTPUT_ADR, "graph-perf", "4 sec", f"PRF-test_random-*-bulk-1x1.png"))
file=glob.glob(path.join(self.OUTPUT_ADR, "graph-perf", "4 sec", today, f"PRF-test_random-*-bulk-1x1.png"))
self.assertTrue(len(file)==1)
print(file[0])

file=glob.glob(path.join(self.OUTPUT_ADR, "graph-perf", "4 sec", f"PRF-test_random-*-bulk-1x5.png"))
file=glob.glob(path.join(self.OUTPUT_ADR, "graph-perf", "4 sec", today, f"PRF-test_random-*-bulk-1x5.png"))
self.assertTrue(len(file) == 1)
print(file[0])

0 comments on commit 7ab6cc2

Please sign in to comment.