Skip to main content

Modular structural-based dynamics on networks.

Project description

TNFR Python Engine

Canonical implementation of the Resonant Fractal Nature Theory (TNFR) for modelling structural coherence. The engine seeds resonant nodes, applies structural operators, coordinates ΔNFR/phase dynamics, and measures coherence metrics (C(t), Si, νf) without breaking the nodal equation $\partial EPI/\partial t = \nu_f \cdot \Delta NFR(t)$.

Snapshot

  • Operate: build nodes with tnfr.create_nfr, execute trajectories via tnfr.structural.run_sequence, and evolve dynamics with tnfr.dynamics.run.
  • Observe: register metrics/trace callbacks to capture ΔNFR, C(t), Si, and structural histories for every run.
  • Extend: rely on the canonical operator grammar and invariants before introducing new utilities or telemetry.

Quickstart

Install from PyPI (Python ≥ 3.9):

pip install tnfr

Then follow the quickstart guide for Python and CLI walkthroughs plus optional dependency caching helpers.

Documentation map

Documentation build workflow

Netlify publishes the documentation with MkDocs so the generated site preserves the canonical TNFR structure. The same steps can be executed locally:

  1. Create and activate a virtual environment (e.g. python -m venv .venv && source .venv/bin/activate).
  2. Install the documentation toolchain: python -m pip install -r docs/requirements.txt.
  3. Preview changes live with mkdocs serve or reproduce the Netlify pipeline with mkdocs build, which writes the static site to the site/ directory.

The Netlify build (netlify.toml) runs python -m pip install -r docs/requirements.txt && mkdocs build and publishes the resulting site/ directory, ensuring the hosted documentation matches local builds.

Local development

Use the helper scripts to keep formatting aligned with the canonical configuration and to reproduce the quality gate locally:

./scripts/format.sh           # Apply Black and isort across src/, tests/, scripts/, and benchmarks/
./scripts/format.sh --check   # Validate formatting without modifying files
./scripts/run_tests.sh        # Execute the full QA battery (type checks, tests, coverage, linting)

The formatting helper automatically prefers poetry run when a Poetry environment is available and falls back to python -m invocations so local runs mirror the tooling invoked in continuous integration.

Additional resources

  • ARCHITECTURE.md — orchestration layers and invariant enforcement.
  • CONTRIBUTING.md — QA battery (scripts/run_tests.sh) and review expectations.
  • TNFR.pdf — theoretical background, structural operators, and paradigm glossary.

Migration notes

  • Si dispersion keys: Replace any remaining dSi_ddisp_fase entries in graph payloads or configuration files with the English dSi_dphase_disp key before upgrading. The runtime now raises :class:ValueError listing any unexpected sensitivity keys, and :func:tnfr.metrics.sense_index.compute_Si_node rejects unknown keyword arguments.
  • Refer to the release notes for a migration snippet that rewrites stored graphs in place prior to running the new version.

Licensing

Released under the MIT License. Cite the TNFR paradigm when publishing research or derived artefacts based on this engine.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tnfr-6.0.0.tar.gz (184.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tnfr-6.0.0-py3-none-any.whl (238.0 kB view details)

Uploaded Python 3

File details

Details for the file tnfr-6.0.0.tar.gz.

File metadata

  • Download URL: tnfr-6.0.0.tar.gz
  • Upload date:
  • Size: 184.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.6

File hashes

Hashes for tnfr-6.0.0.tar.gz
Algorithm Hash digest
SHA256 a90348b0438dc1507a1ec0f852083afba47751c1afb12c1649e341df8f0a60d8
MD5 107006263ce192ba5ab9e678833d0530
BLAKE2b-256 a267fe7c715aef7d7b8e88084e79ebb496b6d2653186b2d15a3540e6a19b6394

See more details on using hashes here.

File details

Details for the file tnfr-6.0.0-py3-none-any.whl.

File metadata

  • Download URL: tnfr-6.0.0-py3-none-any.whl
  • Upload date:
  • Size: 238.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.6

File hashes

Hashes for tnfr-6.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e1aae1cee8b47aa1f5da23dc8c97b50e9ea44b7ca75d2a98191c2819de51934
MD5 914dd52f739a58ac309cb8b90aa09d83
BLAKE2b-256 90df80c13143234bb6625168dd7a417dfe3fae4cfa1e50701bc6bfbeaa19e3e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page