From 52da3608042539e115228c39dbd40960158a0867 Mon Sep 17 00:00:00 2001 From: matei jordache Date: Sun, 29 Mar 2026 22:51:58 -0700 Subject: [PATCH] rename to tono --- GWYDDION_FEATURE_GAP.md | 6 +++--- README.md | 20 +++++++++---------- backend/data_types.py | 2 +- backend/execution.py | 2 +- backend/execution_context.py | 4 ++-- backend/main.py | 6 +++--- backend/node_registry.py | 2 +- backend/nodes/helpers.py | 2 +- backend/nodes/save.py | 4 ++-- backend/plugin_loader.py | 8 ++++---- backend/runtime_paths.py | 12 +++++------ backend/server.py | 4 ++-- desktop.py | 6 +++--- .../lcov-report/nodeClipboard.js.html | 4 ++-- frontend/index.html | 2 +- frontend/package-lock.json | 4 ++-- frontend/package.json | 2 +- frontend/src/App.jsx | 6 +++--- frontend/src/CustomNode.jsx | 2 +- frontend/src/SurfaceView.jsx | 6 +++--- frontend/src/api.js | 10 +++++----- frontend/src/nodeClipboard.js | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- plugins/example_normalize.py | 4 ++-- pyproject.toml | 2 +- resources/argonode.svg | 4 ++-- scripts/build-linux.sh | 6 +++--- scripts/build-mac.sh | 12 +++++------ scripts/build-windows.ps1 | 4 ++-- tests/node_tests/save.py | 2 +- tests/test_session_runtime.py | 4 ++-- tests/test_workflow_save.py | 2 +- 33 files changed, 82 insertions(+), 82 deletions(-) diff --git a/GWYDDION_FEATURE_GAP.md b/GWYDDION_FEATURE_GAP.md index 5b266f2..6b787fa 100644 --- a/GWYDDION_FEATURE_GAP.md +++ b/GWYDDION_FEATURE_GAP.md @@ -1,4 +1,4 @@ -# Gwyddion Features Not Yet in argonode +# Gwyddion Features Not Yet in tono Reference for future implementation. Grouped by value to typical SPM workflows. @@ -61,11 +61,11 @@ Reference for future implementation. Grouped by value to typical SPM workflows. --- -## Already Implemented in argonode +## Already Implemented in tono For reference, these Gwyddion equivalents are already covered: -| argonode Node | Category | Gwyddion Equivalent | +| tono Node | Category | Gwyddion Equivalent | |--------------|----------|-------------------| | Load Image / Load SPM File | io | File import (gwy, sxm, ibw) | | Save Image | io | File export | diff --git a/README.md b/README.md index e72148d..47203af 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# argonode +# tono -argonode is a node-based image analysis application with: +tono is a node-based image analysis application with: - a Python backend built on `aiohttp` - a React + Vite frontend @@ -11,7 +11,7 @@ The backend serves node definitions, runs workflows, manages file I/O, and strea ## Project Layout ```text -argonode/ +tono/ backend/ Python server, execution engine, nodes frontend/ React/Vite app tests/ Python tests @@ -86,7 +86,7 @@ Notes: - The frontend dev server proxies API and WebSocket requests to the backend. - `npm run dev` now clears Vite's local cache and stale Python bytecode first, then starts Vite with `--force`. -- If you open the backend directly in a browser instead of the Vite dev server, argonode now refreshes `frontend/dist` automatically when checked-out frontend sources are newer, such as after a `git pull`. +- If you open the backend directly in a browser instead of the Vite dev server, tono now refreshes `frontend/dist` automatically when checked-out frontend sources are newer, such as after a `git pull`. - If you want the frontend accessible from other devices on your LAN, run: ```powershell @@ -131,13 +131,13 @@ powershell -ExecutionPolicy Bypass -File scripts\build-desktop.ps1 The packaged app is written to: ```text -desktop-dist/argonode/ +desktop-dist/tono/ ``` Main executable: ```text -desktop-dist/argonode/argonode.exe +desktop-dist/tono/tono.exe ``` ### One-File Build @@ -157,20 +157,20 @@ During normal source-based development, input/output folders live under the repo In the packaged desktop app, writable data is stored under: ```text -%LOCALAPPDATA%\argonode\ +%LOCALAPPDATA%\tono\ ``` Specifically: ```text -%LOCALAPPDATA%\argonode\input -%LOCALAPPDATA%\argonode\output +%LOCALAPPDATA%\tono\input +%LOCALAPPDATA%\tono\output ``` You can override the packaged app data directory with: ```powershell -$env:ARGONODE_APPDATA="C:\path\to\custom\data" +$env:TONO_APPDATA="C:\path\to\custom\data" ``` ## Useful Commands diff --git a/backend/data_types.py b/backend/data_types.py index b06152d..4d2bb6e 100644 --- a/backend/data_types.py +++ b/backend/data_types.py @@ -1,5 +1,5 @@ """ -Core data types for argonode. +Core data types for tono. DataField mirrors Gwyddion's GwyDataField structure: xres, yres – pixel dimensions diff --git a/backend/execution.py b/backend/execution.py index 5be496c..5858da8 100644 --- a/backend/execution.py +++ b/backend/execution.py @@ -1,5 +1,5 @@ """ -Graph execution engine for argonode. +Graph execution engine for tono. Prompt format (same as ComfyUI): { diff --git a/backend/execution_context.py b/backend/execution_context.py index 5a5a287..40020cb 100644 --- a/backend/execution_context.py +++ b/backend/execution_context.py @@ -8,10 +8,10 @@ from typing import Any, Callable Callback = Callable[[str, Any], None] _callbacks_var: ContextVar[dict[str, Callback | None]] = ContextVar( - "argonode_execution_callbacks", + "tono_execution_callbacks", default={}, ) -_node_id_var: ContextVar[str | None] = ContextVar("argonode_execution_node_id", default=None) +_node_id_var: ContextVar[str | None] = ContextVar("tono_execution_node_id", default=None) _LEGACY_CALLBACK_ATTRS = { "preview": "_broadcast_fn", diff --git a/backend/main.py b/backend/main.py index ad8bc28..14b2dd2 100644 --- a/backend/main.py +++ b/backend/main.py @@ -1,11 +1,11 @@ """ -Entry point for argonode. +Entry point for tono. Run with: python -m backend.main or simply: python backend/main.py -from the argonode/ directory. +from the tono/ directory. """ import asyncio @@ -36,7 +36,7 @@ def main() -> None: app = create_app(loop) log.info("=" * 60) - log.info(" argonode — Node-based image analysis") + log.info(" tono — Node-based image analysis") log.info(" Open your browser at http://%s:%d", HOST, PORT) log.info("=" * 60) diff --git a/backend/node_registry.py b/backend/node_registry.py index 8455ecf..c6d5a8e 100644 --- a/backend/node_registry.py +++ b/backend/node_registry.py @@ -1,5 +1,5 @@ """ -Node registry for argonode. +Node registry for tono. Nodes are plain Python classes decorated with @register_node. NODE_CLASS_MAPPINGS is the single source of truth consumed by diff --git a/backend/nodes/helpers.py b/backend/nodes/helpers.py index 6b05dee..45548c8 100644 --- a/backend/nodes/helpers.py +++ b/backend/nodes/helpers.py @@ -1,5 +1,5 @@ """ -Shared helper functions for argonode nodes. +Shared helper functions for tono nodes. """ from __future__ import annotations diff --git a/backend/nodes/save.py b/backend/nodes/save.py index be13b14..1c306fd 100644 --- a/backend/nodes/save.py +++ b/backend/nodes/save.py @@ -251,7 +251,7 @@ class Save: length = float(np.linalg.norm(n)) return n / length if length > 0 else np.array([0.0, 1.0, 0.0], dtype=np.float32) - lines = ["solid argonode"] + lines = ["solid tono"] vertices = np.asarray(mesh.vertices, dtype=np.float32) for face in np.asarray(mesh.faces, dtype=np.int32): a, b, c = vertices[int(face[0])], vertices[int(face[1])], vertices[int(face[2])] @@ -263,7 +263,7 @@ class Save: lines.append(f" vertex {c[0]} {c[1]} {c[2]}") lines.append(" endloop") lines.append(" endfacet") - lines.append("endsolid argonode") + lines.append("endsolid tono") path.write_text("\n".join(lines) + "\n", encoding="utf-8") def _send_warning(self, message: str): diff --git a/backend/plugin_loader.py b/backend/plugin_loader.py index d0958a2..fe0d6c5 100644 --- a/backend/plugin_loader.py +++ b/backend/plugin_loader.py @@ -1,5 +1,5 @@ """ -Plugin loader for argonode. +Plugin loader for tono. Scans a plugins directory for .py files and packages (directories containing __init__.py), imports each one, and lets their @register_node decorators @@ -96,17 +96,17 @@ def _import_plugin(name: str, path: Path) -> None: """ Import a single plugin file (or package ``__init__.py``) via importlib. - The module is registered under ``argonode_plugins.`` in + The module is registered under ``tono_plugins.`` in ``sys.modules``. This namespace: - avoids collisions with any PyPI package of the same name, and - makes package-style plugins (with sub-modules) work correctly, because - their relative imports resolve against the ``argonode_plugins.*`` parent. + their relative imports resolve against the ``tono_plugins.*`` parent. If the module was previously imported (e.g. on a hot-reload call after an upload), it is deleted from ``sys.modules`` first so the file is re-executed and any updated ``@register_node`` decorators take effect. """ - module_name = f"argonode_plugins.{name}" + module_name = f"tono_plugins.{name}" # Remove stale module to support hot-reload after /upload-plugin. if module_name in sys.modules: diff --git a/backend/runtime_paths.py b/backend/runtime_paths.py index 31cd5b4..1ac0817 100644 --- a/backend/runtime_paths.py +++ b/backend/runtime_paths.py @@ -4,7 +4,7 @@ import os import sys from pathlib import Path -APP_NAME = "argonode" +APP_NAME = "tono" def project_root() -> Path: @@ -29,7 +29,7 @@ def frontend_dist_dir() -> Path: def app_data_dir() -> Path: - override = os.getenv("ARGONODE_APPDATA") + override = os.getenv("TONO_APPDATA") if override: return Path(override).expanduser().resolve() @@ -71,11 +71,11 @@ def plugins_enabled(*, native: bool) -> bool: Return True when the plugin system should be active. Default behaviour: enabled on native/desktop builds, disabled for web. - Override with the ARGONODE_PLUGINS environment variable: - ARGONODE_PLUGINS=1 – force on (useful for testing plugins via main.py) - ARGONODE_PLUGINS=0 – force off (disable even on native builds) + Override with the TONO_PLUGINS environment variable: + TONO_PLUGINS=1 – force on (useful for testing plugins via main.py) + TONO_PLUGINS=0 – force off (disable even on native builds) """ - env = os.getenv("ARGONODE_PLUGINS", "").strip().lower() + env = os.getenv("TONO_PLUGINS", "").strip().lower() if env in ("1", "true", "yes"): return True if env in ("0", "false", "no"): diff --git a/backend/server.py b/backend/server.py index 31ca912..2340181 100644 --- a/backend/server.py +++ b/backend/server.py @@ -1,5 +1,5 @@ """ -aiohttp web server for argonode. +aiohttp web server for tono. Routes ------ @@ -355,7 +355,7 @@ def create_app( plugins, and notify every connected WebSocket client to refresh /nodes. Warning: uploading Python files is equivalent to remote code execution. - This endpoint is intentionally unrestricted because argonode is a + This endpoint is intentionally unrestricted because tono is a local-first application; do not expose it on a public network. """ reader = await request.multipart() diff --git a/desktop.py b/desktop.py index 1528826..fea19bd 100644 --- a/desktop.py +++ b/desktop.py @@ -15,7 +15,7 @@ from backend.runtime_paths import app_data_dir, ensure_runtime_dirs from backend.server import create_app HOST = "127.0.0.1" -WINDOW_TITLE = "argonode" +WINDOW_TITLE = "tono" class _Api: @@ -141,14 +141,14 @@ def main() -> None: server_thread = threading.Thread( target=_run_server, args=(HOST, port, ready, state), - name="argonode-server", + name="tono-server", daemon=True, ) server_thread.start() ready.wait(timeout=15.0) if "error" in state: - raise RuntimeError("argonode server failed to start") from state["error"] + raise RuntimeError("tono server failed to start") from state["error"] _wait_for_server(f"{base_url}/nodes") diff --git a/frontend/coverage/lcov-report/nodeClipboard.js.html b/frontend/coverage/lcov-report/nodeClipboard.js.html index 2ae3de9..aed2b08 100644 --- a/frontend/coverage/lcov-report/nodeClipboard.js.html +++ b/frontend/coverage/lcov-report/nodeClipboard.js.html @@ -705,8 +705,8 @@ 5x  
import { sortNodesForParentOrder } from './nodeHierarchy.js';
  
-export const NODE_CLIPBOARD_KIND = 'argonode/node-selection';
-export const NODE_CLIPBOARD_MIME = 'application/x-argonode-node-selection';
+export const NODE_CLIPBOARD_KIND = 'tono/node-selection';
+export const NODE_CLIPBOARD_MIME = 'application/x-tono-node-selection';
  
 function cloneValue(value) {
   if (value == null) return value;
diff --git a/frontend/index.html b/frontend/index.html
index 146d241..91f66fe 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -3,7 +3,7 @@
 
   
   
-  argonode — Image Analysis
+  tono — Image Analysis
 
 
   
diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 00f38f6..bee3a18 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,10 +1,10 @@ { - "name": "argonode-frontend", + "name": "tono-frontend", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "argonode-frontend", + "name": "tono-frontend", "dependencies": { "@xyflow/react": "^12.0.0", "html-to-image": "^1.11.13", diff --git a/frontend/package.json b/frontend/package.json index c644180..ea75912 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,5 +1,5 @@ { - "name": "argonode-frontend", + "name": "tono-frontend", "private": true, "type": "module", "engines": { diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 0aac854..5dd7751 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -1278,7 +1278,7 @@ function Flow() { useEffect(() => { api.setMessageHandler((msg) => { - console.log('[argonode] WS:', msg.type, msg.data?.node_id || msg.data?.node || ''); + console.log('[tono] WS:', msg.type, msg.data?.node_id || msg.data?.node || ''); switch (msg.type) { case 'execution_start': setNodes((ns) => ns.map((n) => ({ @@ -1295,7 +1295,7 @@ function Flow() { break; case 'execution_error': setStatus({ text: 'Error: ' + msg.data.message, level: 'error' }); - console.error('[argonode] execution error', msg.data); + console.error('[tono] execution error', msg.data); break; case 'preview': updateNodeData(msg.data.node_id, { previewImage: msg.data.image }); @@ -2799,7 +2799,7 @@ function Flow() {
{/* Toolbar */}
- argonode + tono