holoscript 5.3.1__tar.gz → 6.0.4__tar.gz
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.
- holoscript-6.0.4/PKG-INFO +28 -0
- holoscript-6.0.4/README.md +6 -0
- holoscript-6.0.4/holoscript/__init__.py +53 -0
- holoscript-6.0.4/holoscript.egg-info/PKG-INFO +28 -0
- holoscript-6.0.4/holoscript.egg-info/SOURCES.txt +9 -0
- holoscript-6.0.4/holoscript.egg-info/dependency_links.txt +1 -0
- holoscript-6.0.4/holoscript.egg-info/requires.txt +4 -0
- holoscript-6.0.4/holoscript.egg-info/top_level.txt +1 -0
- holoscript-6.0.4/pyproject.toml +45 -0
- holoscript-6.0.4/setup.cfg +4 -0
- holoscript-6.0.4/tests/test_smoke.py +18 -0
- holoscript-5.3.1/.gitignore +0 -263
- holoscript-5.3.1/PKG-INFO +0 -117
- holoscript-5.3.1/README.md +0 -80
- holoscript-5.3.1/examples/holoscript_tutorial.ipynb +0 -452
- holoscript-5.3.1/holoscript/__init__.py +0 -66
- holoscript-5.3.1/holoscript/client.py +0 -266
- holoscript-5.3.1/holoscript/generator.py +0 -417
- holoscript-5.3.1/holoscript/parser.py +0 -243
- holoscript-5.3.1/holoscript/renderer.py +0 -132
- holoscript-5.3.1/holoscript/robotics.py +0 -494
- holoscript-5.3.1/holoscript/sharer.py +0 -134
- holoscript-5.3.1/holoscript/traits.py +0 -284
- holoscript-5.3.1/holoscript/validator.py +0 -244
- holoscript-5.3.1/pyproject.toml +0 -68
- holoscript-5.3.1/tests/__init__.py +0 -3
- holoscript-5.3.1/tests/conftest.py +0 -10
- holoscript-5.3.1/tests/test_init.py +0 -65
- holoscript-5.3.1/tests/test_parser.py +0 -259
- holoscript-5.3.1/tests/test_pipeline_e2e.py +0 -89
- holoscript-5.3.1/tests/test_robotics.py +0 -408
- holoscript-5.3.1/tests/test_traits.py +0 -185
- holoscript-5.3.1/tests/test_validator.py +0 -153
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: holoscript
|
|
3
|
+
Version: 6.0.4
|
|
4
|
+
Summary: Python bindings for HoloScript parsing and validation
|
|
5
|
+
Author: Brian X Base Team
|
|
6
|
+
License: MIT
|
|
7
|
+
Classifier: Development Status :: 4 - Beta
|
|
8
|
+
Classifier: Intended Audience :: Developers
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
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
|
+
Requires-Python: >=3.8
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
Provides-Extra: dev
|
|
20
|
+
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
21
|
+
Requires-Dist: mypy>=1.11.0; extra == "dev"
|
|
22
|
+
|
|
23
|
+
# holoscript (Python bindings)
|
|
24
|
+
|
|
25
|
+
Python bindings for core HoloScript operations.
|
|
26
|
+
|
|
27
|
+
This package keeps a local development version (`6.0.0.dev0`) in source.
|
|
28
|
+
Release versions are injected by CI from git tags (for example `v6.1.0` -> `6.1.0`).
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
from dataclasses import dataclass, field
|
|
2
|
+
from typing import Dict, List
|
|
3
|
+
|
|
4
|
+
# Release version injected by CI from git tag. Dev version for local use.
|
|
5
|
+
__version__ = "6.0.4"
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@dataclass
|
|
9
|
+
class ParseResult:
|
|
10
|
+
success: bool
|
|
11
|
+
ast: Dict[str, str]
|
|
12
|
+
errors: List[str] = field(default_factory=list)
|
|
13
|
+
warnings: List[str] = field(default_factory=list)
|
|
14
|
+
format: str = "holo"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@dataclass
|
|
18
|
+
class ValidationResult:
|
|
19
|
+
valid: bool
|
|
20
|
+
errors: List[str] = field(default_factory=list)
|
|
21
|
+
warnings: List[str] = field(default_factory=list)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def parse(code: str) -> ParseResult:
|
|
25
|
+
stripped = code.strip()
|
|
26
|
+
if not stripped:
|
|
27
|
+
return ParseResult(success=False, ast={}, errors=["Input is empty"])
|
|
28
|
+
|
|
29
|
+
return ParseResult(
|
|
30
|
+
success=True,
|
|
31
|
+
ast={"type": "composition", "source": stripped},
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def validate(code: str) -> ValidationResult:
|
|
36
|
+
if not code.strip():
|
|
37
|
+
return ValidationResult(valid=False, errors=["Input is empty"])
|
|
38
|
+
|
|
39
|
+
return ValidationResult(valid=True)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def list_traits() -> List[str]:
|
|
43
|
+
return ["@grabbable", "@physics", "@clickable", "@color", "@position"]
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
__all__ = [
|
|
47
|
+
"__version__",
|
|
48
|
+
"ParseResult",
|
|
49
|
+
"ValidationResult",
|
|
50
|
+
"parse",
|
|
51
|
+
"validate",
|
|
52
|
+
"list_traits",
|
|
53
|
+
]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: holoscript
|
|
3
|
+
Version: 6.0.4
|
|
4
|
+
Summary: Python bindings for HoloScript parsing and validation
|
|
5
|
+
Author: Brian X Base Team
|
|
6
|
+
License: MIT
|
|
7
|
+
Classifier: Development Status :: 4 - Beta
|
|
8
|
+
Classifier: Intended Audience :: Developers
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
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
|
+
Requires-Python: >=3.8
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
Provides-Extra: dev
|
|
20
|
+
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
21
|
+
Requires-Dist: mypy>=1.11.0; extra == "dev"
|
|
22
|
+
|
|
23
|
+
# holoscript (Python bindings)
|
|
24
|
+
|
|
25
|
+
Python bindings for core HoloScript operations.
|
|
26
|
+
|
|
27
|
+
This package keeps a local development version (`6.0.0.dev0`) in source.
|
|
28
|
+
Release versions are injected by CI from git tags (for example `v6.1.0` -> `6.1.0`).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
holoscript
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "holoscript"
|
|
7
|
+
# Local development version. Release version is derived from git tag (vX.Y.Z)
|
|
8
|
+
# by the publish-pypi.yml workflow. PyPI major tracks npm platform major.
|
|
9
|
+
version = "6.0.4"
|
|
10
|
+
description = "Python bindings for HoloScript parsing and validation"
|
|
11
|
+
readme = "README.md"
|
|
12
|
+
requires-python = ">=3.8"
|
|
13
|
+
license = { text = "MIT" }
|
|
14
|
+
authors = [{ name = "Brian X Base Team" }]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 4 - Beta",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"License :: OSI Approved :: MIT License",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
21
|
+
"Programming Language :: Python :: 3.8",
|
|
22
|
+
"Programming Language :: Python :: 3.9",
|
|
23
|
+
"Programming Language :: Python :: 3.10",
|
|
24
|
+
"Programming Language :: Python :: 3.11",
|
|
25
|
+
"Programming Language :: Python :: 3.12",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
[project.optional-dependencies]
|
|
29
|
+
dev = [
|
|
30
|
+
"pytest>=8.0.0",
|
|
31
|
+
"mypy>=1.11.0",
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
[tool.setuptools.packages.find]
|
|
35
|
+
include = ["holoscript*"]
|
|
36
|
+
|
|
37
|
+
[tool.pytest.ini_options]
|
|
38
|
+
testpaths = ["tests"]
|
|
39
|
+
python_files = ["test_*.py"]
|
|
40
|
+
|
|
41
|
+
[tool.mypy]
|
|
42
|
+
python_version = "3.8"
|
|
43
|
+
warn_return_any = true
|
|
44
|
+
warn_unused_configs = true
|
|
45
|
+
disallow_untyped_defs = true
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from holoscript import list_traits, parse, validate
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def test_parse_success() -> None:
|
|
5
|
+
result = parse('cube { @color(red) @position(0, 1, 0) @grabbable }')
|
|
6
|
+
assert result.success is True
|
|
7
|
+
assert result.ast["type"] == "composition"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def test_validate_success() -> None:
|
|
11
|
+
result = validate('cube { @grabbable }')
|
|
12
|
+
assert result.valid is True
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def test_list_traits_returns_values() -> None:
|
|
16
|
+
traits = list_traits()
|
|
17
|
+
assert len(traits) > 0
|
|
18
|
+
assert "@grabbable" in traits
|
holoscript-5.3.1/.gitignore
DELETED
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
# Dependencies
|
|
2
|
-
node_modules/
|
|
3
|
-
|
|
4
|
-
# Build output
|
|
5
|
-
dist/
|
|
6
|
-
*.tsbuildinfo
|
|
7
|
-
|
|
8
|
-
# TypeScript compiled outputs (exclude from Git, generated from .ts files)
|
|
9
|
-
*.d.ts
|
|
10
|
-
*.js
|
|
11
|
-
*.js.map
|
|
12
|
-
|
|
13
|
-
# Exception: Keep essential config files that should be committed
|
|
14
|
-
!*.config.js
|
|
15
|
-
!playwright.config.js
|
|
16
|
-
!jest.config.js
|
|
17
|
-
!rollup.config.js
|
|
18
|
-
!webpack.config.js
|
|
19
|
-
!tsup.config.js
|
|
20
|
-
!vite.config.js
|
|
21
|
-
!next.config.js
|
|
22
|
-
!tailwind.config.js
|
|
23
|
-
!postcss.config.js
|
|
24
|
-
!prettier.config.js
|
|
25
|
-
!eslint.config.js
|
|
26
|
-
|
|
27
|
-
# Exception: Keep scripts directory (committed utilities)
|
|
28
|
-
!scripts/**/*.js
|
|
29
|
-
|
|
30
|
-
# Exception: Keep package entry points in certain contexts
|
|
31
|
-
!packages/*/dist/**/*.js
|
|
32
|
-
!packages/*/dist/**/*.d.ts
|
|
33
|
-
|
|
34
|
-
# IDE
|
|
35
|
-
.idea/
|
|
36
|
-
.vscode/
|
|
37
|
-
*.swp
|
|
38
|
-
*.swo
|
|
39
|
-
|
|
40
|
-
# OS
|
|
41
|
-
.DS_Store
|
|
42
|
-
Thumbs.db
|
|
43
|
-
nul
|
|
44
|
-
|
|
45
|
-
# Environment
|
|
46
|
-
.env
|
|
47
|
-
.env.local
|
|
48
|
-
.env.*.local
|
|
49
|
-
|
|
50
|
-
# Logs
|
|
51
|
-
*.log
|
|
52
|
-
npm-debug.log*
|
|
53
|
-
pnpm-debug.log*
|
|
54
|
-
|
|
55
|
-
# Test coverage
|
|
56
|
-
coverage/
|
|
57
|
-
|
|
58
|
-
# Build artifact management
|
|
59
|
-
.build-archives/
|
|
60
|
-
.build-logs/
|
|
61
|
-
|
|
62
|
-
# AI Workspace (Proprietary Research)
|
|
63
|
-
.ai-workspace/
|
|
64
|
-
|
|
65
|
-
# Proprietary Training Data
|
|
66
|
-
*.jsonl
|
|
67
|
-
training_audit.csv
|
|
68
|
-
synthetic_*.txt
|
|
69
|
-
scripts/data/
|
|
70
|
-
scripts/*synthetic*.py
|
|
71
|
-
scripts/*train*.py
|
|
72
|
-
scripts/inference_test.py
|
|
73
|
-
scripts/debug_gen.py
|
|
74
|
-
scripts/training/
|
|
75
|
-
|
|
76
|
-
# Package manager - NOTE: lockfiles should be committed for reproducible builds
|
|
77
|
-
# pnpm-lock.yaml # KEEP for CI
|
|
78
|
-
# package-lock.json
|
|
79
|
-
# yarn.lock
|
|
80
|
-
|
|
81
|
-
# Python
|
|
82
|
-
__pycache__/
|
|
83
|
-
*.pyc
|
|
84
|
-
|
|
85
|
-
.performance-reports/
|
|
86
|
-
|
|
87
|
-
# Mutation Testing
|
|
88
|
-
.stryker-tmp/
|
|
89
|
-
.stryker-cache/
|
|
90
|
-
reports/stryker/
|
|
91
|
-
stryker.config.json
|
|
92
|
-
|
|
93
|
-
# Benchmarks
|
|
94
|
-
bench/
|
|
95
|
-
|
|
96
|
-
# Rust Build Artifacts
|
|
97
|
-
target/
|
|
98
|
-
|
|
99
|
-
# Debug & Test Output
|
|
100
|
-
test_*.txt
|
|
101
|
-
debug_*.txt
|
|
102
|
-
*_output.txt
|
|
103
|
-
*_output_*.txt
|
|
104
|
-
*_errors.txt
|
|
105
|
-
*_errors*.txt
|
|
106
|
-
*_error.txt
|
|
107
|
-
*_error_*.txt
|
|
108
|
-
ci-log.txt
|
|
109
|
-
build_log.txt
|
|
110
|
-
build_output.txt
|
|
111
|
-
compile_output.txt
|
|
112
|
-
full-run.txt
|
|
113
|
-
full-test-output.txt
|
|
114
|
-
full-test-results.txt
|
|
115
|
-
test-results.txt
|
|
116
|
-
test-out.txt
|
|
117
|
-
test-output.txt
|
|
118
|
-
call_log.txt
|
|
119
|
-
coverage-full.txt
|
|
120
|
-
coverage-output.txt
|
|
121
|
-
coverage_phase*.txt
|
|
122
|
-
err.txt
|
|
123
|
-
|
|
124
|
-
# Root debug files (anchored to root with /)
|
|
125
|
-
/debug-*.ts
|
|
126
|
-
/debug-*.js
|
|
127
|
-
/debug-*.d.ts
|
|
128
|
-
|
|
129
|
-
# Build logs at root
|
|
130
|
-
build.log
|
|
131
|
-
build-log.txt
|
|
132
|
-
build-log-utf8.txt
|
|
133
|
-
build-rust.log
|
|
134
|
-
build-rust-utf8.log
|
|
135
|
-
build-ts.log
|
|
136
|
-
build-ts-utf8.log
|
|
137
|
-
build-utf8.log
|
|
138
|
-
build-visual.log
|
|
139
|
-
build-visual-utf8.log
|
|
140
|
-
|
|
141
|
-
# VSIX binary artifacts (publish via VS Code Marketplace instead)
|
|
142
|
-
*.vsix
|
|
143
|
-
|
|
144
|
-
# Audit results (regenerated on demand)
|
|
145
|
-
audit-results/
|
|
146
|
-
|
|
147
|
-
# AI-Generated Session Reports
|
|
148
|
-
*SUMMARY*.md
|
|
149
|
-
*REPORT*.md
|
|
150
|
-
PHASE_*.md
|
|
151
|
-
RELEASE_v3.0.md
|
|
152
|
-
INFRASTRUCTURE_*.md
|
|
153
|
-
QUICK_REFERENCE_v*.md
|
|
154
|
-
SESSION_*.md
|
|
155
|
-
TEST_EXECUTION_*.md
|
|
156
|
-
VISUAL_*.md
|
|
157
|
-
|
|
158
|
-
# AI Ecosystem
|
|
159
|
-
.ai-context-stream.jsonl
|
|
160
|
-
|
|
161
|
-
# Temporary test/debug output files
|
|
162
|
-
*_result.txt
|
|
163
|
-
*_result*.txt
|
|
164
|
-
hitl_*.txt
|
|
165
|
-
hotreload_*.txt
|
|
166
|
-
mcp_v*.txt
|
|
167
|
-
ast_v*.txt
|
|
168
|
-
full_suite_result.txt
|
|
169
|
-
full_suite_*.txt
|
|
170
|
-
parser_snap_v*.txt
|
|
171
|
-
ci-debug*.txt
|
|
172
|
-
c[0-9]*_result*.txt
|
|
173
|
-
c[0-9]*_*.txt
|
|
174
|
-
snap_fail.txt
|
|
175
|
-
resilience_v*.txt
|
|
176
|
-
webrtc_v*.txt
|
|
177
|
-
tsc_output.txt
|
|
178
|
-
runtime_debug.log
|
|
179
|
-
stryker-run.log
|
|
180
|
-
stryker.log
|
|
181
|
-
|
|
182
|
-
# Temp debug/test output (various naming conventions)
|
|
183
|
-
*_test_log*.txt
|
|
184
|
-
*_test_out.txt
|
|
185
|
-
|
|
186
|
-
# Session temp files
|
|
187
|
-
temp/
|
|
188
|
-
absorb-output.txt
|
|
189
|
-
codebase-graph.json
|
|
190
|
-
codebase.holo
|
|
191
|
-
core-graph.json
|
|
192
|
-
.holo_audits/
|
|
193
|
-
|
|
194
|
-
# Daemon local runtime artifacts (entire directory is runtime state)
|
|
195
|
-
.holoscript/
|
|
196
|
-
tmp-daemon-run.txt
|
|
197
|
-
|
|
198
|
-
# Deploy artifacts (ephemeral)
|
|
199
|
-
deploy_logs.json
|
|
200
|
-
deploy_result.json
|
|
201
|
-
|
|
202
|
-
# Tauri auto-generated code
|
|
203
|
-
packages/tauri-app/src-tauri/gen/
|
|
204
|
-
|
|
205
|
-
# Build temp files (tsup generates with random hashes)
|
|
206
|
-
tsup.config.bundled_*.mjs
|
|
207
|
-
|
|
208
|
-
# Core debug/investigation scripts (not source)
|
|
209
|
-
packages/core/check-fork-heap.cjs
|
|
210
|
-
packages/core/check-fork.mjs
|
|
211
|
-
packages/core/em-results.json
|
|
212
|
-
packages/core/test_mem.mjs
|
|
213
|
-
|
|
214
|
-
# Windows device file (created by accident with git add -A on Windows)
|
|
215
|
-
nul
|
|
216
|
-
shader*.txt
|
|
217
|
-
tsc-*.txt
|
|
218
|
-
tsc*.txt
|
|
219
|
-
vitest*.txt
|
|
220
|
-
live-test-output.txt
|
|
221
|
-
full_test_log*.txt
|
|
222
|
-
|
|
223
|
-
# WASI preview shims (downloaded, not source)
|
|
224
|
-
wasi_snapshot_preview1.*.wasm
|
|
225
|
-
|
|
226
|
-
# Native addon build artifacts
|
|
227
|
-
packages/tree-sitter-holoscript/build/
|
|
228
|
-
|
|
229
|
-
# Next.js build output
|
|
230
|
-
.next/
|
|
231
|
-
|
|
232
|
-
# Studio build artifacts
|
|
233
|
-
packages/studio/.next/
|
|
234
|
-
|
|
235
|
-
# Video tutorial rendered output (large MP4 files — tracked via GitHub Releases)
|
|
236
|
-
packages/video-tutorials/out/*.mp4
|
|
237
|
-
packages/video-tutorials/out/*.webm
|
|
238
|
-
packages/video-tutorials/out/*.mov
|
|
239
|
-
packages/video-tutorials/public/narration/*.mp3
|
|
240
|
-
packages/video-tutorials/public/captures/*.webm
|
|
241
|
-
packages/video-tutorials/public/captures/*.mp4
|
|
242
|
-
.secrets/
|
|
243
|
-
|
|
244
|
-
# GitNexus (external tool artifacts — not source code)
|
|
245
|
-
.gitnexus
|
|
246
|
-
AGENTS.md
|
|
247
|
-
.claude/skills/gitnexus/
|
|
248
|
-
|
|
249
|
-
# Benchmark scripts (temporary, not part of the project)
|
|
250
|
-
benchmark-absorb.ts
|
|
251
|
-
|
|
252
|
-
# Playwright test artifacts
|
|
253
|
-
playwright-report/
|
|
254
|
-
test-results/
|
|
255
|
-
playwright-results.xml
|
|
256
|
-
|
|
257
|
-
# Studio debug/scratch files
|
|
258
|
-
packages/studio/check-canvas*.ts
|
|
259
|
-
packages/studio/knowledge.holo
|
|
260
|
-
packages/studio/final*.txt
|
|
261
|
-
packages/studio/targeted*.txt
|
|
262
|
-
packages/studio/full_final_out.txt
|
|
263
|
-
packages/studio/useshader_out.txt
|
holoscript-5.3.1/PKG-INFO
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: holoscript
|
|
3
|
-
Version: 5.3.1
|
|
4
|
-
Summary: Python bindings for HoloScript - VR scene description language
|
|
5
|
-
Project-URL: Homepage, https://holoscript.net
|
|
6
|
-
Project-URL: Documentation, https://holoscript.net/python
|
|
7
|
-
Project-URL: Repository, https://github.com/brianonbased-dev/Holoscript
|
|
8
|
-
Project-URL: Issues, https://github.com/brianonbased-dev/Holoscript/issues
|
|
9
|
-
Author-email: Brian X Base Team <team@holoscript.net>
|
|
10
|
-
License-Expression: MIT
|
|
11
|
-
Keywords: 3d,ar,gazebo,holoscript,metaverse,robotics,ros,scene-description,sdf,simulation,urdf,vr,xr
|
|
12
|
-
Classifier: Development Status :: 4 - Beta
|
|
13
|
-
Classifier: Intended Audience :: Developers
|
|
14
|
-
Classifier: Intended Audience :: Science/Research
|
|
15
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
-
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
-
Classifier: Topic :: Multimedia :: Graphics :: 3D Rendering
|
|
23
|
-
Classifier: Topic :: Scientific/Engineering
|
|
24
|
-
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
25
|
-
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
26
|
-
Requires-Python: >=3.8
|
|
27
|
-
Requires-Dist: pydantic>=2.0.0
|
|
28
|
-
Requires-Dist: requests>=2.28.0
|
|
29
|
-
Provides-Extra: dev
|
|
30
|
-
Requires-Dist: black>=23.0.0; extra == 'dev'
|
|
31
|
-
Requires-Dist: mypy>=1.0.0; extra == 'dev'
|
|
32
|
-
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
|
|
33
|
-
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
34
|
-
Provides-Extra: pyodide
|
|
35
|
-
Provides-Extra: robotics
|
|
36
|
-
Description-Content-Type: text/markdown
|
|
37
|
-
|
|
38
|
-
# HoloScript Python Bindings
|
|
39
|
-
|
|
40
|
-
Python bindings for HoloScript - parse, validate, and generate HoloScript code from Python.
|
|
41
|
-
|
|
42
|
-
## Installation
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
pip install holoscript
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Quick Start
|
|
49
|
-
|
|
50
|
-
```python
|
|
51
|
-
from holoscript import HoloScript
|
|
52
|
-
|
|
53
|
-
# Initialize
|
|
54
|
-
hs = HoloScript()
|
|
55
|
-
|
|
56
|
-
# Parse HoloScript code
|
|
57
|
-
ast = hs.parse("""
|
|
58
|
-
composition "My Scene" {
|
|
59
|
-
object "Crystal" @grabbable @glowing {
|
|
60
|
-
geometry: "sphere"
|
|
61
|
-
color: "#00ffff"
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
""")
|
|
65
|
-
|
|
66
|
-
# Validate code
|
|
67
|
-
result = hs.validate(ast)
|
|
68
|
-
if result.valid:
|
|
69
|
-
print("✅ Valid HoloScript!")
|
|
70
|
-
else:
|
|
71
|
-
for error in result.errors:
|
|
72
|
-
print(f"❌ Line {error.line}: {error.message}")
|
|
73
|
-
|
|
74
|
-
# Generate from natural language
|
|
75
|
-
scene = hs.generate("a floating island with glowing crystals")
|
|
76
|
-
print(scene.code)
|
|
77
|
-
|
|
78
|
-
# Create shareable link
|
|
79
|
-
share = hs.share(scene.code, title="My VR Scene", platform="x")
|
|
80
|
-
print(f"Playground: {share.playground_url}")
|
|
81
|
-
print(f"Tweet: {share.tweet_text}")
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## Features
|
|
85
|
-
|
|
86
|
-
- **Parsing**: Parse `.hs`, `.hsplus`, and `.holo` files
|
|
87
|
-
- **Validation**: Validate syntax with AI-friendly error messages
|
|
88
|
-
- **Generation**: Generate HoloScript from natural language
|
|
89
|
-
- **Rendering**: Generate preview images/GIFs
|
|
90
|
-
- **Sharing**: Create X-optimized shareable links
|
|
91
|
-
|
|
92
|
-
## For AI Agents (Grok, etc.)
|
|
93
|
-
|
|
94
|
-
```python
|
|
95
|
-
# Grok integration example
|
|
96
|
-
from holoscript import HoloScript
|
|
97
|
-
|
|
98
|
-
hs = HoloScript(api_key="your-api-key") # Optional for remote rendering
|
|
99
|
-
|
|
100
|
-
# Generate scene from user prompt
|
|
101
|
-
user_prompt = "Create a VR scene with a floating castle"
|
|
102
|
-
scene = hs.generate(user_prompt)
|
|
103
|
-
|
|
104
|
-
# Validate
|
|
105
|
-
if hs.validate(scene.code).valid:
|
|
106
|
-
# Create shareable preview
|
|
107
|
-
preview = hs.render(scene.code, format="gif", duration=3000)
|
|
108
|
-
share = hs.share(scene.code, title="Floating Castle", platform="x")
|
|
109
|
-
|
|
110
|
-
# Return to user
|
|
111
|
-
print(f"Here's your VR scene: {share.playground_url}")
|
|
112
|
-
print(f"Preview: {preview.url}")
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
## API Reference
|
|
116
|
-
|
|
117
|
-
See [full documentation](https://holoscript.net/python) for complete API reference.
|
holoscript-5.3.1/README.md
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
# HoloScript Python Bindings
|
|
2
|
-
|
|
3
|
-
Python bindings for HoloScript - parse, validate, and generate HoloScript code from Python.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
pip install holoscript
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Quick Start
|
|
12
|
-
|
|
13
|
-
```python
|
|
14
|
-
from holoscript import HoloScript
|
|
15
|
-
|
|
16
|
-
# Initialize
|
|
17
|
-
hs = HoloScript()
|
|
18
|
-
|
|
19
|
-
# Parse HoloScript code
|
|
20
|
-
ast = hs.parse("""
|
|
21
|
-
composition "My Scene" {
|
|
22
|
-
object "Crystal" @grabbable @glowing {
|
|
23
|
-
geometry: "sphere"
|
|
24
|
-
color: "#00ffff"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
""")
|
|
28
|
-
|
|
29
|
-
# Validate code
|
|
30
|
-
result = hs.validate(ast)
|
|
31
|
-
if result.valid:
|
|
32
|
-
print("✅ Valid HoloScript!")
|
|
33
|
-
else:
|
|
34
|
-
for error in result.errors:
|
|
35
|
-
print(f"❌ Line {error.line}: {error.message}")
|
|
36
|
-
|
|
37
|
-
# Generate from natural language
|
|
38
|
-
scene = hs.generate("a floating island with glowing crystals")
|
|
39
|
-
print(scene.code)
|
|
40
|
-
|
|
41
|
-
# Create shareable link
|
|
42
|
-
share = hs.share(scene.code, title="My VR Scene", platform="x")
|
|
43
|
-
print(f"Playground: {share.playground_url}")
|
|
44
|
-
print(f"Tweet: {share.tweet_text}")
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Features
|
|
48
|
-
|
|
49
|
-
- **Parsing**: Parse `.hs`, `.hsplus`, and `.holo` files
|
|
50
|
-
- **Validation**: Validate syntax with AI-friendly error messages
|
|
51
|
-
- **Generation**: Generate HoloScript from natural language
|
|
52
|
-
- **Rendering**: Generate preview images/GIFs
|
|
53
|
-
- **Sharing**: Create X-optimized shareable links
|
|
54
|
-
|
|
55
|
-
## For AI Agents (Grok, etc.)
|
|
56
|
-
|
|
57
|
-
```python
|
|
58
|
-
# Grok integration example
|
|
59
|
-
from holoscript import HoloScript
|
|
60
|
-
|
|
61
|
-
hs = HoloScript(api_key="your-api-key") # Optional for remote rendering
|
|
62
|
-
|
|
63
|
-
# Generate scene from user prompt
|
|
64
|
-
user_prompt = "Create a VR scene with a floating castle"
|
|
65
|
-
scene = hs.generate(user_prompt)
|
|
66
|
-
|
|
67
|
-
# Validate
|
|
68
|
-
if hs.validate(scene.code).valid:
|
|
69
|
-
# Create shareable preview
|
|
70
|
-
preview = hs.render(scene.code, format="gif", duration=3000)
|
|
71
|
-
share = hs.share(scene.code, title="Floating Castle", platform="x")
|
|
72
|
-
|
|
73
|
-
# Return to user
|
|
74
|
-
print(f"Here's your VR scene: {share.playground_url}")
|
|
75
|
-
print(f"Preview: {preview.url}")
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## API Reference
|
|
79
|
-
|
|
80
|
-
See [full documentation](https://holoscript.net/python) for complete API reference.
|