GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |
GeezerVison is showing github.com — Test what main's coverage misses, and exclude what no input reaches by eriknw · Pull Request #656 · python-graphblas/python-graphblas Conversation
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@ ## 16-asv-benchmarks #656 +/- ## ===================================================== + Coverage 98.95% 99.51% +0.55% ===================================================== Files 109 109 Lines 34838 35040 +202 Branches 3997 3986 -11 ===================================================== + Hits 34473 34869 +396 + Misses 234 108 -126 + Partials 131 63 -68 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
2a430a5 to
cc828b8
Compare
cc828b8 to
71999d8
Compare
8d8fa26 to
b2cb5df
Compare
a8569d0 to
fcfce9c
Compare
fcfce9c to
dcb0e67
Compare
dcb0e67 to
2740545
Compare
e49e788 to
64b656f
Compare
f68a748 to
8bf07bb
Compare
…kling A bool field takes min's and max's identity as logical and/or; a date or text field has none, so the monoid names the field and the aggregator does not work with the UDT; a user monoid without an identity says so. A named monoid unpickled where its name is gone is registered again with its identity and is_idempotent. agg.sum[udt].jit_c_name follows its monoid. The name check in _scalar_identity and the initializer's lookup, which no input reaches, get pragmas with the reason.
…rors Binding no theta binds 0, through the typed op or the op given a dtype; a C scalar or GraphBLAS scalar theta binds through either; a UDT-typed op given a value that is not one raises that value's TypeError. The typed op reports its parent's function. An op with no theta bound, UDT or not, is refused as an operator by reduce. Before SuiteSparse:GraphBLAS 9.4 both register_anonymous and indexbinary.ss.register_new say what is missing, and gb.indexbinary.ss is absent on the vanilla backend. The arms no IndexBinaryOp can reach, and a test's re-run cleanup, get pragmas with the reason.
… probing fix_jit_config(probe=False) enables the JIT without trying a compile. Without CONDA_PREFIX the compiler, flags and libraries come from sysconfig, and a Python that records no compiler gets None and an untouched config. A baked-in -isysroot that does not exist takes xcrun's SDK, or is dropped when there is no xcrun. The import-time repair leaves a SuiteSparse with no JIT options alone, and an error the control does not explain is re-raised as it came. All run against a stand-in config. The no-environment test drops CONDA_PREFIX with monkeypatch rather than by hand, so it has no branch that depends on the environment.
A name that is not an identifier, a typedef that does not declare the name, and a typedef of something other than a struct are refused with ValueError before SuiteSparse is asked to compile anything, and register nothing.
Setting bitmap_switch to the wrong number of values raises ValueError and leaves the setting as it was. This replaces the commented-out check on memory_pool, which is no longer an option. No option has an int64_t type since then, so those get and set arms get pragmas.
As test_vector.py's test_udt does for Vector: an anonymous UDT with a long numpy repr round-trips given dtype=, and a named one is found by its registered name.
CI does not install fast_matrix_market, so the engine was never used. A stand-in module that reads and writes with scipy plays it: engine "auto" and "fmm" both use it, each with its deprecation warning, and a version before 1.7 is given a scipy sparse matrix to write rather than an array.
Each gets a pragma with its reason, and a comment where the reason is not already written next to it: - dtypes: a UDT's C typedef is asked for only with its numpy type, and the explicit layout dict recurses only into records and arrays; - get_typed_op: two built-in types always unify, and a UDT beside another type returns before that; - typed op finalizer: the shutdown and no-free-function guards; - the GxB_EXHAUSTED check and the lookup of unary.abs and unary.ainv, which every supported build has.
Both operands of the outer | are themselves expressions: with the same dtype the inner typed op is reused, and with another dtype the result is promoted.
test_diag always passed nthreads, so the arm without options never ran.
The cross-process pickle tests unpickle and compute in a spawned child, which coverage does not measure; the pre-test cleanups run only when an earlier run in the same process left the name behind; the identity mismatch messages are built only on failure; and a stand-in lookup passes other keys through only if the code under test asks for them. The JIT parity check's comparison is one expression, so it has no failure-only line.
test_ss_pack_hyperhash packed the hash back only when SuiteSparse had computed one, which for its two rows SuiteSparse 8.2 does and 10.5 does not, so the pack arm ran on some CI draws only. With 1025 rows every version checked computes it (8.2.1, 10.5.0 and 10.5.1); the hash stays optional, so the guard stays, with a pragma.
Without Numba, applying unary.identity or unary.one to a UDT raises the usual KeyError that the op does not work with it.
SuiteSparse 10 refuses a blob whose encoding word asks for integer sizes larger than it knows, as a later version may write, when GrB_NAME's size is read from it, though it read the dtype name. A UDT Matrix blob edited so raises InvalidObject naming the read that failed (on SuiteSparse 9 the edit makes the type code invalid, and the dtype name read fails first). Reading GrB_NAME itself checks the blob as reading its size just did, so that status check gets a pragma.
The values of a full array-UDT Matrix carry its shape in their first two of three dimensions, and its export then leaves out nrows and ncols; an iso export has a single element, so importing it without nrows and ncols asks for them. That arm of get_shape is covered now, so its "BRANCH NOT COVERED" marker goes.
apply passes a UDT C scalar to GraphBLAS through a pointer object, and both the text and the HTML repr of the expression name the scalar, which the HTML one asks the pointer for.
The JIT tests skip where SuiteSparse cannot compile: no JIT in the build, no usable C compiler, a failed probe. That is right on a random CI draw, but it also lets a setup that should compile drop every JIT test, and their coverage, without a red job. With GRAPHBLAS_REQUIRE_JIT set, those skips (now one helper, skip_without_jit, in conftest.py) fail instead, in test_ssjit.py, test_op.py's udt_op_path and test_dtype.py. A GraphBLAS 7 or a missing Numba skips whole tests by marker, and a _require_jit_on that sees jit_c_control "on" runs its test even when the probe failed, so test_required_jit_works checks all three where the variable is set, and skips elsewhere.
…ging The JIT tests ran, and counted for coverage, only on the random draws that happened to get the suitesparse backend, --runslow, Numba and a GraphBLAS that compiles, so Codecov's total moved by up to 0.7 points from run to run. Add one fixed entry, (ubuntu-latest, pytest_jit), outside the draw: Python 3.15 from conda-forge with the newest psg, Numba always (no random skip) and conda-forge's C compiler, running the suite once with --runslow and --backend=suitesparse, and uploading coverage like the others. That setup compiled in recent runs (graphblas 10.5.2, psg 10.5.2.0, numba 0.68.1: test_ssjit passed but for the IndexBinaryOp version check). The job sets GRAPHBLAS_REQUIRE_JIT, so a setup that stops compiling fails it instead of skipping the JIT tests. It skips the C scalar pass, which the other jobs run. Codecov counts no uploads (.codecov.yml sets no after_n_builds), so the twelfth merges like the other eleven.
8bf07bb to
c6268b5
Compare
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.