Skip to content

Commit b852959

Browse files
committed
More Cron Jobs
+ bug fixes + removed unused features + increased test + closer to release
1 parent 99971aa commit b852959

19 files changed

+269
-105
lines changed

.travis.yml

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
jobs:
2+
include:
3+
- os: linux
4+
arch: amd64
5+
- os: linux
6+
arch: arm64
7+
- os: windows
8+
arch: amd64
9+
- os: windows
10+
arch: arm64
11+
- os: linux
12+
arch: arm64-graviton2
13+
virt: lxd
14+
group: edge
115
language: python
216
python:
317
- "3.6" # current default Python on Travis CI
@@ -12,4 +26,4 @@ install:
1226
script:
1327
- py.test --cov-report term --cov=./
1428
after_success:
15-
- bash <(curl -s https://codecov.io/bash)
29+
- bash <(curl -s https://codecov.io/bash)

Tests/test_B1.py

+16-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,21 @@
44
import copy
55

66
data = [
7-
[[0, 1], [1, 0]],
8-
[[0, 1, 1], [0, 0, 0], [1, 0, 1]],
9-
[[0, 1, 0, 0], [0, 1, 0, 1], [1, 1, 1, 0], [1, 1, 0, 0]],
7+
[
8+
[0, 1],
9+
[1, 0]
10+
],
11+
[
12+
[0, 1, 1],
13+
[0, 0, 0],
14+
[1, 0, 1]
15+
],
16+
[
17+
[0, 1, 0, 0],
18+
[0, 1, 0, 1],
19+
[1, 1, 1, 0],
20+
[1, 1, 0, 0]
21+
],
1022
[
1123
[0, 1, 0, 1, 0],
1224
[0, 1, 1, 1, 0],
@@ -140,3 +152,4 @@ def test_getrow(test_BinMatrixinit):
140152
for i in range(len(test_BinMatrixinit)):
141153
assert rows[i].matrix.data[0] == test_BinMatrixinit[i].matrix.data[i]
142154
print(test_BinMatrixinit[i])
155+

Tests/test_M3.py

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import pytest
2+
from pyrix import Matrix, unitMatrix, zeroMatrix, randomMatrix, identityMatrix, Copy
3+
from pyrix.exception import incompaitableTypeException, divisionErrorException, bitWiseOnMatrix
4+
import copy
5+
6+
data=[
7+
[
8+
[1,2],
9+
[0,1]
10+
],
11+
[
12+
[1,2,3],
13+
[0,1,2],
14+
[0,0,1]
15+
],
16+
[
17+
[1,2,3,4],
18+
[0,1,2,3],
19+
[0,0,1,2],
20+
[0,0,0,1]
21+
],
22+
[
23+
[1,0,0,0,0],
24+
[2,1,0,0,0],
25+
[3,2,1,0,0],
26+
[4,3,2,1,0],
27+
[5,4,3,2,1]
28+
]
29+
]
30+
lowertriangularitydata=[True,True,True,False]
31+
uppertriangularitydata=[False,False,False,True]
32+
orthogonalmatrixdata = [False, False, False, False]
33+
inversedata=[True,True,True,True]
34+
@pytest.fixture(scope="session")
35+
def test_Matrixinit2():
36+
(rows, cols) = [2, 3, 4, 5], [2, 3, 4, 5]
37+
objects = []
38+
traversal = 0
39+
try:
40+
for (r, c, d) in zip(rows, cols, data):
41+
objects.append(Matrix(nrow=r, ncol=c, data=d))
42+
traversal += 1
43+
except incompaitableTypeException:
44+
print("Incompaitable Sizes")
45+
return objects
46+
47+
def test_trace(test_Matrixinit2):
48+
for i in range(len(test_Matrixinit2)):
49+
assert test_Matrixinit2[i].matrixTrace()==i+2
50+
51+
def test_lowerTriangular(test_Matrixinit2):
52+
for i in range(len(test_Matrixinit2)):
53+
assert test_Matrixinit2[i].isLowerTriangularMatrix()==lowertriangularitydata[i]
54+
def test_upperTriangularity(test_Matrixinit2):
55+
for i in range(len(test_Matrixinit2)):
56+
assert test_Matrixinit2[i].isUpperTriangularMatrix()==uppertriangularitydata[i]
57+
58+
def test_orthogonality(test_Matrixinit2):
59+
for i in range(len(test_Matrixinit2)):
60+
assert test_Matrixinit2[i].isOrthogonalMatrix()==orthogonalmatrixdata[i]
61+
62+
def test_invertibility(test_Matrixinit2):
63+
for i in range(len(test_Matrixinit2)):
64+
assert test_Matrixinit2[i].isInvertible()==inversedata[i]
65+

Tests/test_M4.py

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import pytest
2+
from pyrix import Matrix, unitMatrix, zeroMatrix, randomMatrix, identityMatrix, Copy
3+
from pyrix.exception import incompaitableTypeException, divisionErrorException, bitWiseOnMatrix
4+
import copy
5+
import math
6+
data=[
7+
[
8+
[2.5,3.3],
9+
[6.3,0]
10+
],
11+
[
12+
[1.1134,23.2165,90.4564],
13+
[2.4453,23.2351,91.8869],
14+
[1.0011,56.4221,0.54322]
15+
],
16+
[
17+
[4.935264587402344e-05, 2.765655517578125e-05, 2.86102294921875e-05, 3.0517578125e-05],
18+
[3.4809112548828125e-05, 3.814697265625e-05, 4.172325134277344e-05, 0.00010323524475097656],
19+
[7.915496826171875e-05, 8.416175842285156e-05, 8.96453857421875e-05, 9.703636169433594e-05],
20+
[0.00010395050048828125, 0.00011372566223144531, 0.00011777877807617188, 0.00012445449829101562]
21+
],
22+
[
23+
[0.2511575222015381, 0.2516036033630371, 0.2521524429321289, 0.2523155212402344, 0.25193333625793457],
24+
[0.2519676685333252, 0.2544589042663574, 0.25499844551086426, 0.2547335624694824, 0.25522279739379883],
25+
[0.2551295757293701, 0.2559933662414551, 0.256514310836792, 0.25737428665161133, 0.2577781677246094],
26+
[0.2581827640533447, 0.2585480213165283, 0.25943970680236816, 0.2707202434539795, 0.26087403297424316],
27+
[0.26274585723876953, 0.263012170791626, 0.2636113166809082, 0.26253175735473633, 0.2637825012207031]
28+
]
29+
]
30+
31+
32+
@pytest.fixture(scope="session")
33+
def test_Matrixinit4():
34+
(rows, cols) = [2, 3, 4, 5], [2, 3, 4, 5]
35+
objects = []
36+
traversal = 0
37+
try:
38+
for (r, c, d) in zip(rows, cols, data):
39+
objects.append(Matrix(nrow=r, ncol=c, data=d))
40+
traversal += 1
41+
except incompaitableTypeException:
42+
print("Incompaitable Sizes")
43+
return objects
44+
45+
def test_trunc(test_Matrixinit4):
46+
for i in range(len(test_Matrixinit4)):
47+
assert math.trunc(test_Matrixinit4[i])
48+
49+
def test_floor(test_Matrixinit4):
50+
for i in range(len(test_Matrixinit4)):
51+
assert math.floor(test_Matrixinit4[i])
52+
53+
def test_ceil(test_Matrixinit4):
54+
for i in range(len(test_Matrixinit4)):
55+
assert math.ceil(test_Matrixinit4[i])
56+
57+
def test_round(test_Matrixinit4):
58+
for i in range(len(test_Matrixinit4)):
59+
test_Matrixinit4[i].RoundOff(2)

Tests/test_U5.py

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
import pytest
2+
from pyrix import Matrix, unitMatrix, zeroMatrix, randomMatrix, identityMatrix
3+
from pyrix.exception import incompaitableTypeException, divisionErrorException, bitWiseOnMatrix
4+
import copy
5+
from pyrix.util import flipDimensions,Copy,JSONExport,JSONImport,nestifyMatrix,listifyMatrix
6+
import math
7+
data = [
8+
[
9+
[2.5, 3.3],
10+
[6.3, 0]
11+
],
12+
[
13+
[1.1134, 23.2165, 90.4564],
14+
[2.4453, 23.2351, 91.8869],
15+
[1.0011, 56.4221, 0.54322]
16+
],
17+
[
18+
[4.935264587402344e-05, 2.765655517578125e-05,
19+
2.86102294921875e-05, 3.0517578125e-05],
20+
[3.4809112548828125e-05, 3.814697265625e-05,
21+
4.172325134277344e-05, 0.00010323524475097656],
22+
[7.915496826171875e-05, 8.416175842285156e-05,
23+
8.96453857421875e-05, 9.703636169433594e-05],
24+
[0.00010395050048828125, 0.00011372566223144531,
25+
0.00011777877807617188, 0.00012445449829101562]
26+
],
27+
[
28+
[0.2511575222015381, 0.2516036033630371, 0.2521524429321289,
29+
0.2523155212402344, 0.25193333625793457],
30+
[0.2519676685333252, 0.2544589042663574, 0.25499844551086426,
31+
0.2547335624694824, 0.25522279739379883],
32+
[0.2551295757293701, 0.2559933662414551, 0.256514310836792,
33+
0.25737428665161133, 0.2577781677246094],
34+
[0.2581827640533447, 0.2585480213165283, 0.25943970680236816,
35+
0.2707202434539795, 0.26087403297424316],
36+
[0.26274585723876953, 0.263012170791626, 0.2636113166809082,
37+
0.26253175735473633, 0.2637825012207031]
38+
]
39+
]
40+
listed=[
41+
[2.5, 3.3,6.3, 0],
42+
[1.1134, 23.2165, 90.4564,2.4453, 23.2351, 91.8869,1.0011, 56.4221, 0.54322],
43+
[4.935264587402344e-05, 2.765655517578125e-05,
44+
2.86102294921875e-05, 3.0517578125e-05,3.4809112548828125e-05, 3.814697265625e-05,
45+
4.172325134277344e-05, 0.00010323524475097656,7.915496826171875e-05, 8.416175842285156e-05,
46+
8.96453857421875e-05, 9.703636169433594e-05,0.00010395050048828125, 0.00011372566223144531,
47+
0.00011777877807617188, 0.00012445449829101562],
48+
[0.2511575222015381, 0.2516036033630371, 0.2521524429321289,
49+
0.2523155212402344, 0.25193333625793457,0.2519676685333252, 0.2544589042663574, 0.25499844551086426,
50+
0.2547335624694824, 0.25522279739379883,0.2551295757293701, 0.2559933662414551, 0.256514310836792,
51+
0.25737428665161133, 0.2577781677246094,0.2581827640533447, 0.2585480213165283, 0.25943970680236816,
52+
0.2707202434539795, 0.26087403297424316,0.26274585723876953, 0.263012170791626, 0.2636113166809082,
53+
0.26253175735473633, 0.2637825012207031]
54+
]
55+
56+
@pytest.fixture(scope="session")
57+
def test_Matrixinit5():
58+
(rows, cols) = [2, 3, 4, 5], [2, 3, 4, 5]
59+
objects = []
60+
traversal = 0
61+
try:
62+
for (r, c, d) in zip(rows, cols, data):
63+
objects.append(Matrix(nrow=r, ncol=c, data=d))
64+
traversal += 1
65+
except incompaitableTypeException:
66+
print("Incompaitable Sizes")
67+
return objects
68+
69+
def test_listifynestify(test_Matrixinit5):
70+
listings=[]
71+
copmat=Copy(test_Matrixinit5)
72+
for i in range(len(test_Matrixinit5)):
73+
listings.append(listifyMatrix(test_Matrixinit5[i]))
74+
assert listings[i]==listed[i]
75+
for i in range(len(test_Matrixinit5)):
76+
assert nestifyMatrix(listings[i],i+2,i+2)==data[i]
77+
78+
79+
def test_JSON(test_Matrixinit5):
80+
for i in range(len(test_Matrixinit5)):
81+
JSONExport(test_Matrixinit5[i],"test.json")
82+
temp=JSONImport("test.json",mode="manual")
83+
assert temp==test_Matrixinit5[i]
84+
85+
def test_flipdims(test_Matrixinit5):
86+
for i in range(len(test_Matrixinit5)):
87+
assert flipDimensions(test_Matrixinit5[i])==test_Matrixinit5[i]

pyrix/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
Author : Abhi-1U <https://github.com/Abhi-1U> \n
66
Description : A Matrix manipulation library \n
77
Encoding : UTF-8\n
8-
Version :0.7.17rc0\n
9-
Build :0.7.17rc0/29-08-2020
8+
Version :0.7.17rc1\n
9+
Build :0.7.17rc1/28-09-2020
1010
"""
1111

1212
from pyrix.exception import (

pyrix/charmatrix/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
Author : Abhi-1U <https://github.com/Abhi-1U>\n
66
Description : A Charactar matrix manipulation sub-library \n
77
Encoding : UTF-8\n
8-
Version :0.7.17rc0\n
9-
Build :0.7.17rc0/29-08-2020
8+
Version :0.7.17rc1\n
9+
Build :0.7.17rc1/28-09-2020
1010
"""
1111
from pyrix.charmatrix.charmatrix import CharMatrix, alphaMatrix5x5
1212

pyrix/charmatrix/charmatrix.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
Author : Abhi-1U <https://github.com/Abhi-1U>\n
66
Description : A Charactar matrix manipulation sub-library \n
77
Encoding : UTF-8\n
8-
Version :0.7.17rc0\n
9-
Build :0.7.17rc0/29-08-2020
8+
Version :0.7.17rc1\n
9+
Build :0.7.17rc1/28-09-2020
1010
"""
1111
import copy
1212
from pyrix.matrix import matrixData, Matrix

pyrix/equation/MatrixEquations.py

-60
This file was deleted.

pyrix/equation/__init__.py

Whitespace-only changes.

pyrix/exception/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
Author : Abhi-1U <https://github.com/Abhi-1U>\n
66
Description : Exceptions are implemented here \n
77
Encoding : UTF-8\n
8-
Version :0.7.17rc0\n
9-
Build :0.7.17rc0/29-08-2020
8+
Version :0.7.17rc1\n
9+
Build :0.7.17rc1/28-09-2020
1010
"""
1111
from pyrix.exception.pyrixexceptions import (
1212
binaryMatrixException,

pyrix/exception/pyrixexceptions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
Author : Abhi-1U <https://github.com/Abhi-1U>\n
66
Description : Exceptions are implemented here \n
77
Encoding : UTF-8\n
8-
Version :0.7.17rc0\n
9-
Build :0.7.17rc0/29-08-2020
8+
Version :0.7.17rc1\n
9+
Build :0.7.17rc1/28-09-2020
1010
"""
1111

1212

0 commit comments

Comments
 (0)