27 Commits

Author SHA1 Message Date
903dd4eea5 docs: update README examples table and add documentation link
07_python_network and 08_python_subport now work and run as CI smoke
tests, so drop their "(pending)" markers and describe what they actually
demonstrate. Also surface the hosted documentation link at the top and
re-render README.md from README.md.in.
2026-07-04 15:07:12 +02:00
298c9e770b examples: run Python examples 07 and 08 as CTest smoke tests
Neither Python example was registered as a test, so `ctest -L examples`
in CI skipped them entirely -- which is how 08's missing Python node
went unnoticed.

Add a kpn_python_example() helper (gated on KPN_BUILD_PYTHON) that runs
each script with PYTHONPATH pointed at the freshly-built module, so it
does not depend on cwd or a hard-coded build/python path, and register
07 and 08. Also del the network in 07 for deterministic teardown.
2026-07-04 14:44:30 +02:00
2b0873b61b examples: make 08_python_subport run a real Python node
The example was named "python subport" but its graph was entirely C++
(ProduceNode -> DoubleItNode); Python only tapped the output, leaving a
dangling "#todo: return value to network".

Rewrite so the only node in the graph is a pure-Python py_triple, driven
from both ends via the subport taps: net.write() injects inputs and
net.read() pulls results back, closing the round trip. Also del the
network at the end so its callable cycle is reclaimed deterministically.
2026-07-04 14:44:24 +02:00
c4538f03ca python: fix nanobind Network reference leak via GC type slots
The Python Network holds each PyNode's callable, forming an
uncollectable instance -> callable -> globals() -> instance cycle that
tripped nanobind's leak check at interpreter shutdown.

Implement tp_traverse/tp_clear type slots on the Network binding so
Python's cyclic collector can see through the C++-held callables and
break the cycle. PyNode exposes its callable; PyNetwork visits and
clears them. Wired into both binding sites (auto_bind and the legacy
register_py_network).
2026-07-04 14:43:47 +02:00
949c8134ef Ignore build_test/ (out-of-tree test build dir)
All checks were successful
🚦 CI / changes (push) Successful in 3s
🚦 CI / docker (push) Has been skipped
🚦 CI / test (push) Has been skipped
🚦 CI / docs (push) Has been skipped
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 11:02:54 +02:00
19f5a2b0ae Deliver EOF sentinels out-of-band to prevent teardown deadlock
Some checks failed
🚦 CI / changes (push) Successful in 18s
🚦 CI / docker (push) Has been skipped
🚦 CI / docs (push) Has been cancelled
🚦 CI / test (push) Has been cancelled
Channel::push() drops values on overflow (the intended backpressure
policy for data), and PoolNode swallows the resulting ChannelOverflowError.
For a control sentinel like EOF this is fatal: a single dropped EOF under
backpressure wedges every downstream pop() forever, so the pipeline never
tears down.

Deliver sentinels out-of-band instead. Channel::push_sentinel() stores the
token in a dedicated slot that does not consume ring capacity, so it can
never overflow and — crucially — never blocks the caller. That non-blocking
property is essential: each KPN node has a single worker thread, so a
*blocking* push would park that thread and stop it draining its own input,
cascading into a hold-and-wait deadlock under backpressure. The consumer's
pop()/try_pop_now() drain the ring first, then deliver the sentinel, so it
always arrives after every value pushed before it.

approx_size() (which node readiness checks call) counts a pending sentinel
as consumable work, so a channel carrying only a sentinel still schedules
its consumer's next fire — without this the token would sit undelivered and
the pipeline would still deadlock at teardown.

PoolNode/PoolObjectNode route values carrying an eof flag (direct .eof or
nested .source.eof) through push_sentinel via a SFINAE-safe is_sentinel_value
trait; all other values keep the existing lossy throwing push. The trait
compiles to false for types without an eof convention, so this is a no-op
for pipelines that don't use one.

Verified end-to-end: scene_analyze now reaches EOF, flushes its output, and
exits cleanly instead of hanging.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 00:30:40 +02:00
a4de64ea04 Add liscence and prepare for OSS release
All checks were successful
🚦 CI / changes (push) Successful in 39s
🚦 CI / docker (push) Has been skipped
🚦 CI / test (push) Has been skipped
🚦 CI / docs (push) Successful in 7s
2026-06-28 12:05:56 +02:00
7c6a8be2b7 ci: provoke pipeline (touch Dockerfile + code)
All checks were successful
🚦 CI / changes (push) Successful in 32s
🚦 CI / docker (push) Successful in 1m0s
🚦 CI / test (push) Successful in 4m47s
🚦 CI / docs (push) Successful in 13s
Trivial comment changes to exercise the new CI orchestration: the
docker job should rebuild+push the builder image first, then test
and docs run against the fresh image.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 09:46:35 +02:00
4c0f1f6923 fix CI
All checks were successful
🚦 CI / changes (push) Successful in 33s
🚦 CI / docker (push) Has been skipped
🚦 CI / test (push) Has been skipped
🚦 CI / docs (push) Has been skipped
2026-06-20 09:38:26 +02:00
6b52526e44 Auto-build docker when docker file changes.
Some checks failed
🚦 CI / changes (push) Failing after 5s
🚦 CI / docker (push) Has been skipped
🚦 CI / test (push) Has been skipped
🚦 CI / docs (push) Has been skipped
2026-06-20 09:16:27 +02:00
7cb92a4091 Build docs with a pre-configured docker
All checks were successful
🧪 Test / test (push) Successful in 4m41s
2026-06-20 08:55:48 +02:00
20668d6955 Fix docker image
All checks were successful
🧪 Test / test (push) Successful in 7m31s
2026-06-19 22:29:46 +02:00
6f384dc4b5 Added callbacks for node errors and fifo overflow
Some checks failed
📚 Docs / deploy (push) Failing after 7s
🧪 Test / test (push) Has been cancelled
Add new doc system which should/might deploy to pages.
2026-06-19 22:26:39 +02:00
79916f1da1 Set node names in make_network for user and fanout nodes
All checks were successful
🧪 Test / test (push) Successful in 6m22s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 15:20:50 +02:00
f6bcaa15b0 Performance improvements, better readme and complete python bindings
Some checks failed
🧪 Test / test (push) Failing after 28m30s
2026-05-12 21:23:33 +02:00
c39db82763 Add a per node error handler possibility
All checks were successful
🧪 Test / test (push) Successful in 6m7s
2026-05-10 19:51:23 +02:00
1e9ba5ee66 Add a unified observability interface for applications with multiple networks
All checks were successful
🧪 Test / test (push) Successful in 6m9s
2026-05-10 19:08:40 +02:00
278c122e8f Add shared reasource tag to allow coordination of usage
All checks were successful
🧪 Test / test (push) Successful in 6m8s
2026-05-09 15:22:27 +02:00
9acc42b2e9 Fix fanout naming for debug graph
Some checks failed
🧪 Test / test (push) Failing after 2m38s
2026-05-09 09:54:40 +02:00
da8f4d9926 Add debug graph to static network 2026-05-09 08:59:19 +02:00
011b5eb35f fix web debuginterface 2026-05-09 08:40:06 +02:00
9ce581b5ce Fixed bug when generating identical fanouts 2026-05-09 08:36:51 +02:00
2bca2a7554 Add static network
All checks were successful
🧪 Test / test (push) Successful in 6m4s
2026-05-08 20:00:15 +02:00
3c683c821d Add more exmaples and fix CI
All checks were successful
🧪 Test / test (push) Successful in 5m59s
2026-05-08 18:28:12 +02:00
127ffb3849 Fix CI
Some checks failed
🧪 Test / test (push) Successful in 6m47s
🐳 Build Builder Image / build-and-push (push) Failing after 1s
2026-05-08 18:09:13 +02:00
2a5c0a0b4d Add build infra
Some checks failed
🧪 Test / test (push) Failing after 1s
🐳 Build Builder Image / build-and-push (push) Failing after 1s
2026-05-08 18:00:03 +02:00
5e77dc836b First attempt 2026-05-08 17:48:16 +02:00