BuildResult#

class scikitplot.cython.BuildResult(module=<factory>, key='', module_name='', build_dir=<factory>, artifact_path=<factory>, used_cache=False, created_utc=None, fingerprint=None, source_sha256=None, meta=<factory>)[source]#

Result of compiling/importing a single Cython extension module.

Parameters:
moduletypes.ModuleType

The imported extension module.

keystr

Deterministic cache key for this build configuration.

module_namestr

Module name the artifact was compiled for (init symbol name).

build_dirpathlib.Path

Cache/build directory containing source, metadata, and artifacts.

artifact_pathpathlib.Path

Path to the compiled extension artifact (.so / .pyd).

used_cachebool

Whether an existing artifact was reused without recompilation.

created_utcstr or None

ISO 8601 UTC timestamp (...Z) if available.

fingerprintMapping[str, Any] or None

Runtime fingerprint used for caching (Python/Cython/NumPy/platform).

source_sha256str or None

SHA-256 digest of the main source content, if available.

metaMapping[str, Any]

The full metadata dictionary persisted in meta.json for this entry.

Parameters:

Notes

Importing an extension artifact requires the same module_name it was compiled for.

property annotation_html: Path | None#

Absolute path of this module’s Cython annotation report, if there is one.

Returns:
pathlib.Path or None

The .html file Cython wrote for this module when the build was made with annotate=True (or profile="annotate"); None when the build did not annotate or the file is not on disk.

Notes

User. Open the file in a browser to read the generated C/C++ next to each line of the .pyx source; lines are shaded by how much they call into the Python interpreter. meta["annotate_html"] holds the same file as a path relative to build_dir.

Examples

>>> result = compile_and_load_result(code, annotate=True)
>>> result.annotation_html.name
'scikitplot_cython_0123456789abcdef.html'
artifact_path: Path#

!! processed by numpydoc !!

build_dir: Path#

!! processed by numpydoc !!

created_utc: str | None#

!! processed by numpydoc !!

fingerprint: Mapping[str, Any] | None#

!! processed by numpydoc !!

key: str#

!! processed by numpydoc !!

meta: Mapping[str, Any]#

!! processed by numpydoc !!

module: ModuleType#

!! processed by numpydoc !!

module_name: str#

!! processed by numpydoc !!

source_sha256: str | None#

!! processed by numpydoc !!

used_cache: bool#

!! processed by numpydoc !!