.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/cython/plot_05_package_examples_multimodule.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code or to run this example in your browser via JupyterLite or Binder. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_cython_plot_05_package_examples_multimodule.py: Multi-module package builds (5 package examples) ================================================ .. currentmodule:: scikitplot.cython This example shows how to build a small compiled package consisting of multiple Cython extension modules in one build directory. Package examples live under ``_templates/package_examples/`` and include: - vector_ops - stats_basic - text_hash - signal_conv - graph_algo What this example demonstrates ------------------------------ 1) Listing bundled package examples. 2) Checking build prerequisites safely (so docs builds don't fail). 3) Building one example package (profile="fast-debug"). 4) Showing deterministic metadata: cache key, artifacts, module names. 5) Importing a module by dotted name and calling a known function (when declared). 6) Pinning the package build by alias and re-importing by alias. 7) Re-importing from cache key (restart-safe). 8) Optional: printing cache stats. .. GENERATED FROM PYTHON SOURCE LINES 29-33 .. code-block:: Python # Authors: The scikit-plots developers # SPDX-License-Identifier: BSD-3-Clause .. GENERATED FROM PYTHON SOURCE LINES 34-41 .. code-block:: Python from __future__ import annotations import importlib from typing import Any, Iterable from scikitplot import cython .. GENERATED FROM PYTHON SOURCE LINES 42-68 .. code-block:: Python def _safe_call_known_function(module: Any, candidates: Iterable[str]) -> None: """ Call a known function if present, otherwise print a small preview. This is intentionally strict: we only call names we expect, and only if present on the module. Otherwise we print public names for inspection. """ for name in candidates: f = getattr(module, name, None) if callable(f): try: # Use a simple, deterministic call convention: # - prefer 1-arg integer calls where sensible out = f(10) print(f" {module.__name__}.{name}(10) -> {out!r}") except TypeError: # Some functions may take no args or different args; avoid guessing. print(f" {module.__name__}.{name} is callable but signature differs; not calling.") return # Fallback: show a preview of public names (no execution). public = sorted(n for n in getattr(module, "__dict__", {}).keys() if n and not n.startswith("_")) print(f" No known callable exported; public names: {public[:15]}{' ...' if len(public) > 15 else ''}") .. GENERATED FROM PYTHON SOURCE LINES 69-72 List all available Package tamplates ------------------------------------ https://scikit-plots.github.io/dev/user_guide/cython/_templates/templates_index.html .. GENERATED FROM PYTHON SOURCE LINES 72-76 .. code-block:: Python examples = getattr(cython, "list_package_examples", lambda: [])() print("Package examples:", examples) .. rst-class:: sphx-glr-script-out .. code-block:: none Package examples: ['graph_algo', 'signal_conv', 'stats_basic', 'text_hash', 'vector_ops'] .. GENERATED FROM PYTHON SOURCE LINES 77-79 Generate `python` Packages from `cython` ---------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 79-155 .. code-block:: Python # Pick a template deterministically and safely. if not examples: print("No package examples were bundled in this build.") else: # Build prereqs check: keep docs builds safe. report = cython.check_build_prereqs(numpy=False) if not report.get('cython', {}).get('ok'): print("Skipping package build because prerequisites are missing.\n") problems = report.get("problems", []) if problems: print("Problems:", problems) else: # Choose a deterministic example name (first in sorted order) name = sorted(examples)[0] print("\nBuilding package example:", name) # Demonstrate profiles: # fast-debug is great for iteration; release for performance. r_debug = cython.build_package_example_result(name, profile="fast-debug", verbose=0) print("\nBuild (fast-debug) result:") print(r_debug) # Optional: build release too to show key changes deterministically. r_release = cython.build_package_example_result(name, profile="release", verbose=0) print("\nBuild (release) result:") print(r_release) print("\nKeys differ by profile:") print(" fast-debug:", r_debug.key) print(" release :", r_release.key) # Show deterministic metadata print("\nPackage metadata:") print(" package_name:", r_debug.package_name) print(" build_dir :", r_debug.build_dir) print(" used_cache :", r_debug.used_cache) print(" created_utc :", r_debug.created_utc) # Show per-module summary and artifact paths print("\nModules and artifacts:") for br in r_debug.results: print(" ", br.module.__name__) print(" artifact:", br.artifact_path) # Import one built module by dotted name and call a known function (strict) first_module = r_debug.modules[0] mod_name = first_module.__name__ mod = importlib.import_module(mod_name) print("\nImported module:", mod.__name__) # Try calling a known function name (declared by convention) # Keep candidates short and standard. _safe_call_known_function(mod, candidates=("run", "demo", "test", "inc", "dec", "dot", "hash_text")) # Pin/alias (per-cache-dir) and import again alias = f"pkg_{name}_debug" print("\nPinning build:") cython.pin(r_debug.key, alias=alias, overwrite=True) r_pinned = cython.import_pinned_result(alias) print("Pinned import result:") print(r_pinned) print("Pinned package name:", r_pinned.package_name) # Restart-safe import by key (no recompilation) r_cached = cython.import_cached_package_result(r_debug.key) print("\nImported from cache key:") print(r_cached) print(" used_cache:", r_cached.used_cache) # Optional: cache stats (if available) if hasattr(cython, "cache_stats"): stats = cython.cache_stats() print("\nCache stats snapshot:") print(stats) .. rst-class:: sphx-glr-script-out .. code-block:: none Building package example: graph_algo Compiling /home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea/scikitplot_pkg_graph_algo/bfs.pyx because it changed. Compiling /home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea/scikitplot_pkg_graph_algo/degree.pyx because it changed. [1/2] Cythonizing /home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea/scikitplot_pkg_graph_algo/bfs.pyx [2/2] Cythonizing /home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea/scikitplot_pkg_graph_algo/degree.pyx Build (fast-debug) result: PackageBuildResult(package_name='scikitplot_pkg_graph_algo', key='eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea', build_dir=PosixPath('/home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea'), results=(BuildResult(module=, key='eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea', module_name='scikitplot_pkg_graph_algo.bfs', build_dir=PosixPath('/home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea'), artifact_path=PosixPath('/home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea/scikitplot_pkg_graph_algo/bfs.cpython-311-x86_64-linux-gnu.so'), used_cache=False, created_utc='2026-02-01T06:33:55Z', fingerprint={'python': '3.11.14', 'python_impl': 'CPython', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'machine': 'x86_64', 'processor': 'x86_64', 'cython': '3.2.4', 'numpy': '2.4.2', 'abi': ''}, source_sha256='d3f1eaf3cb7438cf670f928965db1b4716ab6c8feacbb95ab744b6355ff758d2', meta={'kind': 'package', 'key': 'eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea', 'package_name': 'scikitplot_pkg_graph_algo', 'modules': [{'module_name': 'scikitplot_pkg_graph_algo.bfs', 'artifact': 'scikitplot_pkg_graph_algo/bfs.cpython-311-x86_64-linux-gnu.so', 'source_sha256': 'd3f1eaf3cb7438cf670f928965db1b4716ab6c8feacbb95ab744b6355ff758d2', 'annotate_html': None}, {'module_name': 'scikitplot_pkg_graph_algo.degree', 'artifact': 'scikitplot_pkg_graph_algo/degree.cpython-311-x86_64-linux-gnu.so', 'source_sha256': '5c22e7a9ea4bb6273325a19d4fe03a8c3ed4d5e6bb0b78f218a560196ee3a371', 'annotate_html': None}], 'created_utc': '2026-02-01T06:33:55Z', 'fingerprint': {'python': '3.11.14', 'python_impl': 'CPython', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'machine': 'x86_64', 'processor': 'x86_64', 'cython': '3.2.4', 'numpy': '2.4.2', 'abi': ''}, 'directives': {'language_level': 3, 'embedsignature': True, 'boundscheck': True, 'wraparound': True, 'initializedcheck': True, 'cdivision': False}, 'compiler_directives': {'language_level': 3, 'embedsignature': True, 'boundscheck': True, 'wraparound': True, 'initializedcheck': True, 'cdivision': False}, 'profile': 'fast-debug', 'annotate': False, 'view_annotate': False, 'extra_compile_args': ['-O0', '-g'], 'extra_link_args': [], 'annotate_html': None, 'annotation_html': {}, 'include_dirs': ['/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/scikitplot/cython/_templates/package_examples/graph_algo', '/home/circleci/repo/galleries/examples/cython', '/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/numpy/_core/include'], 'support_files': [], 'support_paths': [], 'extra_sources': [], 'language': None}), BuildResult(module=, key='eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea', module_name='scikitplot_pkg_graph_algo.degree', build_dir=PosixPath('/home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea'), artifact_path=PosixPath('/home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea/scikitplot_pkg_graph_algo/degree.cpython-311-x86_64-linux-gnu.so'), used_cache=False, created_utc='2026-02-01T06:33:55Z', fingerprint={'python': '3.11.14', 'python_impl': 'CPython', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'machine': 'x86_64', 'processor': 'x86_64', 'cython': '3.2.4', 'numpy': '2.4.2', 'abi': ''}, source_sha256='5c22e7a9ea4bb6273325a19d4fe03a8c3ed4d5e6bb0b78f218a560196ee3a371', meta={'kind': 'package', 'key': 'eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea', 'package_name': 'scikitplot_pkg_graph_algo', 'modules': [{'module_name': 'scikitplot_pkg_graph_algo.bfs', 'artifact': 'scikitplot_pkg_graph_algo/bfs.cpython-311-x86_64-linux-gnu.so', 'source_sha256': 'd3f1eaf3cb7438cf670f928965db1b4716ab6c8feacbb95ab744b6355ff758d2', 'annotate_html': None}, {'module_name': 'scikitplot_pkg_graph_algo.degree', 'artifact': 'scikitplot_pkg_graph_algo/degree.cpython-311-x86_64-linux-gnu.so', 'source_sha256': '5c22e7a9ea4bb6273325a19d4fe03a8c3ed4d5e6bb0b78f218a560196ee3a371', 'annotate_html': None}], 'created_utc': '2026-02-01T06:33:55Z', 'fingerprint': {'python': '3.11.14', 'python_impl': 'CPython', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'machine': 'x86_64', 'processor': 'x86_64', 'cython': '3.2.4', 'numpy': '2.4.2', 'abi': ''}, 'directives': {'language_level': 3, 'embedsignature': True, 'boundscheck': True, 'wraparound': True, 'initializedcheck': True, 'cdivision': False}, 'compiler_directives': {'language_level': 3, 'embedsignature': True, 'boundscheck': True, 'wraparound': True, 'initializedcheck': True, 'cdivision': False}, 'profile': 'fast-debug', 'annotate': False, 'view_annotate': False, 'extra_compile_args': ['-O0', '-g'], 'extra_link_args': [], 'annotate_html': None, 'annotation_html': {}, 'include_dirs': ['/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/scikitplot/cython/_templates/package_examples/graph_algo', '/home/circleci/repo/galleries/examples/cython', '/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/numpy/_core/include'], 'support_files': [], 'support_paths': [], 'extra_sources': [], 'language': None})), used_cache=False, created_utc='2026-02-01T06:33:55Z', fingerprint={'python': '3.11.14', 'python_impl': 'CPython', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'machine': 'x86_64', 'processor': 'x86_64', 'cython': '3.2.4', 'numpy': '2.4.2', 'abi': ''}, meta={'kind': 'package', 'key': 'eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea', 'package_name': 'scikitplot_pkg_graph_algo', 'modules': [{'module_name': 'scikitplot_pkg_graph_algo.bfs', 'artifact': 'scikitplot_pkg_graph_algo/bfs.cpython-311-x86_64-linux-gnu.so', 'source_sha256': 'd3f1eaf3cb7438cf670f928965db1b4716ab6c8feacbb95ab744b6355ff758d2', 'annotate_html': None}, {'module_name': 'scikitplot_pkg_graph_algo.degree', 'artifact': 'scikitplot_pkg_graph_algo/degree.cpython-311-x86_64-linux-gnu.so', 'source_sha256': '5c22e7a9ea4bb6273325a19d4fe03a8c3ed4d5e6bb0b78f218a560196ee3a371', 'annotate_html': None}], 'created_utc': '2026-02-01T06:33:55Z', 'fingerprint': {'python': '3.11.14', 'python_impl': 'CPython', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'machine': 'x86_64', 'processor': 'x86_64', 'cython': '3.2.4', 'numpy': '2.4.2', 'abi': ''}, 'directives': {'language_level': 3, 'embedsignature': True, 'boundscheck': True, 'wraparound': True, 'initializedcheck': True, 'cdivision': False}, 'compiler_directives': {'language_level': 3, 'embedsignature': True, 'boundscheck': True, 'wraparound': True, 'initializedcheck': True, 'cdivision': False}, 'profile': 'fast-debug', 'annotate': False, 'view_annotate': False, 'extra_compile_args': ['-O0', '-g'], 'extra_link_args': [], 'annotate_html': None, 'annotation_html': {}, 'include_dirs': ['/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/scikitplot/cython/_templates/package_examples/graph_algo', '/home/circleci/repo/galleries/examples/cython', '/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/numpy/_core/include'], 'support_files': [], 'support_paths': [], 'extra_sources': [], 'language': None}) Compiling /home/circleci/.cache/scikitplot/cython/f4d40d148b4830270f073c8a416601f3603bd32aeada212649baa202c92cac1d/scikitplot_pkg_graph_algo/bfs.pyx because it changed. Compiling /home/circleci/.cache/scikitplot/cython/f4d40d148b4830270f073c8a416601f3603bd32aeada212649baa202c92cac1d/scikitplot_pkg_graph_algo/degree.pyx because it changed. [1/2] Cythonizing /home/circleci/.cache/scikitplot/cython/f4d40d148b4830270f073c8a416601f3603bd32aeada212649baa202c92cac1d/scikitplot_pkg_graph_algo/bfs.pyx [2/2] Cythonizing /home/circleci/.cache/scikitplot/cython/f4d40d148b4830270f073c8a416601f3603bd32aeada212649baa202c92cac1d/scikitplot_pkg_graph_algo/degree.pyx Build (release) result: PackageBuildResult(package_name='scikitplot_pkg_graph_algo', key='f4d40d148b4830270f073c8a416601f3603bd32aeada212649baa202c92cac1d', build_dir=PosixPath('/home/circleci/.cache/scikitplot/cython/f4d40d148b4830270f073c8a416601f3603bd32aeada212649baa202c92cac1d'), results=(BuildResult(module=, key='f4d40d148b4830270f073c8a416601f3603bd32aeada212649baa202c92cac1d', module_name='scikitplot_pkg_graph_algo.bfs', build_dir=PosixPath('/home/circleci/.cache/scikitplot/cython/f4d40d148b4830270f073c8a416601f3603bd32aeada212649baa202c92cac1d'), artifact_path=PosixPath('/home/circleci/.cache/scikitplot/cython/f4d40d148b4830270f073c8a416601f3603bd32aeada212649baa202c92cac1d/scikitplot_pkg_graph_algo/bfs.cpython-311-x86_64-linux-gnu.so'), used_cache=False, created_utc='2026-02-01T06:33:58Z', fingerprint={'python': '3.11.14', 'python_impl': 'CPython', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'machine': 'x86_64', 'processor': 'x86_64', 'cython': '3.2.4', 'numpy': '2.4.2', 'abi': ''}, source_sha256='d3f1eaf3cb7438cf670f928965db1b4716ab6c8feacbb95ab744b6355ff758d2', meta={'kind': 'package', 'key': 'f4d40d148b4830270f073c8a416601f3603bd32aeada212649baa202c92cac1d', 'package_name': 'scikitplot_pkg_graph_algo', 'modules': [{'module_name': 'scikitplot_pkg_graph_algo.bfs', 'artifact': 'scikitplot_pkg_graph_algo/bfs.cpython-311-x86_64-linux-gnu.so', 'source_sha256': 'd3f1eaf3cb7438cf670f928965db1b4716ab6c8feacbb95ab744b6355ff758d2', 'annotate_html': None}, {'module_name': 'scikitplot_pkg_graph_algo.degree', 'artifact': 'scikitplot_pkg_graph_algo/degree.cpython-311-x86_64-linux-gnu.so', 'source_sha256': '5c22e7a9ea4bb6273325a19d4fe03a8c3ed4d5e6bb0b78f218a560196ee3a371', 'annotate_html': None}], 'created_utc': '2026-02-01T06:33:58Z', 'fingerprint': {'python': '3.11.14', 'python_impl': 'CPython', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'machine': 'x86_64', 'processor': 'x86_64', 'cython': '3.2.4', 'numpy': '2.4.2', 'abi': ''}, 'directives': {'language_level': 3, 'embedsignature': True, 'boundscheck': False, 'wraparound': False, 'initializedcheck': False, 'cdivision': True}, 'compiler_directives': {'language_level': 3, 'embedsignature': True, 'boundscheck': False, 'wraparound': False, 'initializedcheck': False, 'cdivision': True}, 'profile': 'release', 'annotate': False, 'view_annotate': False, 'extra_compile_args': ['-O3', '-DNDEBUG'], 'extra_link_args': [], 'annotate_html': None, 'annotation_html': {}, 'include_dirs': ['/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/scikitplot/cython/_templates/package_examples/graph_algo', '/home/circleci/repo/galleries/examples/cython', '/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/numpy/_core/include'], 'support_files': [], 'support_paths': [], 'extra_sources': [], 'language': None}), BuildResult(module=, key='f4d40d148b4830270f073c8a416601f3603bd32aeada212649baa202c92cac1d', module_name='scikitplot_pkg_graph_algo.degree', build_dir=PosixPath('/home/circleci/.cache/scikitplot/cython/f4d40d148b4830270f073c8a416601f3603bd32aeada212649baa202c92cac1d'), artifact_path=PosixPath('/home/circleci/.cache/scikitplot/cython/f4d40d148b4830270f073c8a416601f3603bd32aeada212649baa202c92cac1d/scikitplot_pkg_graph_algo/degree.cpython-311-x86_64-linux-gnu.so'), used_cache=False, created_utc='2026-02-01T06:33:58Z', fingerprint={'python': '3.11.14', 'python_impl': 'CPython', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'machine': 'x86_64', 'processor': 'x86_64', 'cython': '3.2.4', 'numpy': '2.4.2', 'abi': ''}, source_sha256='5c22e7a9ea4bb6273325a19d4fe03a8c3ed4d5e6bb0b78f218a560196ee3a371', meta={'kind': 'package', 'key': 'f4d40d148b4830270f073c8a416601f3603bd32aeada212649baa202c92cac1d', 'package_name': 'scikitplot_pkg_graph_algo', 'modules': [{'module_name': 'scikitplot_pkg_graph_algo.bfs', 'artifact': 'scikitplot_pkg_graph_algo/bfs.cpython-311-x86_64-linux-gnu.so', 'source_sha256': 'd3f1eaf3cb7438cf670f928965db1b4716ab6c8feacbb95ab744b6355ff758d2', 'annotate_html': None}, {'module_name': 'scikitplot_pkg_graph_algo.degree', 'artifact': 'scikitplot_pkg_graph_algo/degree.cpython-311-x86_64-linux-gnu.so', 'source_sha256': '5c22e7a9ea4bb6273325a19d4fe03a8c3ed4d5e6bb0b78f218a560196ee3a371', 'annotate_html': None}], 'created_utc': '2026-02-01T06:33:58Z', 'fingerprint': {'python': '3.11.14', 'python_impl': 'CPython', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'machine': 'x86_64', 'processor': 'x86_64', 'cython': '3.2.4', 'numpy': '2.4.2', 'abi': ''}, 'directives': {'language_level': 3, 'embedsignature': True, 'boundscheck': False, 'wraparound': False, 'initializedcheck': False, 'cdivision': True}, 'compiler_directives': {'language_level': 3, 'embedsignature': True, 'boundscheck': False, 'wraparound': False, 'initializedcheck': False, 'cdivision': True}, 'profile': 'release', 'annotate': False, 'view_annotate': False, 'extra_compile_args': ['-O3', '-DNDEBUG'], 'extra_link_args': [], 'annotate_html': None, 'annotation_html': {}, 'include_dirs': ['/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/scikitplot/cython/_templates/package_examples/graph_algo', '/home/circleci/repo/galleries/examples/cython', '/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/numpy/_core/include'], 'support_files': [], 'support_paths': [], 'extra_sources': [], 'language': None})), used_cache=False, created_utc='2026-02-01T06:33:58Z', fingerprint={'python': '3.11.14', 'python_impl': 'CPython', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'machine': 'x86_64', 'processor': 'x86_64', 'cython': '3.2.4', 'numpy': '2.4.2', 'abi': ''}, meta={'kind': 'package', 'key': 'f4d40d148b4830270f073c8a416601f3603bd32aeada212649baa202c92cac1d', 'package_name': 'scikitplot_pkg_graph_algo', 'modules': [{'module_name': 'scikitplot_pkg_graph_algo.bfs', 'artifact': 'scikitplot_pkg_graph_algo/bfs.cpython-311-x86_64-linux-gnu.so', 'source_sha256': 'd3f1eaf3cb7438cf670f928965db1b4716ab6c8feacbb95ab744b6355ff758d2', 'annotate_html': None}, {'module_name': 'scikitplot_pkg_graph_algo.degree', 'artifact': 'scikitplot_pkg_graph_algo/degree.cpython-311-x86_64-linux-gnu.so', 'source_sha256': '5c22e7a9ea4bb6273325a19d4fe03a8c3ed4d5e6bb0b78f218a560196ee3a371', 'annotate_html': None}], 'created_utc': '2026-02-01T06:33:58Z', 'fingerprint': {'python': '3.11.14', 'python_impl': 'CPython', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'machine': 'x86_64', 'processor': 'x86_64', 'cython': '3.2.4', 'numpy': '2.4.2', 'abi': ''}, 'directives': {'language_level': 3, 'embedsignature': True, 'boundscheck': False, 'wraparound': False, 'initializedcheck': False, 'cdivision': True}, 'compiler_directives': {'language_level': 3, 'embedsignature': True, 'boundscheck': False, 'wraparound': False, 'initializedcheck': False, 'cdivision': True}, 'profile': 'release', 'annotate': False, 'view_annotate': False, 'extra_compile_args': ['-O3', '-DNDEBUG'], 'extra_link_args': [], 'annotate_html': None, 'annotation_html': {}, 'include_dirs': ['/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/scikitplot/cython/_templates/package_examples/graph_algo', '/home/circleci/repo/galleries/examples/cython', '/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/numpy/_core/include'], 'support_files': [], 'support_paths': [], 'extra_sources': [], 'language': None}) Keys differ by profile: fast-debug: eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea release : f4d40d148b4830270f073c8a416601f3603bd32aeada212649baa202c92cac1d Package metadata: package_name: scikitplot_pkg_graph_algo build_dir : /home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea used_cache : False created_utc : 2026-02-01T06:33:55Z Modules and artifacts: scikitplot_pkg_graph_algo.bfs artifact: /home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea/scikitplot_pkg_graph_algo/bfs.cpython-311-x86_64-linux-gnu.so scikitplot_pkg_graph_algo.degree artifact: /home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea/scikitplot_pkg_graph_algo/degree.cpython-311-x86_64-linux-gnu.so Imported module: scikitplot_pkg_graph_algo.bfs No known callable exported; public names: ['bfs', 'deque'] Pinning build: Pinned import result: PackageBuildResult(package_name='scikitplot_pkg_graph_algo', key='eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea', build_dir=PosixPath('/home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea'), results=(BuildResult(module=, key='eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea', module_name='scikitplot_pkg_graph_algo.bfs', build_dir=PosixPath('/home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea'), artifact_path=PosixPath('/home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea/scikitplot_pkg_graph_algo/bfs.cpython-311-x86_64-linux-gnu.so'), used_cache=True, created_utc='2026-02-01T06:33:55Z', fingerprint={'abi': '', 'cython': '3.2.4', 'machine': 'x86_64', 'numpy': '2.4.2', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'processor': 'x86_64', 'python': '3.11.14', 'python_impl': 'CPython'}, source_sha256='d3f1eaf3cb7438cf670f928965db1b4716ab6c8feacbb95ab744b6355ff758d2', meta={'annotate': False, 'annotate_html': None, 'annotation_html': {}, 'compiler_directives': {'boundscheck': True, 'cdivision': False, 'embedsignature': True, 'initializedcheck': True, 'language_level': 3, 'wraparound': True}, 'created_utc': '2026-02-01T06:33:55Z', 'directives': {'boundscheck': True, 'cdivision': False, 'embedsignature': True, 'initializedcheck': True, 'language_level': 3, 'wraparound': True}, 'extra_compile_args': ['-O0', '-g'], 'extra_link_args': [], 'extra_sources': [], 'fingerprint': {'abi': '', 'cython': '3.2.4', 'machine': 'x86_64', 'numpy': '2.4.2', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'processor': 'x86_64', 'python': '3.11.14', 'python_impl': 'CPython'}, 'include_dirs': ['/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/scikitplot/cython/_templates/package_examples/graph_algo', '/home/circleci/repo/galleries/examples/cython', '/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/numpy/_core/include'], 'key': 'eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea', 'kind': 'package', 'language': None, 'modules': [{'annotate_html': None, 'artifact': 'scikitplot_pkg_graph_algo/bfs.cpython-311-x86_64-linux-gnu.so', 'module_name': 'scikitplot_pkg_graph_algo.bfs', 'source_sha256': 'd3f1eaf3cb7438cf670f928965db1b4716ab6c8feacbb95ab744b6355ff758d2'}, {'annotate_html': None, 'artifact': 'scikitplot_pkg_graph_algo/degree.cpython-311-x86_64-linux-gnu.so', 'module_name': 'scikitplot_pkg_graph_algo.degree', 'source_sha256': '5c22e7a9ea4bb6273325a19d4fe03a8c3ed4d5e6bb0b78f218a560196ee3a371'}], 'package_name': 'scikitplot_pkg_graph_algo', 'profile': 'fast-debug', 'support_files': [], 'support_paths': [], 'view_annotate': False}), BuildResult(module=, key='eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea', module_name='scikitplot_pkg_graph_algo.degree', build_dir=PosixPath('/home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea'), artifact_path=PosixPath('/home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea/scikitplot_pkg_graph_algo/degree.cpython-311-x86_64-linux-gnu.so'), used_cache=True, created_utc='2026-02-01T06:33:55Z', fingerprint={'abi': '', 'cython': '3.2.4', 'machine': 'x86_64', 'numpy': '2.4.2', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'processor': 'x86_64', 'python': '3.11.14', 'python_impl': 'CPython'}, source_sha256='5c22e7a9ea4bb6273325a19d4fe03a8c3ed4d5e6bb0b78f218a560196ee3a371', meta={'annotate': False, 'annotate_html': None, 'annotation_html': {}, 'compiler_directives': {'boundscheck': True, 'cdivision': False, 'embedsignature': True, 'initializedcheck': True, 'language_level': 3, 'wraparound': True}, 'created_utc': '2026-02-01T06:33:55Z', 'directives': {'boundscheck': True, 'cdivision': False, 'embedsignature': True, 'initializedcheck': True, 'language_level': 3, 'wraparound': True}, 'extra_compile_args': ['-O0', '-g'], 'extra_link_args': [], 'extra_sources': [], 'fingerprint': {'abi': '', 'cython': '3.2.4', 'machine': 'x86_64', 'numpy': '2.4.2', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'processor': 'x86_64', 'python': '3.11.14', 'python_impl': 'CPython'}, 'include_dirs': ['/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/scikitplot/cython/_templates/package_examples/graph_algo', '/home/circleci/repo/galleries/examples/cython', '/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/numpy/_core/include'], 'key': 'eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea', 'kind': 'package', 'language': None, 'modules': [{'annotate_html': None, 'artifact': 'scikitplot_pkg_graph_algo/bfs.cpython-311-x86_64-linux-gnu.so', 'module_name': 'scikitplot_pkg_graph_algo.bfs', 'source_sha256': 'd3f1eaf3cb7438cf670f928965db1b4716ab6c8feacbb95ab744b6355ff758d2'}, {'annotate_html': None, 'artifact': 'scikitplot_pkg_graph_algo/degree.cpython-311-x86_64-linux-gnu.so', 'module_name': 'scikitplot_pkg_graph_algo.degree', 'source_sha256': '5c22e7a9ea4bb6273325a19d4fe03a8c3ed4d5e6bb0b78f218a560196ee3a371'}], 'package_name': 'scikitplot_pkg_graph_algo', 'profile': 'fast-debug', 'support_files': [], 'support_paths': [], 'view_annotate': False})), used_cache=True, created_utc='2026-02-01T06:33:55Z', fingerprint={'abi': '', 'cython': '3.2.4', 'machine': 'x86_64', 'numpy': '2.4.2', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'processor': 'x86_64', 'python': '3.11.14', 'python_impl': 'CPython'}, meta={'annotate': False, 'annotate_html': None, 'annotation_html': {}, 'compiler_directives': {'boundscheck': True, 'cdivision': False, 'embedsignature': True, 'initializedcheck': True, 'language_level': 3, 'wraparound': True}, 'created_utc': '2026-02-01T06:33:55Z', 'directives': {'boundscheck': True, 'cdivision': False, 'embedsignature': True, 'initializedcheck': True, 'language_level': 3, 'wraparound': True}, 'extra_compile_args': ['-O0', '-g'], 'extra_link_args': [], 'extra_sources': [], 'fingerprint': {'abi': '', 'cython': '3.2.4', 'machine': 'x86_64', 'numpy': '2.4.2', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'processor': 'x86_64', 'python': '3.11.14', 'python_impl': 'CPython'}, 'include_dirs': ['/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/scikitplot/cython/_templates/package_examples/graph_algo', '/home/circleci/repo/galleries/examples/cython', '/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/numpy/_core/include'], 'key': 'eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea', 'kind': 'package', 'language': None, 'modules': [{'annotate_html': None, 'artifact': 'scikitplot_pkg_graph_algo/bfs.cpython-311-x86_64-linux-gnu.so', 'module_name': 'scikitplot_pkg_graph_algo.bfs', 'source_sha256': 'd3f1eaf3cb7438cf670f928965db1b4716ab6c8feacbb95ab744b6355ff758d2'}, {'annotate_html': None, 'artifact': 'scikitplot_pkg_graph_algo/degree.cpython-311-x86_64-linux-gnu.so', 'module_name': 'scikitplot_pkg_graph_algo.degree', 'source_sha256': '5c22e7a9ea4bb6273325a19d4fe03a8c3ed4d5e6bb0b78f218a560196ee3a371'}], 'package_name': 'scikitplot_pkg_graph_algo', 'profile': 'fast-debug', 'support_files': [], 'support_paths': [], 'view_annotate': False}) Pinned package name: scikitplot_pkg_graph_algo Imported from cache key: PackageBuildResult(package_name='scikitplot_pkg_graph_algo', key='eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea', build_dir=PosixPath('/home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea'), results=(BuildResult(module=, key='eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea', module_name='scikitplot_pkg_graph_algo.bfs', build_dir=PosixPath('/home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea'), artifact_path=PosixPath('/home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea/scikitplot_pkg_graph_algo/bfs.cpython-311-x86_64-linux-gnu.so'), used_cache=True, created_utc='2026-02-01T06:33:55Z', fingerprint={'abi': '', 'cython': '3.2.4', 'machine': 'x86_64', 'numpy': '2.4.2', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'processor': 'x86_64', 'python': '3.11.14', 'python_impl': 'CPython'}, source_sha256='d3f1eaf3cb7438cf670f928965db1b4716ab6c8feacbb95ab744b6355ff758d2', meta={'annotate': False, 'annotate_html': None, 'annotation_html': {}, 'compiler_directives': {'boundscheck': True, 'cdivision': False, 'embedsignature': True, 'initializedcheck': True, 'language_level': 3, 'wraparound': True}, 'created_utc': '2026-02-01T06:33:55Z', 'directives': {'boundscheck': True, 'cdivision': False, 'embedsignature': True, 'initializedcheck': True, 'language_level': 3, 'wraparound': True}, 'extra_compile_args': ['-O0', '-g'], 'extra_link_args': [], 'extra_sources': [], 'fingerprint': {'abi': '', 'cython': '3.2.4', 'machine': 'x86_64', 'numpy': '2.4.2', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'processor': 'x86_64', 'python': '3.11.14', 'python_impl': 'CPython'}, 'include_dirs': ['/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/scikitplot/cython/_templates/package_examples/graph_algo', '/home/circleci/repo/galleries/examples/cython', '/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/numpy/_core/include'], 'key': 'eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea', 'kind': 'package', 'language': None, 'modules': [{'annotate_html': None, 'artifact': 'scikitplot_pkg_graph_algo/bfs.cpython-311-x86_64-linux-gnu.so', 'module_name': 'scikitplot_pkg_graph_algo.bfs', 'source_sha256': 'd3f1eaf3cb7438cf670f928965db1b4716ab6c8feacbb95ab744b6355ff758d2'}, {'annotate_html': None, 'artifact': 'scikitplot_pkg_graph_algo/degree.cpython-311-x86_64-linux-gnu.so', 'module_name': 'scikitplot_pkg_graph_algo.degree', 'source_sha256': '5c22e7a9ea4bb6273325a19d4fe03a8c3ed4d5e6bb0b78f218a560196ee3a371'}], 'package_name': 'scikitplot_pkg_graph_algo', 'profile': 'fast-debug', 'support_files': [], 'support_paths': [], 'view_annotate': False}), BuildResult(module=, key='eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea', module_name='scikitplot_pkg_graph_algo.degree', build_dir=PosixPath('/home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea'), artifact_path=PosixPath('/home/circleci/.cache/scikitplot/cython/eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea/scikitplot_pkg_graph_algo/degree.cpython-311-x86_64-linux-gnu.so'), used_cache=True, created_utc='2026-02-01T06:33:55Z', fingerprint={'abi': '', 'cython': '3.2.4', 'machine': 'x86_64', 'numpy': '2.4.2', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'processor': 'x86_64', 'python': '3.11.14', 'python_impl': 'CPython'}, source_sha256='5c22e7a9ea4bb6273325a19d4fe03a8c3ed4d5e6bb0b78f218a560196ee3a371', meta={'annotate': False, 'annotate_html': None, 'annotation_html': {}, 'compiler_directives': {'boundscheck': True, 'cdivision': False, 'embedsignature': True, 'initializedcheck': True, 'language_level': 3, 'wraparound': True}, 'created_utc': '2026-02-01T06:33:55Z', 'directives': {'boundscheck': True, 'cdivision': False, 'embedsignature': True, 'initializedcheck': True, 'language_level': 3, 'wraparound': True}, 'extra_compile_args': ['-O0', '-g'], 'extra_link_args': [], 'extra_sources': [], 'fingerprint': {'abi': '', 'cython': '3.2.4', 'machine': 'x86_64', 'numpy': '2.4.2', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'processor': 'x86_64', 'python': '3.11.14', 'python_impl': 'CPython'}, 'include_dirs': ['/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/scikitplot/cython/_templates/package_examples/graph_algo', '/home/circleci/repo/galleries/examples/cython', '/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/numpy/_core/include'], 'key': 'eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea', 'kind': 'package', 'language': None, 'modules': [{'annotate_html': None, 'artifact': 'scikitplot_pkg_graph_algo/bfs.cpython-311-x86_64-linux-gnu.so', 'module_name': 'scikitplot_pkg_graph_algo.bfs', 'source_sha256': 'd3f1eaf3cb7438cf670f928965db1b4716ab6c8feacbb95ab744b6355ff758d2'}, {'annotate_html': None, 'artifact': 'scikitplot_pkg_graph_algo/degree.cpython-311-x86_64-linux-gnu.so', 'module_name': 'scikitplot_pkg_graph_algo.degree', 'source_sha256': '5c22e7a9ea4bb6273325a19d4fe03a8c3ed4d5e6bb0b78f218a560196ee3a371'}], 'package_name': 'scikitplot_pkg_graph_algo', 'profile': 'fast-debug', 'support_files': [], 'support_paths': [], 'view_annotate': False})), used_cache=True, created_utc='2026-02-01T06:33:55Z', fingerprint={'abi': '', 'cython': '3.2.4', 'machine': 'x86_64', 'numpy': '2.4.2', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'processor': 'x86_64', 'python': '3.11.14', 'python_impl': 'CPython'}, meta={'annotate': False, 'annotate_html': None, 'annotation_html': {}, 'compiler_directives': {'boundscheck': True, 'cdivision': False, 'embedsignature': True, 'initializedcheck': True, 'language_level': 3, 'wraparound': True}, 'created_utc': '2026-02-01T06:33:55Z', 'directives': {'boundscheck': True, 'cdivision': False, 'embedsignature': True, 'initializedcheck': True, 'language_level': 3, 'wraparound': True}, 'extra_compile_args': ['-O0', '-g'], 'extra_link_args': [], 'extra_sources': [], 'fingerprint': {'abi': '', 'cython': '3.2.4', 'machine': 'x86_64', 'numpy': '2.4.2', 'platform': 'Linux-6.8.0-1040-aws-x86_64-with-glibc2.35', 'processor': 'x86_64', 'python': '3.11.14', 'python_impl': 'CPython'}, 'include_dirs': ['/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/scikitplot/cython/_templates/package_examples/graph_algo', '/home/circleci/repo/galleries/examples/cython', '/home/circleci/.pyenv/versions/3.11.14/lib/python3.11/site-packages/numpy/_core/include'], 'key': 'eaa5d9b14542e23dec890ebe8f973f635b2940138bbb76ca56981c56d351c9ea', 'kind': 'package', 'language': None, 'modules': [{'annotate_html': None, 'artifact': 'scikitplot_pkg_graph_algo/bfs.cpython-311-x86_64-linux-gnu.so', 'module_name': 'scikitplot_pkg_graph_algo.bfs', 'source_sha256': 'd3f1eaf3cb7438cf670f928965db1b4716ab6c8feacbb95ab744b6355ff758d2'}, {'annotate_html': None, 'artifact': 'scikitplot_pkg_graph_algo/degree.cpython-311-x86_64-linux-gnu.so', 'module_name': 'scikitplot_pkg_graph_algo.degree', 'source_sha256': '5c22e7a9ea4bb6273325a19d4fe03a8c3ed4d5e6bb0b78f218a560196ee3a371'}], 'package_name': 'scikitplot_pkg_graph_algo', 'profile': 'fast-debug', 'support_files': [], 'support_paths': [], 'view_annotate': False}) used_cache: True Cache stats snapshot: CacheStats(cache_root=PosixPath('/home/circleci/.cache/scikitplot/cython'), n_modules=9, n_packages=2, total_bytes=8892943, pinned_aliases=2, pinned_keys=2, newest_mtime_utc='2026-02-01T06:33:58Z', oldest_mtime_utc='2026-02-01T06:33:52Z') .. GENERATED FROM PYTHON SOURCE LINES 156-161 .. tags:: domain: cython plot-type: cython purpose: showcase .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 2.959 seconds) .. _sphx_glr_download_auto_examples_cython_plot_05_package_examples_multimodule.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/scikit-plots/scikit-plots/main?urlpath=lab/tree/notebooks/auto_examples/cython/plot_05_package_examples_multimodule.ipynb :alt: Launch binder :width: 150 px .. container:: lite-badge .. image:: images/jupyterlite_badge_logo.svg :target: ../../lite/lab/index.html?path=auto_examples/cython/plot_05_package_examples_multimodule.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_05_package_examples_multimodule.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_05_package_examples_multimodule.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_05_package_examples_multimodule.zip ` .. include:: plot_05_package_examples_multimodule.recommendations .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_