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
.pyxfiles in a directory, with a partial report.Unlike
cython_import_all, this always returns a structuredBatchBuildResultdescribing 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
.pyxfiles.- patternstr, default=’*.pyx’
Glob pattern to match files.
- recursivebool, default=False
If True, search recursively.
- collectbool, default=False
Batch policy.
Falseis fail-fast: stop at the first failure and raiseBatchBuildError(whoseresultcarries the partial outcome, including a resume token).Trueis collect: attempt every item and return aBatchBuildResultwith 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
collectpolicy).
- Raises:
- FileNotFoundError
If
directorydoes not exist.- BatchBuildError
Under the fail-fast policy (
collect=False) when an item fails; the exception’sresultattribute holds the partialBatchBuildResult.
- Parameters:
- Return type: