Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
572 commits
Select commit Hold shift + click to select a range
061c310
Merge branch 'feature-amd' into independent-dev
broesler Oct 27, 2025
4488a53
Merge branch 'feature-colamd' into independent-dev
broesler Oct 27, 2025
9e9ab6b
Merge branch 'feature-camd' into independent-dev
broesler Oct 27, 2025
a7f4242
Merge branch 'feature-ccolamd' into independent-dev
broesler Oct 27, 2025
349e0b7
Merge branch 'feature-btf' into independent-dev
broesler Oct 27, 2025
119040f
MNT: Refactor input checking out of amd.pyx into validate_csc_input.
broesler Aug 13, 2025
d24d29e
MNT: Refactor camd to use validate_csc_input.
broesler Aug 13, 2025
54f10f3
TST: Refactor input conversion tests to test_utils.py.
broesler Aug 13, 2025
facbd62
MNT: Refactor input checking for colamd and ccolamd.
broesler Aug 13, 2025
cd354c7
ENH: validate_csc_input gives more informative CSC warning message.
broesler Aug 13, 2025
4b44c02
TST: Refactor colamd and ccolamd tests.
broesler Aug 13, 2025
b9ddfed
MNT: Refactor btf functions and tests to use validate_csc_input.
broesler Aug 13, 2025
4ad4cf6
Merge branch 'feature-validate-input' into independent-dev
broesler Oct 27, 2025
f2b2f5e
Merge branch 'cholmod-refactor' into independent-dev
broesler Oct 27, 2025
0d75300
TST: Fix test data path.
broesler Sep 25, 2025
5b58422
Merge branch 'build-system' into independent-dev
broesler Oct 27, 2025
58d0142
STY: Add "I" (isort) to ruff rules. Sort imports in .py files.
broesler Aug 4, 2025
36cec04
DEV: Update project maintainer and description.
broesler Aug 4, 2025
af765c7
MNT: Add modules to __init__.py.
broesler Aug 13, 2025
5cc125e
DEV: Move cython settings to pyproject.toml
broesler Aug 18, 2025
d6561dc
DOC: Update github_user in docs to broesler.
broesler Aug 21, 2025
86fb6fd
DOC: Add versionadded tag to all new functions.
broesler Aug 21, 2025
f8dbcc1
MNT: Add explicit "__all__" variable to submodules.
broesler Aug 21, 2025
2cd2621
DOC: Update amd example to new cholmod API.
broesler Sep 9, 2025
157b74f
DOC: Move existing docs files into doc/reference. Update index.rst.
broesler Sep 26, 2025
90d43e8
DOC: Update docs theme to Furo, per-method pages.
broesler Sep 26, 2025
da02896
DOC: Move cholmod docs into cholmod.pyx docstring.
broesler Sep 26, 2025
0e68923
DOC: Move API summaries to individual submodule docstrings.
broesler Sep 26, 2025
1129245
DOC: Create stubs for each submodule. API ref to sksparse.__init__.py.
broesler Sep 27, 2025
30bbf35
DOC: Add class.rst template to generate separate pages for each method.
broesler Sep 29, 2025
194deaf
DOC: Move "nitpicky" flag to conf.py.
broesler Sep 29, 2025
724c80d
DOC: Use full name for title. Remove signatures in class autosummary.
broesler Sep 29, 2025
85c6b6c
DOC: Fix See Also issues.
broesler Sep 29, 2025
f0213e0
DOC: Fix minor errors in amd/camd docs.
broesler Sep 29, 2025
029ed48
DOC: Clean up doc issues.
broesler Sep 29, 2025
0e5cf38
DOC: Move CholeskyFactor.factor docstring into Attributes section.
broesler Sep 29, 2025
43236bc
DOC: Reorder Attributes and Parameters in CholeskyFactor.
broesler Sep 30, 2025
60ed5a0
DOC: Add templates for exception, function, and method.
broesler Sep 30, 2025
fac0472
DOC: Fix indentation of Methods table in class template.
broesler Sep 30, 2025
4715cd5
DOC: Remove function signatures from CholeskyFactor methods table.
broesler Sep 30, 2025
8a5e835
DOC: Add docstrings to cholmod exception classes.
broesler Sep 30, 2025
1ce3adb
DOC: Create User Guide section of docs.
broesler Sep 30, 2025
fb092e9
DOC: Update the User Guides.
broesler Sep 30, 2025
a0f717f
DOC: Add Examples sections to docstrings.
broesler Sep 30, 2025
876026e
DOC: Add See Also sections to link to other functions.
broesler Sep 30, 2025
957b4d8
Merge branch 'docs-refactor' into independent-dev
broesler Oct 27, 2025
23f37ce
DEV: Update version to 0.5.0.dev0.
broesler Sep 30, 2025
230a98d
DEV: Add furo to dev dependencies.
broesler Sep 30, 2025
9991664
DOC: Convert README.md -> rst and include in doc/overview.rst.
broesler Sep 30, 2025
d1de518
DEV: Update .readthedocs.yaml to modern version. Update dependencies.
broesler Oct 1, 2025
e818380
DOC: Update URL links to broesler/scikit-sparse and scikit-sparse-dev.
broesler Oct 1, 2025
11d8487
DEV: Create doc/environment.yaml for ReadTheDocs build.
broesler Oct 1, 2025
84d1f72
DOC: Update badges to use GitHub native where possible.
broesler Oct 1, 2025
f4d476a
DOC: Add note on development version in README.
broesler Oct 1, 2025
28f73c4
DOC: Beef up doc/index.rst for nicer landing page.
broesler Oct 1, 2025
59b3561
DOC: Add sphinx-copybutton extension.
broesler Oct 1, 2025
452165b
DOC: Add GitHub footer button.
broesler Oct 1, 2025
c4e1d83
DOC: Add linkcode sphinx extension and function to create links.
broesler Oct 1, 2025
afdac07
MNT: Fix ruff check/format warnings.
broesler Oct 1, 2025
ec6e762
DEV: Update build-check.yml to install micromamba.
broesler Oct 1, 2025
5735516
DEV: Update MANIFEST.in.
broesler Oct 1, 2025
b219145
DEV: Run tests on sdist in build-check.yml.
broesler Oct 1, 2025
8c08ed0
DEV: Update workflows so deploy depends on ci-dev and build-check.
broesler Oct 2, 2025
e1bc218
Merge branch 'release/v0.5.0.dev0' into independent-dev
broesler Oct 27, 2025
bdd0a6c
DEV: Flatten "docs" into "dev" dependencies. Version -> 0.5.0.dev1.
broesler Oct 2, 2025
488e064
Merge branch 'feature-umfpack' into dev
broesler Oct 27, 2025
a0d4b4f
DEV: Bump version to 0.5.0.dev2.
broesler Oct 28, 2025
ee4daeb
DOC: Fix umfpack docs references and build warnings.
broesler Oct 28, 2025
33865fb
DOC: Clean up some cholmod docs in SeparatorTree.
broesler Oct 28, 2025
c6d90cc
BUG: Pass address of do_recip, not actual value.
broesler Oct 28, 2025
a47fe81
Merge branch 'feature-umfpack' into dev
broesler Oct 28, 2025
34fe1af
ENH: Refactor UMFFactor to cache a reference to the input matrix.
broesler Oct 29, 2025
a95ff29
ENH: Refactor UMFFactor internal input checking.
broesler Oct 29, 2025
8ed6fcc
MNT: Cache matrix shape in UMFFactor.
broesler Oct 29, 2025
d78bc89
TST: Refactor tests without A input and using UMFFactor.shape.
broesler Oct 29, 2025
bd06d29
ENH/TST: Check for non-square matrix in the UMFFactor.solve method.
broesler Oct 29, 2025
efa6ec6
MNT: Hoist pointer assignment out of loop.
broesler Oct 29, 2025
f4d748f
MNT: Refactor UMFFactor itype and dtype as exposed properties.
broesler Oct 29, 2025
c50f561
MNT: Refactor UMFFactor info and control as readonly/public properties.
broesler Oct 29, 2025
9729025
MNT/TST: Rename "R" property -> "rscale".
broesler Oct 29, 2025
6ee58d9
MNT: Use direct reference to info.data for speed.
broesler Oct 29, 2025
cee0528
ENH/TST: Implement and test UMFFactor.__iter__ method.
broesler Oct 29, 2025
b0b32d0
TST: Test bad integer type input.
broesler Oct 29, 2025
32ea0d4
ENH: Promote single-precision types to double-precision.
broesler Oct 30, 2025
66b8fda
TST: Check for symbolic analysis only.
broesler Oct 30, 2025
1e184e5
MNT: Remove some TODO comments.
broesler Oct 30, 2025
f8eaae9
Merge branch 'feature-umfpack' into dev
broesler Oct 30, 2025
ef71f04
MNT: Return actual np.dtype from validate_csc_input.
broesler Oct 30, 2025
f9217f9
DEV: Move project to src/ directory structure.
broesler Oct 28, 2025
c3f1ec2
MNT: Add note to code.
broesler Oct 28, 2025
f4530a1
DEV: Update CI/CD to have cleaner logic for when to run.
broesler Oct 28, 2025
be4d297
DOC: Update change log.
broesler Oct 30, 2025
57e12ed
DEV: Fix issue with deploy workflow.
broesler Oct 30, 2025
0d7d335
Merge branch 'release/v0.5.0.dev2' into dev
broesler Oct 30, 2025
76a927b
ENH: Add MemoryError as a base class of UMFPACKOutOfMemoryError.
broesler Oct 31, 2025
b69c2b8
MNT: Remove unused _is_real_dtype function.
broesler Oct 31, 2025
b40fb45
MNT: Cache sparse arrays in UMFFactor instead of component arrays.
broesler Oct 31, 2025
3d14e4f
ENH: Return "None" from properties that don't yet exist.
broesler Nov 3, 2025
6d1afdc
MNT: Free existing numeric factor before re-factorizing.
broesler Nov 3, 2025
420c5f6
MNT: Test for bad refactorization structure.
broesler Nov 3, 2025
82e934c
TST: Explicitly use np.int32 in test matrix indices.
broesler Nov 3, 2025
fa8e46f
WIP: Create initial KLU files. Bump version to v0.5.0.dev3.
broesler Oct 31, 2025
478985a
WIP: Implement numeric factorization and extract factors as properties.
broesler Oct 31, 2025
8f4c26e
WIP: Refactor KLUFactor to cache sparse array factors.
broesler Oct 31, 2025
d035061
TST: Create initial KLU tests.
broesler Oct 31, 2025
32f760a
WIP: Create klu_factor convenience function.
broesler Oct 31, 2025
a1d5110
WIP: Fix up properties when factor is symbolic only.
broesler Oct 31, 2025
27b6311
WIP: Fix extracted dtypes for complex case.
broesler Oct 31, 2025
220b5a3
MNT/TST: Refactor property definitions to return None on missing values.
broesler Nov 1, 2025
3adf037
ENH/TST: Implement and test __iter__.
broesler Nov 1, 2025
849c21b
TST: Add expected values to davis_example_qr test.
broesler Nov 1, 2025
4da9e43
MNT: Free any existing numeric factor before factorizing.
broesler Nov 3, 2025
0c97137
MNT: Use klu_refactor instead of freeing/computing numeric.
broesler Nov 3, 2025
357d3ab
TST: Test KLU refactorize.
broesler Nov 3, 2025
00683b8
TST/DOC: Test KLU refactorize with new structure.
broesler Nov 3, 2025
50c096b
TST: Update KLU tests.
broesler Nov 3, 2025
2c676fc
ENH: Implement KLUFactor.solve and klu_solve.
broesler Nov 3, 2025
188b449
TST: Test KLUFactor.solve and klu_solve.
broesler Nov 3, 2025
ee21e01
ENH: Implement check of rcond in KLUFactor.solve.
broesler Nov 3, 2025
d579e3d
TST: Test KLUFactor.solve with singular matrix inputs.
broesler Nov 3, 2025
1156645
ENH: Accept row_scale argument to KLUFactor, klu_factor, and klu_solve.
broesler Nov 3, 2025
d0f6c33
MNT: Only print one warning from klu_solve for singular matrices.
broesler Nov 3, 2025
a224db7
TST: Update test for singular matrices.
broesler Nov 3, 2025
8294bf6
ENH: Implement KLUInfo dataclass.
broesler Nov 3, 2025
3da2b15
ENH: Compute rgrowth and rcond for KLUInfo.
broesler Nov 4, 2025
1464843
TST: Test KLUInfo for simple matrix.
broesler Nov 4, 2025
6333143
ENH: Report which pivot column is zero if matrix is singular.
broesler Nov 4, 2025
b591bbb
ENH: Sort row indices of L and U before output.
broesler Nov 4, 2025
953b5cc
TST: Test row sorting.
broesler Nov 4, 2025
1bd0655
ENH: Implement KLUFactor.copy().
broesler Nov 4, 2025
644c037
TST: Test copy with all itypes and dtypes.
broesler Nov 4, 2025
db3ccd8
ENH: Implement KLUControl object.
broesler Nov 4, 2025
c10d5dc
TST: Test control parameters.
broesler Nov 4, 2025
94dc7d7
DOC: Update docs for KLUInfo and KLUControl.
broesler Nov 5, 2025
e63f199
ENH: Implement transpose=True in KLUFactor.solve.
broesler Nov 5, 2025
eab8abd
TST: Test KLUFactor.solve(transpose=True).
broesler Nov 5, 2025
9c49d30
MNT: Update warning/error handling.
broesler Nov 5, 2025
15e091a
MNT: Refactor user-provided permutation names.
broesler Nov 5, 2025
07565e9
TST: Test for not yet implemented orderings.
broesler Nov 5, 2025
865cb7c
MNT: Make btf a bint. Comments.
broesler Nov 5, 2025
1cab827
DOC: Add KLU to sksparse/__init__py. Update docs.
broesler Nov 5, 2025
a3508c6
ENH: Return the reciprocal row scaling so LU = RA, not Rinv A.
broesler Nov 5, 2025
d14e5e1
TST: Update tests to use reciprocal scaling factors.
broesler Nov 5, 2025
9b73275
DOC: Update change log.
broesler Nov 5, 2025
cd49a7f
ENH: Issue warning from stacklevel=2 in _handle_errors.
broesler Nov 5, 2025
896fc0a
DOC: Update solve docs.
broesler Nov 5, 2025
3df20e1
ENH: Raise error for exactly singular matrices.
broesler Nov 5, 2025
630766f
TST: Update test for exactly singular matrices.
broesler Nov 5, 2025
daa4687
MNT: Change __cinit__ -> __init__. Remove CopySentinel.
broesler Nov 5, 2025
5af7325
MNT: Remove unnecessary try-except and _cleanup_factor helper.
broesler Nov 5, 2025
5805078
ENH: Warn from stacklevel=2.
broesler Nov 5, 2025
19a05e5
Merge branch 'cholmod-refactor' into dev
broesler Nov 5, 2025
9c8b3d6
Merge branch 'feature-umfpack' into dev
broesler Nov 5, 2025
527be24
Merge branch 'feature-klu' into dev
broesler Nov 5, 2025
ed80182
DEV: Run verbose testing in CI.
broesler Nov 5, 2025
0ea50ed
BUG: Add print statements to find where segfault is occurring.
broesler Nov 5, 2025
d0940f4
BUG: Explicitly copy top-level values from symbolic and numeric.
broesler Nov 5, 2025
626f7d7
BUG: Allow LUbx to be malloc'd even if nblocks = 0.
broesler Nov 5, 2025
8fafb98
ENH: Refactor "memory" -> "mempeak" in KLUInfo.
broesler Nov 5, 2025
665a76a
TST: Fix test of info.memory -> info.mempeak.
broesler Nov 5, 2025
549e82e
BUG: Do not use deepcopy on KLUInfo struct. Change raise to assert.
broesler Nov 6, 2025
b1dd6be
TST: Test copy of symbolic KLUFactor.
broesler Nov 5, 2025
e631092
MNT: Refactor order of L, U, etc. copies.
broesler Nov 5, 2025
081c0f4
BUG: Protect against casting a NULL Xwork pointer.
broesler Nov 5, 2025
8e1f00e
MNT: Handle errors after klu_malloc calls.
broesler Nov 6, 2025
968a044
BUG: Fix size of workspace copied.
broesler Nov 6, 2025
fa265fe
TST: Test that numeric factorization can be done on symbolic copy.
broesler Nov 6, 2025
b1ed5cb
BUG: Return NULL from _malloc_copy if src is NULL.
broesler Nov 6, 2025
1a4236e
BUG: Remove "except NULL" from _malloc_copy. Add NULL checks.
broesler Nov 6, 2025
0b6eb5c
BUG: Add print statements in _malloc_copy for debugging.
broesler Nov 6, 2025
f1a74dd
MNT: Mark internal copy functions as noexcept.
broesler Nov 6, 2025
20d6e43
MNT: Remove print statements.
broesler Nov 6, 2025
d944efa
DEV: Remove PYTHONFAULTHANDLER=1 flag. Unnecessary.
broesler Nov 6, 2025
4b6696c
Merge branch 'bugfix/segfault' into dev
broesler Nov 6, 2025
98d6485
MNT: Refactor copy functions to use a single dispatch.
broesler Nov 6, 2025
37de065
MNT: Use deepcopy to copy over KLUInfo if cached.
broesler Nov 6, 2025
f43bf79
MNT: Refactor control struct assignments to inline function.
broesler Nov 6, 2025
7a2b322
MNT: Rearrange some long lines nad ternary statements.
broesler Nov 6, 2025
3a38643
ENH: Add input validation to KLUControl.
broesler Nov 6, 2025
2316a9b
TST: Test bad inputs to KLUControl.
broesler Nov 6, 2025
46cd586
Merge branch 'feature-klu' into dev
broesler Nov 6, 2025
8a4ec1c
MNT: Move some cholmod declarations to cholmod.pxd for sharing.
broesler Nov 7, 2025
e71a2d3
WIP: Create initial spqr.pxd and spqr.pyx files.
broesler Nov 7, 2025
9eace7e
DOC: Add SQPR to the docs. Update change log.
broesler Nov 7, 2025
97d3141
DEV: Update .gitignore to skip Cython-generated .cpp files.
broesler Nov 7, 2025
705e005
WIP/TST: Initial SPQRFactor implementation with basic tests.
broesler Nov 7, 2025
4ed4091
WIP: Implement SPQRFactor.factorize.
broesler Nov 10, 2025
6507f8b
TST: Implement initial tests of factorization.
broesler Nov 10, 2025
d97aabf
WIP: Implement SPQRFactor.solve method and spqr_solve function.
broesler Nov 10, 2025
c73afb7
TST: Test SPQRFactor.solve and spqr_solve functions on square matrices.
broesler Nov 10, 2025
3563c88
WIP: Implement `transpose=True` in SPQRFactor.solve.
broesler Nov 10, 2025
84b2427
TST: Test SPQRFactor.solve(b, transpose=True).
broesler Nov 10, 2025
e43a780
WIP: Implement SPQRFactor.qmult.
broesler Nov 10, 2025
0d33256
TST: Test SPQRFactor.qmult.
broesler Nov 10, 2025
1ecb052
MNT: Put short arguments on one line.
broesler Nov 10, 2025
2b73b20
TST: Test solve instead of QR == A.
broesler Nov 10, 2025
22d34d6
WIP: Implement SPQRFactor.copy.
broesler Nov 11, 2025
1cc8eea
TST: Test copy_spqr_symbolic struct.
broesler Nov 11, 2025
520e5f2
BUG: Fix numeric copy of Rblock pointers into Stacks.
broesler Nov 11, 2025
e0558c7
TST: Add explicit test for copy of numeric struct.
broesler Nov 11, 2025
92a7b9d
TST: Add tests on copy that there is no shared state.
broesler Nov 11, 2025
2b8c902
MNT: Remove print statements.
broesler Nov 11, 2025
091d934
ENH: Implement SPQR error classes and error handling function.
broesler Nov 11, 2025
43953ae
ENH: Allow all ordering methods.
broesler Nov 11, 2025
614a09e
TST: Test ordering methods.
broesler Nov 11, 2025
df72623
MNT: Remove assertions from free in __dealloc__. Unnecessary.
broesler Nov 11, 2025
134cd00
DOC: Update documentation on zero-column tolerance.
broesler Nov 11, 2025
ddee934
ENH: Implement SPQRInfo class and SPQRFactor.info property.
broesler Nov 11, 2025
6b74f55
TST: Test SPQRInfo class.
broesler Nov 11, 2025
fd0748c
MNT: Clean up unused cholmod definitions in cholmod.pxd.
broesler Nov 11, 2025
49c8289
TST: Refactor generate_random_matrices to take "shape_kind" arg.
broesler Nov 11, 2025
09e3539
TST: Update SPQR tests to new generate_random_matrices.
broesler Nov 11, 2025
5430618
TST: Refactor SPQR tests for solving over/under-determined systems.
broesler Nov 11, 2025
0af6bbf
TST: Test solve on under-determined systems.
broesler Nov 11, 2025
1e73b83
ENH: Implement the minimum 2-norm solution to underdetermined systems.
broesler Nov 11, 2025
b85c49d
TST: Test min2norm solution.
broesler Nov 11, 2025
6c2dcb4
ENH: Implement rank-deficiency check in SPQRFactor.solve.
broesler Nov 11, 2025
99be11a
TST: Test SPQRRankDeficiencyWarning.
broesler Nov 11, 2025
9e7f9b3
ENH: Implement spqr top-level function with mode='r'.
broesler Nov 12, 2025
8fbd071
ENH: Implement spqr mode='full'.
broesler Nov 12, 2025
11e2c31
ENH: Implement mode='raw'.
broesler Nov 12, 2025
5b2cf5d
ENH: Implement mode='economic'.
broesler Nov 12, 2025
2f9224c
MNT: Refactor subfunctions of spqr.
broesler Nov 12, 2025
fef6e08
TST: Test mode='r' and mode='full'.
broesler Nov 12, 2025
0282f57
MNT: Refactor order of subfunctions of spqr.
broesler Nov 12, 2025
d21f476
ENH: Implement SPQRFactor.qmult C call for sparse inputs.
broesler Nov 12, 2025
6b423f2
MNT: Clean up the spqr_qmult logic. Correct HPinv size.
broesler Nov 12, 2025
0fa6690
TST: Test mode='raw' size and dtype of outputs.
broesler Nov 12, 2025
2a3bb50
MNT/TST: Refactor mode="raw" -> "householder".
broesler Nov 12, 2025
709a9ee
ENH: Implement spqr_qmult.
broesler Nov 12, 2025
6d2c25c
TST: Test spqr_qmult.
broesler Nov 12, 2025
6a2eda6
BUG: Fix _cholmod_dense_from_ndarray when input array is empty.
broesler Nov 12, 2025
42cc926
MNT: Refactor qmult integer input to inline function.
broesler Nov 12, 2025
f0c0bcd
MNT: Remove _econ member of SPQRFactor.
broesler Nov 12, 2025
d3ce779
MNT/TST: Clean up SPQRFactor.rank and __repr__. Update test.
broesler Nov 12, 2025
cb9cc3d
MNT: Rename doublecomplex -> cdouble.
broesler Nov 12, 2025
09c233c
DOC: Refactor common docstrings. Docstring edits.
broesler Nov 13, 2025
42af363
BUG: Explicitly set Task pointers to NULL in copy_symbolic.
broesler Nov 13, 2025
2e0e600
BUG: Add print statements for debugging.
broesler Nov 13, 2025
1e53e53
MNT: Remove unused cholmod_common argument from _malloc_copy.
broesler Nov 14, 2025
ed9ca63
BUG: Explicitly set dest.QRnum = NULL in case factor is symbolic-only.
broesler Nov 14, 2025
40cd0c6
BUG: Fix some sizes of SuiteSparseQR_factorization member copies.
broesler Nov 14, 2025
4f02460
BUG: Add print statements in SPQRFactor.__dealloc__.
broesler Nov 14, 2025
55422d3
BUG: Explicitly set dest.QRsym = NULL and guard malloc/copy.
broesler Nov 14, 2025
749a799
BUG: Add guards in dealloc for NULL cholmod_common pointer.
broesler Nov 14, 2025
56486c1
BUG: Explicitly set QRsym.QRgpu = NULL.
broesler Nov 14, 2025
41f2c66
BUG: Remove debug print statements.
broesler Nov 14, 2025
f928900
TST: Relax tolerances on test_solve_real for Ubuntu.
broesler Nov 14, 2025
200a379
MNT: Rename fact -> factor, symb -> symbolic, num -> numeric.
broesler Nov 14, 2025
fb6ab39
MNT: Refactor (H, tau, v) -> SPQRHouseholder namedtuple class.
broesler Nov 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions .github/workflows/build-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Build Check

on:
workflow_dispatch:
push:
branches:
- "build-check"
- "release/*"

jobs:
build-check:
name: Build Check
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
os: [ubuntu-latest, macos-latest]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install non-python dependencies on mac
if: runner.os == 'macOS'
run: |
brew install suite-sparse

- name: Install non-python dependencies on linux
if: runner.os == 'Linux'
run: |
sudo apt-get install libsuitesparse-dev

- name: Install build tools
run: |
pip install --upgrade pip
pip install build

- name: Build sdist and wheel
run: |
python -m build

- name: List sdist contents
run: |
echo "---- Source distribution contents ----"
tar -tzf dist/*.tar.gz

- name: List wheel contents
run: |
echo "---- Wheel contents ----"
unzip -l dist/*.whl

- name: Check wheel for .c/.pyx (should be excluded)
run: |
if unzip -l dist/*.whl | grep -E '\.c$|\.pyx$'; then
echo "::error::Wheel includes Cython source or C files"
exit 1
fi

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v2
with:
micromamba-version: "latest"
init-shell: bash

- name: Create new conda env and install wheel
shell: bash -l {0} # use bash as a login shell for conda activation
run: |
micromamba create -n test-wheel python=${{ matrix.python-version }} -y
micromamba activate test-wheel
micromamba install -c conda-forge suitesparse -y
pip install dist/*.whl
cd .. # cd out of repo to avoid import issues
pip show scikit-sparse
pip show scikit-sparse-dev
python -c "import sksparse; print(f'Wheel loaded from: {sksparse.__file__}')"

- name: Create new conda env and install sdist
shell: bash -l {0} # use bash as a login shell for conda activation
run: |
micromamba create -n test-sdist python=${{ matrix.python-version }} -y
micromamba activate test-sdist
micromamba install -c conda-forge suitesparse pytest -y
pip install dist/scikit_sparse*.tar.gz
SRC_DIR=$(pwd)
cd .. # cd out of repo to avoid import issues
pip show scikit-sparse
pip show scikit-sparse-dev
python -c "import sksparse; print(f'sdist loaded from: {sksparse.__file__}')"
# Run tests on the installed package
cp -R ${SRC_DIR}/tests ./tests
pytest tests

- name: Upload built artifact
uses: actions/upload-artifact@v4
# Upload only one artifact to avoid redundancy
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
with:
name: dist
path: dist/
66 changes: 66 additions & 0 deletions .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: CI Dev Code

on:
workflow_dispatch:
pull_request:
push:
branches:
- "dev"
- "bugfix/*"

jobs:
tests:
name: Test Dev Code
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
os: [ubuntu-latest, macos-latest]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
with:
python-version: ${{ matrix.python-version }}

- name: Install non-python dependencies on mac
if: runner.os == 'macOS'
run: |
brew install suite-sparse

- name: Install non-python dependencies on linux
if: runner.os == 'Linux'
run: |
sudo apt-get install libsuitesparse-dev

- name: Install dependencies and package
run: |
pip install --upgrade pip
pip install -v -e .[dev]

- name: Display installed packages
run: |
python -m pip list

- name: Run lint
run: ruff check

- name: Test with pytest
run: pytest -v -s

- name: Build Docs
run: |
cd doc
make SPHINXOPTS=-nW html

- name: Upload docs as artifact
uses: actions/upload-artifact@v4
with:
name: scikit-sparse-doc-${{ matrix.os }}-${{ matrix.python-version }}
path: doc/_build/html
111 changes: 0 additions & 111 deletions .github/workflows/ci_test.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Deploy

on:
workflow_dispatch:
release:
types:
- published

jobs:
deploy:
runs-on: ubuntu-latest
environment: deploy
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10" # minimum supported version

- name: Install non-python dependencies on linux
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install libsuitesparse-dev

- name: Install build tools
run: |
pip install --upgrade pip
pip install build

- name: Build sdist and wheel
run: |
python -m build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
11 changes: 9 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# Project specific files #
##########################

scikits/sparse/cholmod.c
.coverage
htmlcov/
.tox
.cache
_dev_scripts/

# Cython-generated files
*.c
*.cpp
*.html

# Cribbed from numpy's .gitignore:

Expand Down Expand Up @@ -63,6 +68,8 @@ _build
dist
doc/build
doc/cdoc/build
# auto-generated Sphinx files
doc/**/generated
# Eggs
.eggs
# Egg metadata
Expand All @@ -89,4 +96,4 @@ venv

# vscode
.devcontainer/
.vscode/
.vscode/
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.7
hooks:
# Run the linter, but do not make any changes
- id: ruff-check
17 changes: 17 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# .readthedocs.yaml
# The version of the configuration file.
version: 2

build:
os: ubuntu-24.04
tools:
# Use a recent Python version
python: "mambaforge-22.9"

conda:
environment: doc/environment.yaml

sphinx:
configuration: doc/conf.py

formats: all
3 changes: 2 additions & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright (c) 2009-2018, Joscha Reimer, Alex Grigorievskiy, Antony Lee, Yuri, Leon Barrett, Dag Sverre Seljebotn, Nathaniel Smith, David Cournapeau
Copyright (C) 2009-2025, The scikit-sparse developers. All rights reserved.
See pyproject.toml for complete list of contributors.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Expand Down
Loading