Prepare repository for public release - #11
Merged
Conversation
Build: - Remove vendored CPython headers/libs (ext/Python, ~28k lines). Build against a uv-managed Python 3.11 via find_package(Python3 Development.Module) with a 3.11 version guard. TouchDesigner supplies python311 at runtime; the macOS build no longer needs a hardcoded framework path. - build.ps1 / build.sh auto-locate uv Python 3.11 (uv python find 3.11). Licensing/docs: - Add LICENSE (MIT), NOTICE (TD SDK headers, toml11, CPython), CONTRIBUTING, SECURITY. - Fix documentation drift across README/TESTING/README_gRPC/config-template (poll_event_loop, real parameter names, on_start callback, asyncio_dat_callbacks.py, correct source filenames and test paths). CI/Release: - Correct Windows artifact path (build/bin/Release/AsyncioDAT.dll) and package the macOS .plugin bundle; drop nonexistent develop trigger; wire Python 3.11; fail when artifacts are missing. - Remove validate_workflows.py (only compared artifact basenames). Code cleanup: - Remove commented-out active-instance guards and the dead prependPath(); fix Plugins.__dir__ to read the plugin_names property. Add a local TouchDesigner integration harness (run_td_tests.ps1 + td_tests/td_test_runner.py); wiring/validation deferred.
- Move the TouchDesigner project to tests/td/ (was test/) - Remove the gRPC/protobuf example (client, servicer, generated proto, modules) and the per-test venv/pyproject/uv.lock - Replace asyncio_dat_callbacks.py with a dependency-free worked example - run_td_tests.ps1 builds + copies the plugin into tests/td/Plugins/ by default (use -NoBuild to skip), so a dev just runs the script and waits for pass/fail - Repoint CMake plugin copy, run_test_toe.ps1 and docs at tests/td; document the Plugins/ folder requirement and the Custom Operator approval modal - gitignore tests/td build/local artifacts and the obsolete test/ dir
- Extract pure config/TOML parsing into src/config.{h,cpp} so it can be
tested without Python or TouchDesigner; loadConfig() now uses it
- tests/cpp: Catch2 unit tests for config parsing
- tests/python: a CPython extension that compiles the operator sources
against a fake OP_Context, exposing the bindings to a pytest suite that
exercises init/shutdown, the event loop, plugins and task scheduling
- CMakeLists: ASYNCIODAT_BUILD_TESTS option building both suites; ctest
runs Catch2 + pytest
- CI builds with tests enabled and runs ctest on Windows and macOS
- Remove redundant run_test_toe.ps1; drop internal "Tier" wording
- CMakePresets.json: `cmake --workflow --preset dev` configures, builds, and runs all unit tests in one command; `ctest --preset dev` reruns them - CMake auto-detects a uv-managed Python 3.11 (uv python find 3.11), so no -DPython3_ROOT_DIR is needed locally; explicit overrides still win (CI) - pytest runs via `uv run` when Python was auto-detected (ephemeral, no install); falls back to `python -m pytest` when Python is pinned - Remove build.bat; build.ps1/build.sh are thin preset wrappers - Add run_td_tests.sh (macOS counterpart to run_td_tests.ps1) - Update README/TESTING/CONTRIBUTING to the preset commands
- Update ext/td/include headers to the v4 C++ DAT API from TD 2025.32820 - FillDATPluginInfo: set the API version via setAPIVersion() (apiVersion is now private in v4) - NOTICE: record the SDK version being redistributed Operator, the C++ test extension, and all unit tests build and pass against v4. In-TouchDesigner load is verified in the integration step.
- actions/checkout v4 -> v6, actions/setup-python v5 -> v6, actions/upload-artifact v4 -> v7 (all Node 24 native) - Set FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 so remaining third-party JS actions (setup-cmake, action-gh-release) also run on Node 24 ahead of the 2026-06-02 cutover
Rework the in-TD integration test into two modules loaded the native TD way
(DATs under /local/modules synced to files): td_test_runner.py schedules the
suite and writes the results.json sentinel; asyncio_test.py is the suite itself,
a coroutine that awaits across real frames. The AsyncioDAT operator is passed in
from the bootstrap Execute DAT's onStart, so no module assumes where it lives.
The suite asserts deferred execution, completion order by delay, FIFO ordering,
periodic ticks, concurrency vs. serial timing, a heavier stress batch, exception
isolation, task results, cancellation, plugin async methods, and the reset-then-
staggered-set parameter pattern over many frames. Failures are reported in
results.json so the textport no longer needs manual inspection.
Drop the grpc/protobuf-era manual scripts and the separate test venv. Update
run_td_tests.{ps1,sh} to build, launch TD, poll for the sentinel, terminate TD,
and exit non-zero on failure. Refresh README/CONTRIBUTING/TESTING for the new
two-module structure and command-first workflow.
removePlugin called PyDict_DelItemString for a missing key, which sets a
KeyError and returns -1; the binding then returned False with a live exception,
so del_plugin("absent") raised SystemError ("returned a result with an exception
set") in Python. Check membership first and report the miss without poisoning
the interpreter.
getPluginNames added an extra Py_INCREF to the list PyDict_Keys already returns
as a new reference, leaking the list on every plugin_names access. Return it
as-is.
Grow the headless pytest suite from mostly-static checks into real behavioral coverage of the bindings, driven by poll_event_loop() as the headless analog of TouchDesigner frames: deferred completion only after a delay, completion order by delay, FIFO ordering at equal delay, deterministic concurrency interleaving, exception isolation (and the loop still usable afterward), cancellation, task results, non-coroutine rejection, plugin identity / reference retention, and a plugin async method mutating state over polls. An autouse fixture clears plugin state so tests are order-independent. These tests caught the plugin binding bugs fixed in the previous commit. Add Catch2 boundary cases for the TOML config parser: comments/blank lines, empty paths array, [main] without paths, empty-string path elements, the README example, mixed-type array, wrong-type callback path, and duplicate keys.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prep work to make AsyncioDAT public: de-vendor Python, real CI, unit tests, cleaner layout/ergonomics, and the TD SDK v4 bump.
Commits
find_package(Python3 Development.Module); add LICENSE/NOTICE/CONTRIBUTING/SECURITY; fix Windows/macOS artifact paths and drop the phantomdeveloptrigger; fix doc drift.tests/{cpp,python,td}; drop gRPC — move the TD project totests/td/; remove the gRPC/protobuf example + per-test venv; dependency-free callbacks example.tests/cpp, config parsing) and a pytest suite (tests/python) driven by a CPython extension that compiles the real operator sources against a fakeOP_Context(no TouchDesigner needed). Wired into CI.cmake --workflow --preset devconfigures+builds+runs all unit tests; CMake auto-detects uv Python 3.11;build.{ps1,sh}+run_td_tests.{ps1,sh}only.setAPIVersion()migration.Validation
ctest8/8 green (7 Catch2 + pytest) against v4.Still pending (next)
tests/td): the harness + docs are in place, buttest.toeneeds the one-time bootstrap Execute DAT wired in (see TESTING.md). This is also what verifies the v4 operator actually loads in TouchDesigner.