pnm 1.0.3
peclet.pnm — pore-network extraction from SDF geometry (Kokkos)
Loading...
Searching...
No Matches
test_stub_sync Namespace Reference

Functions

 _public (name)
 _members (cls)
 _stub_names ()
 _runtime_names ()
 test_stub_covers_every_public_name ()
 test_stub_names_exist_at_runtime ()

Variables

str STUB = Path(__file__).resolve().parents[2] / "packaging" / "_pnm.pyi"
dict MPI_ONLY = {"mpi_block", "extract_pore_network_mpi", "extract_network_flow_mpi"}

Detailed Description

Contract: the shipped type stub packaging/_pnm.pyi covers every public name of peclet.pnm._pnm.

The stub is generated by nanobind.stubgen against an MPI-enabled host build (recipe in
CMakeLists.txt, next to the rule that stages it). A binding added without regenerating it fails
here. Names in the stub but absent at runtime fail too, except on a build without MPI, which lacks
the distributed names the stub carries.

Run: PYTHONPATH=<build> python -m pytest -q tests/python/test_stub_sync.py

Function Documentation

◆ _public()

test_stub_sync._public ( name)
protected

Definition at line 20 of file test_stub_sync.py.

Referenced by _members(), and _runtime_names().

◆ _members()

test_stub_sync._members ( cls)
protected

Definition at line 24 of file test_stub_sync.py.

References _public().

Referenced by _stub_names().

◆ _stub_names()

test_stub_sync._stub_names ( )
protected

Definition at line 29 of file test_stub_sync.py.

References _members().

Referenced by test_stub_covers_every_public_name(), and test_stub_names_exist_at_runtime().

◆ _runtime_names()

test_stub_sync._runtime_names ( )
protected

Definition at line 41 of file test_stub_sync.py.

References _public().

Referenced by test_stub_covers_every_public_name(), and test_stub_names_exist_at_runtime().

◆ test_stub_covers_every_public_name()

test_stub_sync.test_stub_covers_every_public_name ( )

Definition at line 56 of file test_stub_sync.py.

References _runtime_names(), and _stub_names().

◆ test_stub_names_exist_at_runtime()

test_stub_sync.test_stub_names_exist_at_runtime ( )

Definition at line 62 of file test_stub_sync.py.

References _runtime_names(), and _stub_names().

Variable Documentation

◆ STUB

str test_stub_sync.STUB = Path(__file__).resolve().parents[2] / "packaging" / "_pnm.pyi"

Definition at line 15 of file test_stub_sync.py.

◆ MPI_ONLY

dict test_stub_sync.MPI_ONLY = {"mpi_block", "extract_pore_network_mpi", "extract_network_flow_mpi"}

Definition at line 17 of file test_stub_sync.py.