tnfr 4.5.2__py3-none-any.whl → 8.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tnfr might be problematic. Click here for more details.
- tnfr/__init__.py +334 -50
- tnfr/__init__.pyi +33 -0
- tnfr/_compat.py +10 -0
- tnfr/_generated_version.py +34 -0
- tnfr/_version.py +49 -0
- tnfr/_version.pyi +7 -0
- tnfr/alias.py +214 -37
- tnfr/alias.pyi +108 -0
- tnfr/backends/__init__.py +354 -0
- tnfr/backends/jax_backend.py +173 -0
- tnfr/backends/numpy_backend.py +238 -0
- tnfr/backends/optimized_numpy.py +420 -0
- tnfr/backends/torch_backend.py +408 -0
- tnfr/cache.py +149 -556
- tnfr/cache.pyi +13 -0
- tnfr/cli/__init__.py +51 -16
- tnfr/cli/__init__.pyi +26 -0
- tnfr/cli/arguments.py +344 -32
- tnfr/cli/arguments.pyi +29 -0
- tnfr/cli/execution.py +676 -50
- tnfr/cli/execution.pyi +70 -0
- tnfr/cli/interactive_validator.py +614 -0
- tnfr/cli/utils.py +18 -3
- tnfr/cli/utils.pyi +7 -0
- tnfr/cli/validate.py +236 -0
- tnfr/compat/__init__.py +85 -0
- tnfr/compat/dataclass.py +136 -0
- tnfr/compat/jsonschema_stub.py +61 -0
- tnfr/compat/matplotlib_stub.py +73 -0
- tnfr/compat/numpy_stub.py +155 -0
- tnfr/config/__init__.py +224 -0
- tnfr/config/__init__.pyi +10 -0
- tnfr/{constants_glyphs.py → config/constants.py} +26 -20
- tnfr/config/constants.pyi +12 -0
- tnfr/config/defaults.py +54 -0
- tnfr/{constants/core.py → config/defaults_core.py} +59 -6
- tnfr/config/defaults_init.py +33 -0
- tnfr/config/defaults_metric.py +104 -0
- tnfr/config/feature_flags.py +81 -0
- tnfr/config/feature_flags.pyi +16 -0
- tnfr/config/glyph_constants.py +31 -0
- tnfr/config/init.py +77 -0
- tnfr/config/init.pyi +8 -0
- tnfr/config/operator_names.py +254 -0
- tnfr/config/operator_names.pyi +36 -0
- tnfr/config/physics_derivation.py +354 -0
- tnfr/config/presets.py +83 -0
- tnfr/config/presets.pyi +7 -0
- tnfr/config/security.py +927 -0
- tnfr/config/thresholds.py +114 -0
- tnfr/config/tnfr_config.py +498 -0
- tnfr/constants/__init__.py +51 -133
- tnfr/constants/__init__.pyi +92 -0
- tnfr/constants/aliases.py +33 -0
- tnfr/constants/aliases.pyi +27 -0
- tnfr/constants/init.py +3 -1
- tnfr/constants/init.pyi +12 -0
- tnfr/constants/metric.py +9 -15
- tnfr/constants/metric.pyi +19 -0
- tnfr/core/__init__.py +33 -0
- tnfr/core/container.py +226 -0
- tnfr/core/default_implementations.py +329 -0
- tnfr/core/interfaces.py +279 -0
- tnfr/dynamics/__init__.py +213 -633
- tnfr/dynamics/__init__.pyi +83 -0
- tnfr/dynamics/adaptation.py +267 -0
- tnfr/dynamics/adaptation.pyi +7 -0
- tnfr/dynamics/adaptive_sequences.py +189 -0
- tnfr/dynamics/adaptive_sequences.pyi +14 -0
- tnfr/dynamics/aliases.py +23 -0
- tnfr/dynamics/aliases.pyi +19 -0
- tnfr/dynamics/bifurcation.py +232 -0
- tnfr/dynamics/canonical.py +229 -0
- tnfr/dynamics/canonical.pyi +48 -0
- tnfr/dynamics/coordination.py +385 -0
- tnfr/dynamics/coordination.pyi +25 -0
- tnfr/dynamics/dnfr.py +2699 -398
- tnfr/dynamics/dnfr.pyi +26 -0
- tnfr/dynamics/dynamic_limits.py +225 -0
- tnfr/dynamics/feedback.py +252 -0
- tnfr/dynamics/feedback.pyi +24 -0
- tnfr/dynamics/fused_dnfr.py +454 -0
- tnfr/dynamics/homeostasis.py +157 -0
- tnfr/dynamics/homeostasis.pyi +14 -0
- tnfr/dynamics/integrators.py +496 -102
- tnfr/dynamics/integrators.pyi +36 -0
- tnfr/dynamics/learning.py +310 -0
- tnfr/dynamics/learning.pyi +33 -0
- tnfr/dynamics/metabolism.py +254 -0
- tnfr/dynamics/nbody.py +796 -0
- tnfr/dynamics/nbody_tnfr.py +783 -0
- tnfr/dynamics/propagation.py +326 -0
- tnfr/dynamics/runtime.py +908 -0
- tnfr/dynamics/runtime.pyi +77 -0
- tnfr/dynamics/sampling.py +10 -5
- tnfr/dynamics/sampling.pyi +7 -0
- tnfr/dynamics/selectors.py +711 -0
- tnfr/dynamics/selectors.pyi +85 -0
- tnfr/dynamics/structural_clip.py +207 -0
- tnfr/errors/__init__.py +37 -0
- tnfr/errors/contextual.py +492 -0
- tnfr/execution.py +77 -55
- tnfr/execution.pyi +45 -0
- tnfr/extensions/__init__.py +205 -0
- tnfr/extensions/__init__.pyi +18 -0
- tnfr/extensions/base.py +173 -0
- tnfr/extensions/base.pyi +35 -0
- tnfr/extensions/business/__init__.py +71 -0
- tnfr/extensions/business/__init__.pyi +11 -0
- tnfr/extensions/business/cookbook.py +88 -0
- tnfr/extensions/business/cookbook.pyi +8 -0
- tnfr/extensions/business/health_analyzers.py +202 -0
- tnfr/extensions/business/health_analyzers.pyi +9 -0
- tnfr/extensions/business/patterns.py +183 -0
- tnfr/extensions/business/patterns.pyi +8 -0
- tnfr/extensions/medical/__init__.py +73 -0
- tnfr/extensions/medical/__init__.pyi +11 -0
- tnfr/extensions/medical/cookbook.py +88 -0
- tnfr/extensions/medical/cookbook.pyi +8 -0
- tnfr/extensions/medical/health_analyzers.py +181 -0
- tnfr/extensions/medical/health_analyzers.pyi +9 -0
- tnfr/extensions/medical/patterns.py +163 -0
- tnfr/extensions/medical/patterns.pyi +8 -0
- tnfr/flatten.py +29 -50
- tnfr/flatten.pyi +21 -0
- tnfr/gamma.py +66 -53
- tnfr/gamma.pyi +36 -0
- tnfr/glyph_history.py +144 -57
- tnfr/glyph_history.pyi +35 -0
- tnfr/glyph_runtime.py +19 -0
- tnfr/glyph_runtime.pyi +8 -0
- tnfr/immutable.py +70 -30
- tnfr/immutable.pyi +36 -0
- tnfr/initialization.py +22 -16
- tnfr/initialization.pyi +65 -0
- tnfr/io.py +5 -241
- tnfr/io.pyi +13 -0
- tnfr/locking.pyi +7 -0
- tnfr/mathematics/__init__.py +79 -0
- tnfr/mathematics/backend.py +453 -0
- tnfr/mathematics/backend.pyi +99 -0
- tnfr/mathematics/dynamics.py +408 -0
- tnfr/mathematics/dynamics.pyi +90 -0
- tnfr/mathematics/epi.py +391 -0
- tnfr/mathematics/epi.pyi +65 -0
- tnfr/mathematics/generators.py +242 -0
- tnfr/mathematics/generators.pyi +29 -0
- tnfr/mathematics/metrics.py +119 -0
- tnfr/mathematics/metrics.pyi +16 -0
- tnfr/mathematics/operators.py +239 -0
- tnfr/mathematics/operators.pyi +59 -0
- tnfr/mathematics/operators_factory.py +124 -0
- tnfr/mathematics/operators_factory.pyi +11 -0
- tnfr/mathematics/projection.py +87 -0
- tnfr/mathematics/projection.pyi +33 -0
- tnfr/mathematics/runtime.py +182 -0
- tnfr/mathematics/runtime.pyi +64 -0
- tnfr/mathematics/spaces.py +256 -0
- tnfr/mathematics/spaces.pyi +83 -0
- tnfr/mathematics/transforms.py +305 -0
- tnfr/mathematics/transforms.pyi +62 -0
- tnfr/metrics/__init__.py +47 -9
- tnfr/metrics/__init__.pyi +20 -0
- tnfr/metrics/buffer_cache.py +163 -0
- tnfr/metrics/buffer_cache.pyi +24 -0
- tnfr/metrics/cache_utils.py +214 -0
- tnfr/metrics/coherence.py +1510 -330
- tnfr/metrics/coherence.pyi +129 -0
- tnfr/metrics/common.py +23 -16
- tnfr/metrics/common.pyi +35 -0
- tnfr/metrics/core.py +251 -36
- tnfr/metrics/core.pyi +13 -0
- tnfr/metrics/diagnosis.py +709 -110
- tnfr/metrics/diagnosis.pyi +86 -0
- tnfr/metrics/emergence.py +245 -0
- tnfr/metrics/export.py +60 -18
- tnfr/metrics/export.pyi +7 -0
- tnfr/metrics/glyph_timing.py +233 -43
- tnfr/metrics/glyph_timing.pyi +81 -0
- tnfr/metrics/learning_metrics.py +280 -0
- tnfr/metrics/learning_metrics.pyi +21 -0
- tnfr/metrics/phase_coherence.py +351 -0
- tnfr/metrics/phase_compatibility.py +349 -0
- tnfr/metrics/reporting.py +63 -28
- tnfr/metrics/reporting.pyi +25 -0
- tnfr/metrics/sense_index.py +1126 -43
- tnfr/metrics/sense_index.pyi +9 -0
- tnfr/metrics/trig.py +215 -23
- tnfr/metrics/trig.pyi +13 -0
- tnfr/metrics/trig_cache.py +148 -24
- tnfr/metrics/trig_cache.pyi +10 -0
- tnfr/multiscale/__init__.py +32 -0
- tnfr/multiscale/hierarchical.py +517 -0
- tnfr/node.py +646 -140
- tnfr/node.pyi +139 -0
- tnfr/observers.py +160 -45
- tnfr/observers.pyi +31 -0
- tnfr/ontosim.py +23 -19
- tnfr/ontosim.pyi +28 -0
- tnfr/operators/__init__.py +1358 -106
- tnfr/operators/__init__.pyi +31 -0
- tnfr/operators/algebra.py +277 -0
- tnfr/operators/canonical_patterns.py +420 -0
- tnfr/operators/cascade.py +267 -0
- tnfr/operators/cycle_detection.py +358 -0
- tnfr/operators/definitions.py +4108 -0
- tnfr/operators/definitions.pyi +78 -0
- tnfr/operators/grammar.py +1164 -0
- tnfr/operators/grammar.pyi +140 -0
- tnfr/operators/hamiltonian.py +710 -0
- tnfr/operators/health_analyzer.py +809 -0
- tnfr/operators/jitter.py +107 -38
- tnfr/operators/jitter.pyi +11 -0
- tnfr/operators/lifecycle.py +314 -0
- tnfr/operators/metabolism.py +618 -0
- tnfr/operators/metrics.py +2138 -0
- tnfr/operators/network_analysis/__init__.py +27 -0
- tnfr/operators/network_analysis/source_detection.py +186 -0
- tnfr/operators/nodal_equation.py +395 -0
- tnfr/operators/pattern_detection.py +660 -0
- tnfr/operators/patterns.py +669 -0
- tnfr/operators/postconditions/__init__.py +38 -0
- tnfr/operators/postconditions/mutation.py +236 -0
- tnfr/operators/preconditions/__init__.py +1226 -0
- tnfr/operators/preconditions/coherence.py +305 -0
- tnfr/operators/preconditions/dissonance.py +236 -0
- tnfr/operators/preconditions/emission.py +128 -0
- tnfr/operators/preconditions/mutation.py +580 -0
- tnfr/operators/preconditions/reception.py +125 -0
- tnfr/operators/preconditions/resonance.py +364 -0
- tnfr/operators/registry.py +74 -0
- tnfr/operators/registry.pyi +9 -0
- tnfr/operators/remesh.py +1415 -91
- tnfr/operators/remesh.pyi +26 -0
- tnfr/operators/structural_units.py +268 -0
- tnfr/operators/unified_grammar.py +105 -0
- tnfr/parallel/__init__.py +54 -0
- tnfr/parallel/auto_scaler.py +234 -0
- tnfr/parallel/distributed.py +384 -0
- tnfr/parallel/engine.py +238 -0
- tnfr/parallel/gpu_engine.py +420 -0
- tnfr/parallel/monitoring.py +248 -0
- tnfr/parallel/partitioner.py +459 -0
- tnfr/py.typed +0 -0
- tnfr/recipes/__init__.py +22 -0
- tnfr/recipes/cookbook.py +743 -0
- tnfr/rng.py +75 -151
- tnfr/rng.pyi +26 -0
- tnfr/schemas/__init__.py +8 -0
- tnfr/schemas/grammar.json +94 -0
- tnfr/sdk/__init__.py +107 -0
- tnfr/sdk/__init__.pyi +19 -0
- tnfr/sdk/adaptive_system.py +173 -0
- tnfr/sdk/adaptive_system.pyi +21 -0
- tnfr/sdk/builders.py +370 -0
- tnfr/sdk/builders.pyi +51 -0
- tnfr/sdk/fluent.py +1121 -0
- tnfr/sdk/fluent.pyi +74 -0
- tnfr/sdk/templates.py +342 -0
- tnfr/sdk/templates.pyi +41 -0
- tnfr/sdk/utils.py +341 -0
- tnfr/secure_config.py +46 -0
- tnfr/security/__init__.py +70 -0
- tnfr/security/database.py +514 -0
- tnfr/security/subprocess.py +503 -0
- tnfr/security/validation.py +290 -0
- tnfr/selector.py +59 -22
- tnfr/selector.pyi +19 -0
- tnfr/sense.py +92 -67
- tnfr/sense.pyi +23 -0
- tnfr/services/__init__.py +17 -0
- tnfr/services/orchestrator.py +325 -0
- tnfr/sparse/__init__.py +39 -0
- tnfr/sparse/representations.py +492 -0
- tnfr/structural.py +639 -263
- tnfr/structural.pyi +83 -0
- tnfr/telemetry/__init__.py +35 -0
- tnfr/telemetry/cache_metrics.py +226 -0
- tnfr/telemetry/cache_metrics.pyi +64 -0
- tnfr/telemetry/nu_f.py +422 -0
- tnfr/telemetry/nu_f.pyi +108 -0
- tnfr/telemetry/verbosity.py +36 -0
- tnfr/telemetry/verbosity.pyi +15 -0
- tnfr/tokens.py +2 -4
- tnfr/tokens.pyi +36 -0
- tnfr/tools/__init__.py +20 -0
- tnfr/tools/domain_templates.py +478 -0
- tnfr/tools/sequence_generator.py +846 -0
- tnfr/topology/__init__.py +13 -0
- tnfr/topology/asymmetry.py +151 -0
- tnfr/trace.py +300 -126
- tnfr/trace.pyi +42 -0
- tnfr/tutorials/__init__.py +38 -0
- tnfr/tutorials/autonomous_evolution.py +285 -0
- tnfr/tutorials/interactive.py +1576 -0
- tnfr/tutorials/structural_metabolism.py +238 -0
- tnfr/types.py +743 -12
- tnfr/types.pyi +357 -0
- tnfr/units.py +68 -0
- tnfr/units.pyi +13 -0
- tnfr/utils/__init__.py +282 -0
- tnfr/utils/__init__.pyi +215 -0
- tnfr/utils/cache.py +4223 -0
- tnfr/utils/cache.pyi +470 -0
- tnfr/{callback_utils.py → utils/callbacks.py} +26 -39
- tnfr/utils/callbacks.pyi +49 -0
- tnfr/utils/chunks.py +108 -0
- tnfr/utils/chunks.pyi +22 -0
- tnfr/utils/data.py +428 -0
- tnfr/utils/data.pyi +74 -0
- tnfr/utils/graph.py +85 -0
- tnfr/utils/graph.pyi +10 -0
- tnfr/utils/init.py +821 -0
- tnfr/utils/init.pyi +80 -0
- tnfr/utils/io.py +559 -0
- tnfr/utils/io.pyi +66 -0
- tnfr/{helpers → utils}/numeric.py +51 -24
- tnfr/utils/numeric.pyi +21 -0
- tnfr/validation/__init__.py +257 -0
- tnfr/validation/__init__.pyi +85 -0
- tnfr/validation/compatibility.py +460 -0
- tnfr/validation/compatibility.pyi +6 -0
- tnfr/validation/config.py +73 -0
- tnfr/validation/graph.py +139 -0
- tnfr/validation/graph.pyi +18 -0
- tnfr/validation/input_validation.py +755 -0
- tnfr/validation/invariants.py +712 -0
- tnfr/validation/rules.py +253 -0
- tnfr/validation/rules.pyi +44 -0
- tnfr/validation/runtime.py +279 -0
- tnfr/validation/runtime.pyi +28 -0
- tnfr/validation/sequence_validator.py +162 -0
- tnfr/validation/soft_filters.py +170 -0
- tnfr/validation/soft_filters.pyi +32 -0
- tnfr/validation/spectral.py +164 -0
- tnfr/validation/spectral.pyi +42 -0
- tnfr/validation/validator.py +1266 -0
- tnfr/validation/window.py +39 -0
- tnfr/validation/window.pyi +1 -0
- tnfr/visualization/__init__.py +98 -0
- tnfr/visualization/cascade_viz.py +256 -0
- tnfr/visualization/hierarchy.py +284 -0
- tnfr/visualization/sequence_plotter.py +784 -0
- tnfr/viz/__init__.py +60 -0
- tnfr/viz/matplotlib.py +278 -0
- tnfr/viz/matplotlib.pyi +35 -0
- tnfr-8.5.0.dist-info/METADATA +573 -0
- tnfr-8.5.0.dist-info/RECORD +353 -0
- {tnfr-4.5.2.dist-info → tnfr-8.5.0.dist-info}/entry_points.txt +1 -0
- {tnfr-4.5.2.dist-info → tnfr-8.5.0.dist-info}/licenses/LICENSE.md +1 -1
- tnfr/collections_utils.py +0 -300
- tnfr/config.py +0 -32
- tnfr/grammar.py +0 -344
- tnfr/graph_utils.py +0 -84
- tnfr/helpers/__init__.py +0 -71
- tnfr/import_utils.py +0 -228
- tnfr/json_utils.py +0 -162
- tnfr/logging_utils.py +0 -116
- tnfr/presets.py +0 -60
- tnfr/validators.py +0 -84
- tnfr/value_utils.py +0 -59
- tnfr-4.5.2.dist-info/METADATA +0 -379
- tnfr-4.5.2.dist-info/RECORD +0 -67
- {tnfr-4.5.2.dist-info → tnfr-8.5.0.dist-info}/WHEEL +0 -0
- {tnfr-4.5.2.dist-info → tnfr-8.5.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,573 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tnfr
|
|
3
|
+
Version: 8.5.0
|
|
4
|
+
Summary: Modular structural-based dynamics on networks.
|
|
5
|
+
Author: fmg
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://pypi.org/project/tnfr/
|
|
8
|
+
Project-URL: Repository, https://github.com/fermga/TNFR-Python-Engine
|
|
9
|
+
Project-URL: GPT, https://chatgpt.com/g/g-67abc78885a88191b2d67f94fd60dc97-tnfr-resonant-fractal-nature-theory
|
|
10
|
+
Keywords: TNFR,complex systems,fractals,resonance,networks,structural dynamics,structural analysis
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
19
|
+
Classifier: Operating System :: OS Independent
|
|
20
|
+
Classifier: Intended Audience :: Science/Research
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
24
|
+
Requires-Python: >=3.9
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE.md
|
|
27
|
+
Requires-Dist: networkx<4.0,>=2.6
|
|
28
|
+
Requires-Dist: cachetools<7.0,>=5.0
|
|
29
|
+
Requires-Dist: numpy<3.0,>=1.24
|
|
30
|
+
Requires-Dist: scipy<2.0,>=1.9
|
|
31
|
+
Requires-Dist: typing-extensions>=4.4; python_version < "3.10"
|
|
32
|
+
Provides-Extra: compute-jax
|
|
33
|
+
Requires-Dist: jax<1.0,>=0.4; extra == "compute-jax"
|
|
34
|
+
Provides-Extra: compute-torch
|
|
35
|
+
Requires-Dist: torch<3.0,>=2.1; extra == "compute-torch"
|
|
36
|
+
Provides-Extra: serialization
|
|
37
|
+
Requires-Dist: pyyaml<7.0,>=6.0; extra == "serialization"
|
|
38
|
+
Requires-Dist: orjson<4,>=3; extra == "serialization"
|
|
39
|
+
Provides-Extra: viz-basic
|
|
40
|
+
Requires-Dist: matplotlib<4.0,>=3.7; extra == "viz-basic"
|
|
41
|
+
Provides-Extra: numpy
|
|
42
|
+
Provides-Extra: jax
|
|
43
|
+
Requires-Dist: jax<1.0,>=0.4; extra == "jax"
|
|
44
|
+
Provides-Extra: torch
|
|
45
|
+
Requires-Dist: torch<3.0,>=2.1; extra == "torch"
|
|
46
|
+
Provides-Extra: yaml
|
|
47
|
+
Requires-Dist: pyyaml<7.0,>=6.0; extra == "yaml"
|
|
48
|
+
Provides-Extra: orjson
|
|
49
|
+
Requires-Dist: orjson<4,>=3; extra == "orjson"
|
|
50
|
+
Provides-Extra: viz
|
|
51
|
+
Requires-Dist: matplotlib<4.0,>=3.7; extra == "viz"
|
|
52
|
+
Provides-Extra: docs
|
|
53
|
+
Requires-Dist: sphinx>=7.2; extra == "docs"
|
|
54
|
+
Requires-Dist: sphinx-autodoc-typehints>=1.25; extra == "docs"
|
|
55
|
+
Requires-Dist: myst-parser>=2.0; extra == "docs"
|
|
56
|
+
Requires-Dist: nbsphinx>=0.9; extra == "docs"
|
|
57
|
+
Requires-Dist: sphinx-rtd-theme>=1.3; extra == "docs"
|
|
58
|
+
Requires-Dist: sphinxcontrib-mermaid>=0.9; extra == "docs"
|
|
59
|
+
Requires-Dist: ipykernel>=6; extra == "docs"
|
|
60
|
+
Requires-Dist: nbconvert>=7.16; extra == "docs"
|
|
61
|
+
Requires-Dist: pypandoc-binary>=1.14; extra == "docs"
|
|
62
|
+
Requires-Dist: mkdocs>=1.5; extra == "docs"
|
|
63
|
+
Requires-Dist: mkdocs-material>=9.4; extra == "docs"
|
|
64
|
+
Requires-Dist: mkdocs-jupyter>=0.24; extra == "docs"
|
|
65
|
+
Provides-Extra: test-unit
|
|
66
|
+
Requires-Dist: pytest<9,>=7; extra == "test-unit"
|
|
67
|
+
Requires-Dist: pytest-cov<8,>=4; extra == "test-unit"
|
|
68
|
+
Requires-Dist: pytest-timeout<3,>=2; extra == "test-unit"
|
|
69
|
+
Provides-Extra: test-property
|
|
70
|
+
Requires-Dist: hypothesis<7,>=6; extra == "test-property"
|
|
71
|
+
Requires-Dist: hypothesis-networkx<1.0,>=0.3; extra == "test-property"
|
|
72
|
+
Provides-Extra: test-performance
|
|
73
|
+
Requires-Dist: pytest-benchmark<6,>=4; extra == "test-performance"
|
|
74
|
+
Provides-Extra: test-parallel
|
|
75
|
+
Requires-Dist: pytest-xdist<4,>=3; extra == "test-parallel"
|
|
76
|
+
Provides-Extra: test-quality
|
|
77
|
+
Requires-Dist: pydocstyle<7,>=6; extra == "test-quality"
|
|
78
|
+
Requires-Dist: flake8<8,>=5; extra == "test-quality"
|
|
79
|
+
Requires-Dist: flake8-pyproject<2.0,>=1.2; extra == "test-quality"
|
|
80
|
+
Requires-Dist: vulture<3,>=2; extra == "test-quality"
|
|
81
|
+
Provides-Extra: test-all
|
|
82
|
+
Requires-Dist: pytest<9,>=7; extra == "test-all"
|
|
83
|
+
Requires-Dist: pytest-cov<8,>=4; extra == "test-all"
|
|
84
|
+
Requires-Dist: pytest-timeout<3,>=2; extra == "test-all"
|
|
85
|
+
Requires-Dist: hypothesis<7,>=6; extra == "test-all"
|
|
86
|
+
Requires-Dist: hypothesis-networkx<1.0,>=0.3; extra == "test-all"
|
|
87
|
+
Requires-Dist: pytest-benchmark<6,>=4; extra == "test-all"
|
|
88
|
+
Requires-Dist: pytest-xdist<4,>=3; extra == "test-all"
|
|
89
|
+
Requires-Dist: pydocstyle<7,>=6; extra == "test-all"
|
|
90
|
+
Requires-Dist: flake8<8,>=5; extra == "test-all"
|
|
91
|
+
Requires-Dist: flake8-pyproject<2.0,>=1.2; extra == "test-all"
|
|
92
|
+
Requires-Dist: vulture<3,>=2; extra == "test-all"
|
|
93
|
+
Requires-Dist: matplotlib<4.0,>=3.7; extra == "test-all"
|
|
94
|
+
Provides-Extra: test
|
|
95
|
+
Requires-Dist: pytest<9,>=7; extra == "test"
|
|
96
|
+
Requires-Dist: pytest-cov<8,>=4; extra == "test"
|
|
97
|
+
Requires-Dist: pytest-timeout<3,>=2; extra == "test"
|
|
98
|
+
Requires-Dist: hypothesis<7,>=6; extra == "test"
|
|
99
|
+
Requires-Dist: hypothesis-networkx<1.0,>=0.3; extra == "test"
|
|
100
|
+
Requires-Dist: pytest-benchmark<6,>=4; extra == "test"
|
|
101
|
+
Requires-Dist: pytest-xdist<4,>=3; extra == "test"
|
|
102
|
+
Requires-Dist: pydocstyle<7,>=6; extra == "test"
|
|
103
|
+
Requires-Dist: flake8<8,>=5; extra == "test"
|
|
104
|
+
Requires-Dist: flake8-pyproject<2.0,>=1.2; extra == "test"
|
|
105
|
+
Requires-Dist: vulture<3,>=2; extra == "test"
|
|
106
|
+
Requires-Dist: matplotlib<4.0,>=3.7; extra == "test"
|
|
107
|
+
Provides-Extra: typecheck
|
|
108
|
+
Requires-Dist: mypy<2.0,>=1.8; extra == "typecheck"
|
|
109
|
+
Requires-Dist: pyright<1.2.0,>=1.1.350; extra == "typecheck"
|
|
110
|
+
Requires-Dist: networkx-stubs>=0.0.1; extra == "typecheck"
|
|
111
|
+
Requires-Dist: types-cachetools>=6.0.0.0; extra == "typecheck"
|
|
112
|
+
Provides-Extra: dev-minimal
|
|
113
|
+
Requires-Dist: mypy<2.0,>=1.8; extra == "dev-minimal"
|
|
114
|
+
Requires-Dist: black<26,>=23; extra == "dev-minimal"
|
|
115
|
+
Requires-Dist: pytest<9,>=7; extra == "dev-minimal"
|
|
116
|
+
Requires-Dist: pytest-cov<8,>=4; extra == "dev-minimal"
|
|
117
|
+
Requires-Dist: pytest-timeout<3,>=2; extra == "dev-minimal"
|
|
118
|
+
Provides-Extra: dev-full
|
|
119
|
+
Requires-Dist: pytest<9,>=7; extra == "dev-full"
|
|
120
|
+
Requires-Dist: pytest-cov<8,>=4; extra == "dev-full"
|
|
121
|
+
Requires-Dist: pytest-timeout<3,>=2; extra == "dev-full"
|
|
122
|
+
Requires-Dist: hypothesis<7,>=6; extra == "dev-full"
|
|
123
|
+
Requires-Dist: hypothesis-networkx<1.0,>=0.3; extra == "dev-full"
|
|
124
|
+
Requires-Dist: pytest-benchmark<6,>=4; extra == "dev-full"
|
|
125
|
+
Requires-Dist: pytest-xdist<4,>=3; extra == "dev-full"
|
|
126
|
+
Requires-Dist: pydocstyle<7,>=6; extra == "dev-full"
|
|
127
|
+
Requires-Dist: flake8<8,>=5; extra == "dev-full"
|
|
128
|
+
Requires-Dist: flake8-pyproject<2.0,>=1.2; extra == "dev-full"
|
|
129
|
+
Requires-Dist: vulture<3,>=2; extra == "dev-full"
|
|
130
|
+
Requires-Dist: matplotlib<4.0,>=3.7; extra == "dev-full"
|
|
131
|
+
Requires-Dist: jax<1.0,>=0.4; extra == "dev-full"
|
|
132
|
+
Requires-Dist: mypy<2.0,>=1.8; extra == "dev-full"
|
|
133
|
+
Requires-Dist: pyright<1.2.0,>=1.1.350; extra == "dev-full"
|
|
134
|
+
Requires-Dist: networkx-stubs>=0.0.1; extra == "dev-full"
|
|
135
|
+
Requires-Dist: types-cachetools>=6.0.0.0; extra == "dev-full"
|
|
136
|
+
Provides-Extra: release
|
|
137
|
+
Requires-Dist: python-semantic-release<11,>=10.4; extra == "release"
|
|
138
|
+
Requires-Dist: setuptools-scm<10,>=8; extra == "release"
|
|
139
|
+
Requires-Dist: build<2,>=1; extra == "release"
|
|
140
|
+
Requires-Dist: towncrier<26,>=23; extra == "release"
|
|
141
|
+
Dynamic: license-file
|
|
142
|
+
|
|
143
|
+
# TNFR Python Engine
|
|
144
|
+
|
|
145
|
+
<div align="center">
|
|
146
|
+
|
|
147
|
+
**Model reality as resonant patterns, not isolated objects**
|
|
148
|
+
|
|
149
|
+
[](https://pypi.org/project/tnfr/)
|
|
150
|
+
[](https://pypi.org/project/tnfr/)
|
|
151
|
+
[](LICENSE.md)
|
|
152
|
+
[](https://tnfr.netlify.app)
|
|
153
|
+
|
|
154
|
+
[Quick Start](#-quick-start) • [Key Concepts](#-key-concepts) • [Documentation](#-documentation) • [Examples](#-examples) • [Contributing](#-contributing)
|
|
155
|
+
|
|
156
|
+
</div>
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## 🌟 What is TNFR?
|
|
161
|
+
|
|
162
|
+
**TNFR** (**Resonant Fractal Nature Theory** / **Teoría de la Naturaleza Fractal Resonante**) is a paradigm shift in modeling complex systems. Instead of viewing reality as isolated "things" that interact through cause-and-effect, TNFR models it as **coherent patterns that persist through resonance**.
|
|
163
|
+
|
|
164
|
+
Think of a choir: each singer maintains their unique voice while synchronizing with others to create harmony. When voices resonate, they produce stable, beautiful structures. When they clash, patterns fragment. **TNFR captures this principle mathematically and makes it operational in code.**
|
|
165
|
+
|
|
166
|
+
### 🎯 Why TNFR?
|
|
167
|
+
|
|
168
|
+
| Traditional Approach | TNFR Paradigm |
|
|
169
|
+
|---------------------|---------------|
|
|
170
|
+
| Objects exist independently | Patterns exist through resonance |
|
|
171
|
+
| Causality: A causes B | Coherence: A and B co-organize |
|
|
172
|
+
| Static snapshots | Dynamic reorganization |
|
|
173
|
+
| Domain-specific models | Trans-scale, trans-domain |
|
|
174
|
+
|
|
175
|
+
**Key Advantages:**
|
|
176
|
+
- 🔄 **Operational Fractality**: Patterns scale without losing structure
|
|
177
|
+
- 📊 **Complete Traceability**: Every reorganization is observable
|
|
178
|
+
- 🎯 **Guaranteed Reproducibility**: Same conditions → same outcomes
|
|
179
|
+
- 🌐 **Domain Neutral**: Works from quantum to social systems
|
|
180
|
+
|
|
181
|
+
### 🚀 Use Cases
|
|
182
|
+
|
|
183
|
+
- 🧬 **Biology**: Cellular networks, neuronal synchronization, protein dynamics
|
|
184
|
+
- 🌐 **Social Systems**: Information spread, community formation, opinion dynamics
|
|
185
|
+
- 🤖 **AI**: Resonant symbolic systems, emergent learning
|
|
186
|
+
- 🔬 **Network Science**: Structural coherence, pattern detection
|
|
187
|
+
- 🏗️ **Distributed Systems**: Decentralized coordination, self-organization
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## ⚡ Quick Start
|
|
192
|
+
|
|
193
|
+
### Installation
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
pip install tnfr
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Requires Python ≥ 3.9
|
|
200
|
+
|
|
201
|
+
### Your First TNFR Network (3 Lines!)
|
|
202
|
+
|
|
203
|
+
```python
|
|
204
|
+
from tnfr.sdk import TNFRNetwork
|
|
205
|
+
|
|
206
|
+
# Create, activate, and measure a network
|
|
207
|
+
network = TNFRNetwork("hello_world")
|
|
208
|
+
results = network.add_nodes(10).connect_nodes(0.3, "random").apply_sequence("basic_activation", repeat=3).measure()
|
|
209
|
+
print(results.summary())
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
🎉 **That's it!** You just created a resonant network.
|
|
213
|
+
|
|
214
|
+
**What happened?**
|
|
215
|
+
- `add_nodes(10)`: Created 10 nodes that can synchronize
|
|
216
|
+
- `connect_nodes(0.3, "random")`: Connected them (30% probability)
|
|
217
|
+
- `apply_sequence("basic_activation", repeat=3)`: Applied Emission → Coherence → Resonance (3x)
|
|
218
|
+
- `measure()`: Calculated coherence C(t), sense index Si, and structural metrics
|
|
219
|
+
|
|
220
|
+
### 🎓 Interactive Learning (5 Minutes)
|
|
221
|
+
|
|
222
|
+
```python
|
|
223
|
+
from tnfr.tutorials import hello_tnfr
|
|
224
|
+
hello_tnfr() # Guided tour of TNFR concepts
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
**Domain Examples:**
|
|
228
|
+
```python
|
|
229
|
+
from tnfr.tutorials import (
|
|
230
|
+
biological_example, # Cell communication
|
|
231
|
+
social_network_example, # Social dynamics
|
|
232
|
+
technology_example, # Distributed systems
|
|
233
|
+
adaptive_ai_example, # Learning through resonance
|
|
234
|
+
)
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
📘 **Structured Learning Path**: See our [**60-Minute Interactive Tutorial**](docs/source/getting-started/INTERACTIVE_TUTORIAL.md)
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## 💡 Key Concepts
|
|
242
|
+
|
|
243
|
+
> **New to TNFR?** 👉 [**TNFR Fundamental Concepts Guide**](docs/source/getting-started/TNFR_CONCEPTS.md) - Understand the paradigm in 10 minutes!
|
|
244
|
+
|
|
245
|
+
### The Nodal Equation
|
|
246
|
+
|
|
247
|
+
At the heart of TNFR is one elegant equation:
|
|
248
|
+
|
|
249
|
+
```
|
|
250
|
+
∂EPI/∂t = νf · ΔNFR(t)
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**What it means:**
|
|
254
|
+
- **EPI**: Primary Information Structure (the "shape" of a node)
|
|
255
|
+
- **νf**: Structural frequency (reorganization rate in Hz_str)
|
|
256
|
+
- **ΔNFR**: Internal reorganization operator (structural gradient)
|
|
257
|
+
|
|
258
|
+
*Structure changes proportionally to frequency and gradient*
|
|
259
|
+
|
|
260
|
+
### Three Essential Elements
|
|
261
|
+
|
|
262
|
+
**1. Resonant Fractal Node (NFR)**
|
|
263
|
+
- Minimum unit of structural coherence
|
|
264
|
+
- Has EPI (form), νf (frequency), φ (phase)
|
|
265
|
+
|
|
266
|
+
**2. Structural Operators** (13 canonical)
|
|
267
|
+
- **Emission/Reception**: Initiate & capture patterns
|
|
268
|
+
- **Coherence/Dissonance**: Stabilize or destabilize
|
|
269
|
+
- **Resonance**: Propagate without losing identity
|
|
270
|
+
- **Self-organization**: Create emergent structures
|
|
271
|
+
- [See all 13 operators →](GLOSSARY.md#structural-operators)
|
|
272
|
+
|
|
273
|
+
**3. Coherence Metrics**
|
|
274
|
+
- **C(t)**: Total network coherence [0,1]
|
|
275
|
+
- **Si**: Sense index (reorganization stability)
|
|
276
|
+
- **ΔNFR**: Evolution gradient
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## 📚 Documentation
|
|
281
|
+
|
|
282
|
+
### 🎯 Single Source of Truth for Mathematics
|
|
283
|
+
|
|
284
|
+
**[Mathematical Foundations of TNFR](docs/source/theory/mathematical_foundations.md)** ⭐
|
|
285
|
+
|
|
286
|
+
This is THE ONLY place where TNFR mathematics is formally defined:
|
|
287
|
+
- Hilbert space H_NFR and Banach space B_EPI
|
|
288
|
+
- Coherence operator Ĉ (spectral theory, proofs)
|
|
289
|
+
- Frequency operator Ĵ and reorganization operator ΔNFR
|
|
290
|
+
- Complete nodal equation derivation
|
|
291
|
+
- **§3.1.1**: Implementation bridge (theory → code)
|
|
292
|
+
|
|
293
|
+
### 🎯 Classical Mechanics Emergence
|
|
294
|
+
|
|
295
|
+
**TNFR reveals how observable classical physics emerges from structural coherence dynamics**:
|
|
296
|
+
|
|
297
|
+
```
|
|
298
|
+
TNFR Nodal Equation (∂EPI/∂t = νf · ΔNFR)
|
|
299
|
+
↓
|
|
300
|
+
Low-dissonance limit (ε → 0)
|
|
301
|
+
↓
|
|
302
|
+
Observable Classical Mechanics
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
**Key Emergent Phenomena**:
|
|
306
|
+
- **Mass**: `m = 1/νf` (inverse structural frequency) — mass is structural inertia
|
|
307
|
+
- **Force**: `F = -∇U(q)` (coherence potential gradient) — force is stability flow
|
|
308
|
+
- **Newton's Laws**: Natural consequences of the nodal equation at low dissonance
|
|
309
|
+
- **Action Principle**: Coherence optimization over time
|
|
310
|
+
- **Conservation Laws**: Network symmetries preserve structural quantities
|
|
311
|
+
|
|
312
|
+
**Documentation**:
|
|
313
|
+
- **[📘 N-Body Classical Mechanics Guide](docs/TNFR_CLASSICAL_NBODY.md)** — **Complete formal reference** (variable mappings, conservation laws, validation protocols, code examples)
|
|
314
|
+
- [Classical Mechanics from TNFR](docs/source/theory/07_emergence_classical_mechanics.md) — Complete derivation from nodal equation
|
|
315
|
+
- [Euler-Lagrange Correspondence](docs/source/theory/08_classical_mechanics_euler_lagrange.md) — Variational formulation
|
|
316
|
+
- [Numerical Validation](docs/source/theory/09_classical_mechanics_numerical_validation.md) — Computational verification
|
|
317
|
+
|
|
318
|
+
**Practical Examples**:
|
|
319
|
+
- `examples/domain_applications/nbody_gravitational.py` — Two-body orbits, three-body systems
|
|
320
|
+
- `examples/nbody_quantitative_validation.py` — Full validation suite (6 canonical experiments)
|
|
321
|
+
- `tests/validation/test_nbody_validation.py` — Automated test suite
|
|
322
|
+
|
|
323
|
+
This demonstrates **classical mechanics as a natural expression of coherent structural dynamics** in the observable, deterministic regime.
|
|
324
|
+
|
|
325
|
+
### 📖 Quick References
|
|
326
|
+
|
|
327
|
+
- **[GLOSSARY](GLOSSARY.md)** - Operational definitions for code use
|
|
328
|
+
- **[TNFR Concepts](docs/source/getting-started/TNFR_CONCEPTS.md)** - Paradigm introduction
|
|
329
|
+
- **[API Overview](docs/source/api/overview.md)** - Package architecture
|
|
330
|
+
- **[Operator Guide](docs/source/api/operators.md)** - Complete operator reference
|
|
331
|
+
- **[NAV Guide](docs/source/operators/NAV_GUIDE.md)** - NAV (Transition) canonical sequences, anti-patterns, and troubleshooting
|
|
332
|
+
- **[THOL Configuration Reference](docs/THOL_CONFIGURATION_REFERENCE.md)** - Comprehensive THOL parameter guide
|
|
333
|
+
|
|
334
|
+
### 🎨 Grammar System
|
|
335
|
+
|
|
336
|
+
TNFR uses a unified physics-based grammar to validate operator sequences.
|
|
337
|
+
All constraints emerge inevitably from the nodal equation and TNFR invariants.
|
|
338
|
+
|
|
339
|
+
#### Four Canonical Constraints (U1-U4)
|
|
340
|
+
|
|
341
|
+
1. **U1: STRUCTURAL INITIATION & CLOSURE**
|
|
342
|
+
- U1a: Start with generators when EPI=0
|
|
343
|
+
- U1b: End with closure operators
|
|
344
|
+
- Basis: ∂EPI/∂t undefined at EPI=0
|
|
345
|
+
|
|
346
|
+
2. **U2: CONVERGENCE & BOUNDEDNESS**
|
|
347
|
+
- If destabilizers, then include stabilizers
|
|
348
|
+
- Basis: ∫νf·ΔNFR dt must converge
|
|
349
|
+
|
|
350
|
+
3. **U3: RESONANT COUPLING**
|
|
351
|
+
- If coupling/resonance, then verify phase
|
|
352
|
+
- Basis: AGENTS.md Invariant #5
|
|
353
|
+
|
|
354
|
+
4. **U4: BIFURCATION DYNAMICS**
|
|
355
|
+
- U4a: If triggers, then include handlers
|
|
356
|
+
- U4b: If transformers, then recent destabilizer
|
|
357
|
+
- Basis: Contract OZ + bifurcation theory
|
|
358
|
+
|
|
359
|
+
**For complete derivations:** See [UNIFIED_GRAMMAR_RULES.md](UNIFIED_GRAMMAR_RULES.md)
|
|
360
|
+
|
|
361
|
+
**For implementation:** See `src/tnfr/operators/grammar.py`
|
|
362
|
+
|
|
363
|
+
#### Quick Start
|
|
364
|
+
|
|
365
|
+
```python
|
|
366
|
+
from tnfr.operators.grammar import validate_grammar
|
|
367
|
+
from tnfr.operators.definitions import Emission, Coherence, Silence
|
|
368
|
+
|
|
369
|
+
sequence = [Emission(), Coherence(), Silence()]
|
|
370
|
+
is_valid = validate_grammar(sequence, epi_initial=0.0)
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
#### Migration from Old Grammar Systems
|
|
374
|
+
|
|
375
|
+
If you're using the old C1-C3 or RC1-RC4 systems:
|
|
376
|
+
|
|
377
|
+
- **Old:** `from tnfr.operators.grammar import validate_sequence`
|
|
378
|
+
- **New:** `from tnfr.operators.grammar import validate_grammar`
|
|
379
|
+
|
|
380
|
+
See migration guide in [GRAMMAR_MIGRATION_GUIDE.md](GRAMMAR_MIGRATION_GUIDE.md)
|
|
381
|
+
|
|
382
|
+
### 🧪 Advanced Topics
|
|
383
|
+
|
|
384
|
+
- [ARCHITECTURE.md](ARCHITECTURE.md) - System design & invariants
|
|
385
|
+
- [Backend System](docs/backends.md) - NumPy/JAX/Torch backends
|
|
386
|
+
- [TESTING.md](TESTING.md) - Test strategy & validation
|
|
387
|
+
- [SECURITY.md](SECURITY.md) - Security practices
|
|
388
|
+
- [CONTRIBUTING.md](CONTRIBUTING.md) - Development workflow
|
|
389
|
+
|
|
390
|
+
---
|
|
391
|
+
|
|
392
|
+
## 🔬 Examples
|
|
393
|
+
|
|
394
|
+
### Hello World
|
|
395
|
+
|
|
396
|
+
```python
|
|
397
|
+
# examples/hello_world.py
|
|
398
|
+
from tnfr.sdk import TNFRNetwork
|
|
399
|
+
|
|
400
|
+
network = TNFRNetwork("simple_demo")
|
|
401
|
+
results = (network
|
|
402
|
+
.add_nodes(5)
|
|
403
|
+
.connect_nodes(0.5, "random")
|
|
404
|
+
.apply_sequence("basic_activation")
|
|
405
|
+
.measure())
|
|
406
|
+
|
|
407
|
+
print(f"Coherence: {results.coherence:.3f}")
|
|
408
|
+
print(f"Sense Index: {results.sense_index:.3f}")
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
### Biological Network
|
|
412
|
+
|
|
413
|
+
```python
|
|
414
|
+
# examples/biological_network.py
|
|
415
|
+
from tnfr.sdk import TNFRNetwork
|
|
416
|
+
|
|
417
|
+
# Model cellular communication
|
|
418
|
+
cells = TNFRNetwork("cell_network")
|
|
419
|
+
results = (cells
|
|
420
|
+
.add_nodes(20, epi_range=(0.8, 1.2)) # Biological variation
|
|
421
|
+
.connect_nodes(0.3, "scale_free") # Power-law connectivity
|
|
422
|
+
.apply_sequence("therapeutic", repeat=5) # Healing pattern
|
|
423
|
+
.measure())
|
|
424
|
+
|
|
425
|
+
print(f"Network health: {results.coherence:.2%}")
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
### More Examples
|
|
429
|
+
|
|
430
|
+
- [Dynamic Limits](examples/dynamic_limits_demo.py) - Adaptive thresholds
|
|
431
|
+
- [Multiscale Networks](examples/multiscale_network_demo.py) - Hierarchical structures
|
|
432
|
+
- [Regenerative Cycles](examples/regenerative_cycles.py) - Self-sustaining patterns
|
|
433
|
+
- [Performance Comparison](examples/backend_performance_comparison.py) - Backend benchmarks
|
|
434
|
+
|
|
435
|
+
📂 **Full Collection**: [examples/](examples/) directory
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
## 🛠️ Development
|
|
440
|
+
|
|
441
|
+
### Local Setup
|
|
442
|
+
|
|
443
|
+
```bash
|
|
444
|
+
# Clone repository
|
|
445
|
+
git clone https://github.com/fermga/TNFR-Python-Engine.git
|
|
446
|
+
cd TNFR-Python-Engine
|
|
447
|
+
|
|
448
|
+
# Install with development dependencies
|
|
449
|
+
pip install -e ".[dev,docs]"
|
|
450
|
+
|
|
451
|
+
# Run tests
|
|
452
|
+
./scripts/run_tests.sh
|
|
453
|
+
|
|
454
|
+
# Format code
|
|
455
|
+
./scripts/format.sh
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
### Documentation Build
|
|
459
|
+
|
|
460
|
+
```bash
|
|
461
|
+
# Install docs dependencies
|
|
462
|
+
pip install -r docs/requirements.txt
|
|
463
|
+
|
|
464
|
+
# Build documentation
|
|
465
|
+
make docs
|
|
466
|
+
|
|
467
|
+
# View locally
|
|
468
|
+
open docs/_build/html/index.html
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
### Configuration & Secrets
|
|
472
|
+
|
|
473
|
+
```bash
|
|
474
|
+
# Copy environment template
|
|
475
|
+
cp .env.example .env
|
|
476
|
+
|
|
477
|
+
# Edit .env with your credentials (never commit this file!)
|
|
478
|
+
# Load with:
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
```python
|
|
482
|
+
from tnfr.secure_config import load_redis_config, get_cache_secret
|
|
483
|
+
redis_config = load_redis_config()
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
See [SECURITY.md](SECURITY.md) for best practices.
|
|
487
|
+
|
|
488
|
+
---
|
|
489
|
+
|
|
490
|
+
## 🤝 Contributing
|
|
491
|
+
|
|
492
|
+
We welcome contributions! Here's how to get started:
|
|
493
|
+
|
|
494
|
+
1. **Understand TNFR**: Read [Mathematical Foundations](docs/source/theory/mathematical_foundations.md)
|
|
495
|
+
2. **Check Invariants**: Follow [AGENTS.md](AGENTS.md) rules
|
|
496
|
+
3. **Write Tests**: Cover all invariants (see [TESTING.md](TESTING.md))
|
|
497
|
+
4. **Run QA**: Execute `./scripts/run_tests.sh`
|
|
498
|
+
5. **Submit PR**: See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines
|
|
499
|
+
|
|
500
|
+
**Key Principles:**
|
|
501
|
+
- ✅ Preserve canonical invariants
|
|
502
|
+
- ✅ Use structural operators only
|
|
503
|
+
- ✅ Document with references to Mathematical Foundations
|
|
504
|
+
- ✅ Test spectral properties
|
|
505
|
+
|
|
506
|
+
---
|
|
507
|
+
|
|
508
|
+
## 📊 CLI Tools
|
|
509
|
+
|
|
510
|
+
### Profiling Pipeline
|
|
511
|
+
|
|
512
|
+
```bash
|
|
513
|
+
tnfr profile-pipeline \
|
|
514
|
+
--nodes 120 --edge-probability 0.28 --loops 3 \
|
|
515
|
+
--si-chunk-sizes auto 48 --dnfr-chunk-sizes auto \
|
|
516
|
+
--output-dir profiles/pipeline
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
Generates `.pstats` and JSON summaries for performance analysis.
|
|
520
|
+
|
|
521
|
+
---
|
|
522
|
+
|
|
523
|
+
## 📖 Learning Path
|
|
524
|
+
|
|
525
|
+
**Recommended Progression:**
|
|
526
|
+
|
|
527
|
+
1. **Newcomers** (10 min)
|
|
528
|
+
- Read [TNFR Concepts](docs/source/getting-started/TNFR_CONCEPTS.md)
|
|
529
|
+
- Run `hello_tnfr()` tutorial
|
|
530
|
+
|
|
531
|
+
2. **Beginners** (30 min)
|
|
532
|
+
- Try [examples/hello_world.py](examples/hello_world.py)
|
|
533
|
+
- Explore domain examples (biological, social, AI)
|
|
534
|
+
|
|
535
|
+
3. **Intermediate** (2 hours)
|
|
536
|
+
- Study [Mathematical Foundations §1-3](docs/source/theory/mathematical_foundations.md)
|
|
537
|
+
- Read [GLOSSARY](GLOSSARY.md)
|
|
538
|
+
- Practice with [Interactive Tutorial](docs/source/getting-started/INTERACTIVE_TUTORIAL.md)
|
|
539
|
+
|
|
540
|
+
4. **Advanced** (ongoing)
|
|
541
|
+
- Deep dive: [Mathematical Foundations (complete)](docs/source/theory/mathematical_foundations.md)
|
|
542
|
+
- Architecture: [ARCHITECTURE.md](ARCHITECTURE.md)
|
|
543
|
+
- Contribute: [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
544
|
+
|
|
545
|
+
---
|
|
546
|
+
|
|
547
|
+
## 📜 License
|
|
548
|
+
|
|
549
|
+
Released under the [MIT License](LICENSE.md).
|
|
550
|
+
|
|
551
|
+
**Citation**: When publishing research or applications based on TNFR, please cite:
|
|
552
|
+
- This repository: `fermga/TNFR-Python-Engine`
|
|
553
|
+
- Theoretical foundations: [TNFR.pdf](TNFR.pdf)
|
|
554
|
+
- Mathematical formalization: [Mathematical Foundations](docs/source/theory/mathematical_foundations.md)
|
|
555
|
+
|
|
556
|
+
---
|
|
557
|
+
|
|
558
|
+
## 🔗 Links
|
|
559
|
+
|
|
560
|
+
- **Documentation**: https://tnfr.netlify.app
|
|
561
|
+
- **PyPI Package**: https://pypi.org/project/tnfr/
|
|
562
|
+
- **GitHub**: https://github.com/fermga/TNFR-Python-Engine
|
|
563
|
+
- **Issues**: https://github.com/fermga/TNFR-Python-Engine/issues
|
|
564
|
+
|
|
565
|
+
---
|
|
566
|
+
|
|
567
|
+
<div align="center">
|
|
568
|
+
|
|
569
|
+
**Made with ❤️ for researchers, developers, and explorers of complex systems**
|
|
570
|
+
|
|
571
|
+
*Reality is not made of things—it's made of resonance*
|
|
572
|
+
|
|
573
|
+
</div>
|