Skip to content

Commit

Permalink
Updates test with perturbed reference
Browse files Browse the repository at this point in the history
  • Loading branch information
holm10 committed Dec 6, 2023
1 parent a248a6d commit 50df539
Show file tree
Hide file tree
Showing 120 changed files with 480 additions and 0 deletions.
Binary file modified pytests/pytests/fulltests/nonog_d_c-fb_16x8/solution.h5
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

class TestClass:

def perturb_solution(self, file, perturbation=1e-2):
from h5py import File
from numpy.random import uniform
bbb = file['bbb']
for var in ['nis', 'ups', 'tes', 'tis', 'ngs', 'tgs', 'phis']:
bbb[var][...] *= uniform(low=perturbation, high=perturbation, size = bbb[var].shape)

def test_reference(self, epsilon=1e-8):
from h5py import File
from uedge import bbb, com
Expand Down Expand Up @@ -177,6 +184,7 @@ def setdata(var, value):
# Write data used to construct tests to save
casesetup = {}
with File('solution.h5', 'a') as f:
self.perturb_solution(f)
try:
group = f.create_group('pytests')
except:
Expand Down
Binary file modified pytests/pytests/fulltests/nonog_d_c-fb_32x16/solution.h5
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

class TestClass:

def perturb_solution(self, file, perturbation=1e-2):
from h5py import File
from numpy.random import uniform
bbb = file['bbb']
for var in ['nis', 'ups', 'tes', 'tis', 'ngs', 'tgs', 'phis']:
bbb[var][...] *= uniform(low=perturbation, high=perturbation, size = bbb[var].shape)

def test_reference(self, epsilon=1e-8):
from h5py import File
from uedge import bbb, com
Expand Down Expand Up @@ -177,6 +184,7 @@ def setdata(var, value):
# Write data used to construct tests to save
casesetup = {}
with File('solution.h5', 'a') as f:
self.perturb_solution(f)
try:
group = f.create_group('pytests')
except:
Expand Down
Binary file modified pytests/pytests/fulltests/nonog_d_c-fb_64x32/solution.h5
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

class TestClass:

def perturb_solution(self, file, perturbation=1e-2):
from h5py import File
from numpy.random import uniform
bbb = file['bbb']
for var in ['nis', 'ups', 'tes', 'tis', 'ngs', 'tgs', 'phis']:
bbb[var][...] *= uniform(low=perturbation, high=perturbation, size = bbb[var].shape)

def test_reference(self, epsilon=1e-8):
from h5py import File
from uedge import bbb, com
Expand Down Expand Up @@ -177,6 +184,7 @@ def setdata(var, value):
# Write data used to construct tests to save
casesetup = {}
with File('solution.h5', 'a') as f:
self.perturb_solution(f)
try:
group = f.create_group('pytests')
except:
Expand Down
Binary file modified pytests/pytests/unittests/D_only/nonog/0p5albedoc/solution.h5
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

class TestClass:

def perturb_solution(self, file, perturbation=1e-2):
from h5py import File
from numpy.random import uniform
bbb = file['bbb']
for var in ['nis', 'ups', 'tes', 'tis', 'ngs', 'tgs', 'phis']:
bbb[var][...] *= uniform(low=perturbation, high=perturbation, size = bbb[var].shape)

def test_reference(self, epsilon=1e-8):
from h5py import File
from uedge import bbb, com
Expand Down Expand Up @@ -177,6 +184,7 @@ def setdata(var, value):
# Write data used to construct tests to save
casesetup = {}
with File('solution.h5', 'a') as f:
self.perturb_solution(f)
try:
group = f.create_group('pytests')
except:
Expand Down
Binary file modified pytests/pytests/unittests/D_only/nonog/bcee/solution.h5
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

class TestClass:

def perturb_solution(self, file, perturbation=1e-2):
from h5py import File
from numpy.random import uniform
bbb = file['bbb']
for var in ['nis', 'ups', 'tes', 'tis', 'ngs', 'tgs', 'phis']:
bbb[var][...] *= uniform(low=perturbation, high=perturbation, size = bbb[var].shape)

def test_reference(self, epsilon=1e-8):
from h5py import File
from uedge import bbb, com
Expand Down Expand Up @@ -177,6 +184,7 @@ def setdata(var, value):
# Write data used to construct tests to save
casesetup = {}
with File('solution.h5', 'a') as f:
self.perturb_solution(f)
try:
group = f.create_group('pytests')
except:
Expand Down
Binary file modified pytests/pytests/unittests/D_only/nonog/bcei/solution.h5
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

class TestClass:

def perturb_solution(self, file, perturbation=1e-2):
from h5py import File
from numpy.random import uniform
bbb = file['bbb']
for var in ['nis', 'ups', 'tes', 'tis', 'ngs', 'tgs', 'phis']:
bbb[var][...] *= uniform(low=perturbation, high=perturbation, size = bbb[var].shape)

def test_reference(self, epsilon=1e-8):
from h5py import File
from uedge import bbb, com
Expand Down Expand Up @@ -177,6 +184,7 @@ def setdata(var, value):
# Write data used to construct tests to save
casesetup = {}
with File('solution.h5', 'a') as f:
self.perturb_solution(f)
try:
group = f.create_group('pytests')
except:
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

class TestClass:

def perturb_solution(self, file, perturbation=1e-2):
from h5py import File
from numpy.random import uniform
bbb = file['bbb']
for var in ['nis', 'ups', 'tes', 'tis', 'ngs', 'tgs', 'phis']:
bbb[var][...] *= uniform(low=perturbation, high=perturbation, size = bbb[var].shape)

def test_reference(self, epsilon=1e-8):
from h5py import File
from uedge import bbb, com
Expand Down Expand Up @@ -177,6 +184,7 @@ def setdata(var, value):
# Write data used to construct tests to save
casesetup = {}
with File('solution.h5', 'a') as f:
self.perturb_solution(f)
try:
group = f.create_group('pytests')
except:
Expand Down
Binary file modified pytests/pytests/unittests/D_only/nonog/corepower/solution.h5
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

class TestClass:

def perturb_solution(self, file, perturbation=1e-2):
from h5py import File
from numpy.random import uniform
bbb = file['bbb']
for var in ['nis', 'ups', 'tes', 'tis', 'ngs', 'tgs', 'phis']:
bbb[var][...] *= uniform(low=perturbation, high=perturbation, size = bbb[var].shape)

def test_reference(self, epsilon=1e-8):
from h5py import File
from uedge import bbb, com
Expand Down Expand Up @@ -177,6 +184,7 @@ def setdata(var, value):
# Write data used to construct tests to save
casesetup = {}
with File('solution.h5', 'a') as f:
self.perturb_solution(f)
try:
group = f.create_group('pytests')
except:
Expand Down
Binary file modified pytests/pytests/unittests/D_only/nonog/curcore/solution.h5
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

class TestClass:

def perturb_solution(self, file, perturbation=1e-2):
from h5py import File
from numpy.random import uniform
bbb = file['bbb']
for var in ['nis', 'ups', 'tes', 'tis', 'ngs', 'tgs', 'phis']:
bbb[var][...] *= uniform(low=perturbation, high=perturbation, size = bbb[var].shape)

def test_reference(self, epsilon=1e-8):
from h5py import File
from uedge import bbb, com
Expand Down Expand Up @@ -177,6 +184,7 @@ def setdata(var, value):
# Write data used to construct tests to save
casesetup = {}
with File('solution.h5', 'a') as f:
self.perturb_solution(f)
try:
group = f.create_group('pytests')
except:
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

class TestClass:

def perturb_solution(self, file, perturbation=1e-2):
from h5py import File
from numpy.random import uniform
bbb = file['bbb']
for var in ['nis', 'ups', 'tes', 'tis', 'ngs', 'tgs', 'phis']:
bbb[var][...] *= uniform(low=perturbation, high=perturbation, size = bbb[var].shape)

def test_reference(self, epsilon=1e-8):
from h5py import File
from uedge import bbb, com
Expand Down Expand Up @@ -177,6 +184,7 @@ def setdata(var, value):
# Write data used to construct tests to save
casesetup = {}
with File('solution.h5', 'a') as f:
self.perturb_solution(f)
try:
group = f.create_group('pytests')
except:
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

class TestClass:

def perturb_solution(self, file, perturbation=1e-2):
from h5py import File
from numpy.random import uniform
bbb = file['bbb']
for var in ['nis', 'ups', 'tes', 'tis', 'ngs', 'tgs', 'phis']:
bbb[var][...] *= uniform(low=perturbation, high=perturbation, size = bbb[var].shape)

def test_reference(self, epsilon=1e-8):
from h5py import File
from uedge import bbb, com
Expand Down Expand Up @@ -177,6 +184,7 @@ def setdata(var, value):
# Write data used to construct tests to save
casesetup = {}
with File('solution.h5', 'a') as f:
self.perturb_solution(f)
try:
group = f.create_group('pytests')
except:
Expand Down
Binary file modified pytests/pytests/unittests/D_only/nonog/default/solution.h5
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

class TestClass:

def perturb_solution(self, file, perturbation=1e-2):
from h5py import File
from numpy.random import uniform
bbb = file['bbb']
for var in ['nis', 'ups', 'tes', 'tis', 'ngs', 'tgs', 'phis']:
bbb[var][...] *= uniform(low=perturbation, high=perturbation, size = bbb[var].shape)

def test_reference(self, epsilon=1e-8):
from h5py import File
from uedge import bbb, com
Expand Down Expand Up @@ -177,6 +184,7 @@ def setdata(var, value):
# Write data used to construct tests to save
casesetup = {}
with File('solution.h5', 'a') as f:
self.perturb_solution(f)
try:
group = f.create_group('pytests')
except:
Expand Down
Binary file modified pytests/pytests/unittests/D_only/nonog/fixedngcore/solution.h5
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

class TestClass:

def perturb_solution(self, file, perturbation=1e-2):
from h5py import File
from numpy.random import uniform
bbb = file['bbb']
for var in ['nis', 'ups', 'tes', 'tis', 'ngs', 'tgs', 'phis']:
bbb[var][...] *= uniform(low=perturbation, high=perturbation, size = bbb[var].shape)

def test_reference(self, epsilon=1e-8):
from h5py import File
from uedge import bbb, com
Expand Down Expand Up @@ -177,6 +184,7 @@ def setdata(var, value):
# Write data used to construct tests to save
casesetup = {}
with File('solution.h5', 'a') as f:
self.perturb_solution(f)
try:
group = f.create_group('pytests')
except:
Expand Down
Binary file modified pytests/pytests/unittests/D_only/nonog/fmiy0/solution.h5
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

class TestClass:

def perturb_solution(self, file, perturbation=1e-2):
from h5py import File
from numpy.random import uniform
bbb = file['bbb']
for var in ['nis', 'ups', 'tes', 'tis', 'ngs', 'tgs', 'phis']:
bbb[var][...] *= uniform(low=perturbation, high=perturbation, size = bbb[var].shape)

def test_reference(self, epsilon=1e-8):
from h5py import File
from uedge import bbb, com
Expand Down Expand Up @@ -177,6 +184,7 @@ def setdata(var, value):
# Write data used to construct tests to save
casesetup = {}
with File('solution.h5', 'a') as f:
self.perturb_solution(f)
try:
group = f.create_group('pytests')
except:
Expand Down
Binary file modified pytests/pytests/unittests/D_only/nonog/lzflux1e2/solution.h5
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

class TestClass:

def perturb_solution(self, file, perturbation=1e-2):
from h5py import File
from numpy.random import uniform
bbb = file['bbb']
for var in ['nis', 'ups', 'tes', 'tis', 'ngs', 'tgs', 'phis']:
bbb[var][...] *= uniform(low=perturbation, high=perturbation, size = bbb[var].shape)

def test_reference(self, epsilon=1e-8):
from h5py import File
from uedge import bbb, com
Expand Down Expand Up @@ -177,6 +184,7 @@ def setdata(var, value):
# Write data used to construct tests to save
casesetup = {}
with File('solution.h5', 'a') as f:
self.perturb_solution(f)
try:
group = f.create_group('pytests')
except:
Expand Down
Binary file modified pytests/pytests/unittests/D_only/nonog/newbcl/solution.h5
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

class TestClass:

def perturb_solution(self, file, perturbation=1e-2):
from h5py import File
from numpy.random import uniform
bbb = file['bbb']
for var in ['nis', 'ups', 'tes', 'tis', 'ngs', 'tgs', 'phis']:
bbb[var][...] *= uniform(low=perturbation, high=perturbation, size = bbb[var].shape)

def test_reference(self, epsilon=1e-8):
from h5py import File
from uedge import bbb, com
Expand Down Expand Up @@ -177,6 +184,7 @@ def setdata(var, value):
# Write data used to construct tests to save
casesetup = {}
with File('solution.h5', 'a') as f:
self.perturb_solution(f)
try:
group = f.create_group('pytests')
except:
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

class TestClass:

def perturb_solution(self, file, perturbation=1e-2):
from h5py import File
from numpy.random import uniform
bbb = file['bbb']
for var in ['nis', 'ups', 'tes', 'tis', 'ngs', 'tgs', 'phis']:
bbb[var][...] *= uniform(low=perturbation, high=perturbation, size = bbb[var].shape)

def test_reference(self, epsilon=1e-8):
from h5py import File
from uedge import bbb, com
Expand Down Expand Up @@ -177,6 +184,7 @@ def setdata(var, value):
# Write data used to construct tests to save
casesetup = {}
with File('solution.h5', 'a') as f:
self.perturb_solution(f)
try:
group = f.create_group('pytests')
except:
Expand Down
Binary file modified pytests/pytests/unittests/D_only/nonog/newbcr/solution.h5
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

class TestClass:

def perturb_solution(self, file, perturbation=1e-2):
from h5py import File
from numpy.random import uniform
bbb = file['bbb']
for var in ['nis', 'ups', 'tes', 'tis', 'ngs', 'tgs', 'phis']:
bbb[var][...] *= uniform(low=perturbation, high=perturbation, size = bbb[var].shape)

def test_reference(self, epsilon=1e-8):
from h5py import File
from uedge import bbb, com
Expand Down Expand Up @@ -177,6 +184,7 @@ def setdata(var, value):
# Write data used to construct tests to save
casesetup = {}
with File('solution.h5', 'a') as f:
self.perturb_solution(f)
try:
group = f.create_group('pytests')
except:
Expand Down
Binary file not shown.
Loading

0 comments on commit 50df539

Please sign in to comment.