Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install Node deps
working-directory: LumenIO/clients/web
run: npm ci
- name: Run vitest
working-directory: LumenIO/clients/web
run: npm test
- name: Run playwright
working-directory: LumenIO/clients/web
run: npx playwright install --with-deps && npx playwright test
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Python deps
working-directory: LumenIO/hub
run: pip install -r requirements.txt
- name: Run pytest
working-directory: LumenIO/hub
run: pytest
40 changes: 40 additions & 0 deletions LumenIO/bootstrap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<project>
<name>LumenIO</name>
<description>Gesture-first multi-device programming interface (PC, Mobile, Projector, Standalone, Wearables).</description>
<authors>
<author role="cipher">LLM/NN Prompt Engineer</author>
<author role="forge">Mech/Electrical/Industrial Engineer</author>
</authors>
<repository>https://github.com/testingground/LumenIO</repository>
<modules>
<module>hub</module>
<module>clients</module>
<module>adapters</module>
<module>agents</module>
<module>calibration</module>
</modules>
<dependencies>
<dep>Python 3.11+</dep>
<dep>FastAPI + aiortc</dep>
<dep>OpenCV</dep>
<dep>MediaPipe/TFLite</dep>
<dep>Blender Python API</dep>
<dep>WebRTC/WebGPU/WebXR</dep>
<dep>Node 20</dep>
<dep>Vite/Vitest/Playwright</dep>
</dependencies>
<testing>
<python>pytest httpx jsonschema coverage</python>
<node>vitest playwright coverage</node>
</testing>
<ci>
<service>GitHub Actions</service>
</ci>
<handoff>
<directory>LumenIO</directory>
<file>bootstrap.xml</file>
</handoff>
<preferences>
<codex_mode>CODE_FIRST_MINIMAL</codex_mode>
</preferences>
</project>
6 changes: 6 additions & 0 deletions LumenIO/clients/web/e2e/app.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { test, expect } from '@playwright/test';

test('renders greeting', async ({ page }) => {
await page.setContent('<div id="app">Hello LumenIO</div>');
await expect(page.locator('#app')).toHaveText('Hello LumenIO');
});
11 changes: 11 additions & 0 deletions LumenIO/clients/web/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>LumenIO</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
19 changes: 19 additions & 0 deletions LumenIO/clients/web/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "lumenio-web-client",
"version": "0.1.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"test": "vitest run",
"test:e2e": "playwright test"
},
"devDependencies": {
"@playwright/test": "^1.43.0",
"vite": "^5.2.0",
"vitest": "^1.5.0"
},
"engines": {
"node": ">=20"
}
}
5 changes: 5 additions & 0 deletions LumenIO/clients/web/src/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export function greet(name) {
return `Hello ${name}`;
}

document.getElementById('app').textContent = greet('LumenIO');
8 changes: 8 additions & 0 deletions LumenIO/clients/web/test/greet.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { describe, it, expect } from 'vitest';
import { greet } from '../src/main.js';

describe('greet', () => {
it('greets by name', () => {
expect(greet('World')).toBe('Hello World');
});
});
1 change: 1 addition & 0 deletions LumenIO/hub/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Hub package."""
7 changes: 7 additions & 0 deletions LumenIO/hub/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from fastapi import FastAPI

app = FastAPI()

@app.get('/ping')
async def ping():
return {'msg': 'pong'}
4 changes: 4 additions & 0 deletions LumenIO/hub/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
fastapi
uvicorn
httpx
jsonschema
10 changes: 10 additions & 0 deletions LumenIO/hub/tests/test_ping.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import pytest
from httpx import AsyncClient
from main import app

@pytest.mark.asyncio
async def test_ping():
async with AsyncClient(app=app, base_url='http://test') as ac:
res = await ac.get('/ping')
assert res.status_code == 200
assert res.json() == {'msg': 'pong'}
9 changes: 9 additions & 0 deletions LumenIO/hub/tests/test_schema.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import json
from jsonschema import validate
from pathlib import Path

def test_gesture_schema():
schema_path = Path(__file__).resolve().parent.parent.parent / 'schemas' / 'gesture.json'
schema = json.loads(schema_path.read_text())
sample = {'type': 'wave', 'confidence': 0.9}
validate(instance=sample, schema=schema)
11 changes: 11 additions & 0 deletions LumenIO/schemas/gesture.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Gesture",
"type": "object",
"properties": {
"type": {"type": "string"},
"confidence": {"type": "number", "minimum": 0, "maximum": 1}
},
"required": ["type", "confidence"],
"additionalProperties": false
}
Loading