Skip to content

Commit bbd5658

Browse files
authored
Merge pull request #5 from KoBoldMetals/main
Package maintenance
2 parents 0bfacfa + a2a5048 commit bbd5658

File tree

5 files changed

+7
-15
lines changed

5 files changed

+7
-15
lines changed

.github/workflows/python-package-conda.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
fail-fast: True
2424
matrix:
2525
os: [ubuntu-latest, macOS-latest, windows-latest]
26-
python-version: ["3.7", "3.8", "3.9", "3.10"]
26+
python-version: ["3.8", "3.9", "3.10", "3.11"]
2727

2828
steps:
2929
- uses: actions/checkout@v2
@@ -59,7 +59,7 @@ jobs:
5959
6060
- name: Run Tests
6161
run: |
62-
pytest --cov-config=.coveragerc --cov-report=xml --cov=pydiso -s -v tests/test.py
62+
pytest --cov-config=.coveragerc --cov-report=xml --cov=pydiso -s -v
6363
6464
- name: Upload coverage
6565
if: ${{ matrix.os == 'ubuntu-latest' }} and {{ matrix.python-version == '3.8' }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ build
33
pydiso.egg-info
44
__pycache__
55
mkl_solver.c
6+
.coverage
7+
coverage.xml

pydiso/mkl_solver.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ cdef extern from 'mkl.h':
3434
int mkl_get_max_threads()
3535
int mkl_domain_get_max_threads(int domain)
3636

37-
ctypedef int (*ProgressEntry)(int* thread, int* step, char* stage, int stage_len);
37+
ctypedef int (*ProgressEntry)(int_t* thread, int_t* step, char* stage, int_t stage_len) except? -1;
3838
ProgressEntry mkl_set_progress(ProgressEntry progress);
3939

4040
ctypedef void * _MKL_DSS_HANDLE_t

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ def configuration(parent_package="", top_path=None):
2121
metadata = dict(
2222
name='pydiso',
2323
version='0.0.3',
24-
python_requires=">=3.6",
24+
python_requires=">=3.8",
2525
setup_requires=[
2626
"numpy>=1.8",
27-
"cython>=0.2",
27+
"cython>=3.0",
2828
],
2929
install_requires=[
3030
'numpy>=1.8',

tests/test.py renamed to tests/test_pydiso.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ def test_solver(A, matrix_type):
9595
eps = np.finfo(dtype).eps
9696
rel_err = np.linalg.norm(x-x2)/np.linalg.norm(x)
9797
assert rel_err < 1E3*eps
98-
return rel_err
9998

10099
def test_multiple_RHS():
101100
A = A_real_dict["real_symmetric_positive_definite"]
@@ -108,7 +107,6 @@ def test_multiple_RHS():
108107
eps = np.finfo(np.float64).eps
109108
rel_err = np.linalg.norm(x-x2)/np.linalg.norm(x)
110109
assert rel_err < 1E3*eps
111-
return rel_err
112110

113111

114112
def test_matrix_type_errors():
@@ -133,11 +131,3 @@ def test_rhs_size_error():
133131
solver.solve(b_bad)
134132
with pytest.raises(ValueError):
135133
solver.solve(b, x_bad)
136-
137-
138-
if __name__ == '__main__':
139-
for A, type in inputs:
140-
try:
141-
print(test_solver(A, type))
142-
except:
143-
pass

0 commit comments

Comments
 (0)