cython_import_all_result#

scikitplot.cython.cython_import_all_result(directory, *, pattern='*.pyx', recursive=False, collect=False, only=None, **kwargs)[source]#

Compile and import all .pyx files in a directory, with a partial report.

Unlike cython_import_all, this always returns a structured BatchBuildResult describing ordered successes, ordered failures, and the committed native side effects — so a mid-batch failure no longer leaves the caller without a report (CYTHON-BATCH-001).

Parameters:
directorystr or pathlib.Path

Directory containing .pyx files.

patternstr, default=’*.pyx’

Glob pattern to match files.

recursivebool, default=False

If True, search recursively.

collectbool, default=False

Batch policy. False is fail-fast: stop at the first failure and raise BatchBuildError (whose result carries the partial outcome, including a resume token). True is collect: attempt every item and return a BatchBuildResult with all failures recorded.

onlySequence[str] or None, default=None

If given, restrict the batch to these stems (e.g. a resume token from a prior BatchBuildError).

**kwargsdict

Passed to cython_import_result.

Returns:
BatchBuildResult

Structured batch result (always, under the collect policy).

Raises:
FileNotFoundError

If directory does not exist.

BatchBuildError

Under the fail-fast policy (collect=False) when an item fails; the exception’s result attribute holds the partial BatchBuildResult.

Parameters:
Return type:

BatchBuildResult