Skip to main content

pd-code-strong-sanity

Check whether a structurally valid PD code can be realized by the diagram-layout engine.

Installation

pip install pd-code-strong-sanity

Usage example

from pd_code_strong_sanity import sanity

pd = [[1, 5, 2, 4], [3, 1, 4, 6], [5, 3, 6, 2]]
print(sanity(pd))

Algorithm

Strong sanity delegates to the layout engine and returns True only when it can construct a routed planar matrix without inconsistent sockets or crossings. It catches layout failures and exposes a simple boolean API. This is intentionally more expensive than structural sanity and should be used when geometric realizability is required.

Input conventions

A PD code is represented as a list of four-entry crossings. Arc labels normally occur exactly twice. Public functions validate inputs and return new values rather than mutating caller-owned data unless their API explicitly says otherwise.

External software

  • A C++17 compiler is required the first time the bundled layout engine is built.
  • No display server or GUI is required.

Development

Run examples and package checks before release. Python packages require Python 3.10 or newer. Build PyPI artifacts with:

poetry check
poetry build

License

MIT. See LICENSE.

Metadata

Release files for pd-code-strong-sanity 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pd-code-strong-sanity 0.1.1
File Size Uploaded Provenance Actions
pd_code_strong_sanity-0.1.1.tar.gz 2.3 kB Without provenance Details for pd_code_strong_sanity-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pd-code-strong-sanity 0.1.1
File Interpreter ABI Platform Actions
pd_code_strong_sanity-0.1.1-py3-none-any.whl Python 3 none any Details for pd_code_strong_sanity-0.1.1-py3-none-any.whl

Total release size: 5.5 kB

Release files / pd_code_strong_sanity-0.1.1.tar.gz

Download URL pd_code_strong_sanity-0.1.1.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
beb171f75eb35fe307fa5ff6fe7fa31fbda8024efb777ea05d27a41346f1c3d6
BLAKE2b-256 checksum
How to use checksums
415239560cdb084cc297b6cccaa175ae41bf362850be1588a14ec99cf2c9847b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.11.15 Windows/10

Release files / pd_code_strong_sanity-0.1.1-py3-none-any.whl

Download URL pd_code_strong_sanity-0.1.1-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
71d25fbe7ac351c74ddf1dab1769c7189e359a90f0201aba0455748359d46d20
BLAKE2b-256 checksum
How to use checksums
69f2c8b4d7933ac98ba87c714c1eeabc30764db14606bc6e2fd673fde67ebbaf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.11.15 Windows/10

Security for pd-code-strong-sanity 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page