holoscript 5.1.0__tar.gz → 5.3.0__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-5.1.0 → holoscript-5.3.0}/.gitignore +4 -0
- {holoscript-5.1.0 → holoscript-5.3.0}/PKG-INFO +2 -2
- {holoscript-5.1.0 → holoscript-5.3.0}/holoscript/__init__.py +1 -1
- {holoscript-5.1.0 → holoscript-5.3.0}/holoscript/parser.py +3 -1
- {holoscript-5.1.0 → holoscript-5.3.0}/pyproject.toml +2 -2
- holoscript-5.3.0/tests/test_pipeline_e2e.py +89 -0
- {holoscript-5.1.0 → holoscript-5.3.0}/README.md +0 -0
- {holoscript-5.1.0 → holoscript-5.3.0}/examples/holoscript_tutorial.ipynb +0 -0
- {holoscript-5.1.0 → holoscript-5.3.0}/holoscript/client.py +0 -0
- {holoscript-5.1.0 → holoscript-5.3.0}/holoscript/generator.py +0 -0
- {holoscript-5.1.0 → holoscript-5.3.0}/holoscript/renderer.py +0 -0
- {holoscript-5.1.0 → holoscript-5.3.0}/holoscript/robotics.py +0 -0
- {holoscript-5.1.0 → holoscript-5.3.0}/holoscript/sharer.py +0 -0
- {holoscript-5.1.0 → holoscript-5.3.0}/holoscript/traits.py +0 -0
- {holoscript-5.1.0 → holoscript-5.3.0}/holoscript/validator.py +0 -0
- {holoscript-5.1.0 → holoscript-5.3.0}/tests/__init__.py +0 -0
- {holoscript-5.1.0 → holoscript-5.3.0}/tests/conftest.py +0 -0
- {holoscript-5.1.0 → holoscript-5.3.0}/tests/test_init.py +0 -0
- {holoscript-5.1.0 → holoscript-5.3.0}/tests/test_parser.py +0 -0
- {holoscript-5.1.0 → holoscript-5.3.0}/tests/test_robotics.py +0 -0
- {holoscript-5.1.0 → holoscript-5.3.0}/tests/test_traits.py +0 -0
- {holoscript-5.1.0 → holoscript-5.3.0}/tests/test_validator.py +0 -0
|
@@ -191,6 +191,10 @@ codebase.holo
|
|
|
191
191
|
core-graph.json
|
|
192
192
|
.holo_audits/
|
|
193
193
|
|
|
194
|
+
# Daemon local runtime artifacts
|
|
195
|
+
.holoscript/.daemon-tsbuildinfo
|
|
196
|
+
tmp-daemon-run.txt
|
|
197
|
+
|
|
194
198
|
# Core debug/investigation scripts (not source)
|
|
195
199
|
packages/core/check-fork-heap.cjs
|
|
196
200
|
packages/core/check-fork.mjs
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: holoscript
|
|
3
|
-
Version: 5.
|
|
4
|
-
Summary: Python bindings for HoloScript
|
|
3
|
+
Version: 5.3.0
|
|
4
|
+
Summary: Python bindings for HoloScript - VR scene description language
|
|
5
5
|
Project-URL: Homepage, https://holoscript.net
|
|
6
6
|
Project-URL: Documentation, https://holoscript.net/python
|
|
7
7
|
Project-URL: Repository, https://github.com/brianonbased-dev/Holoscript
|
|
@@ -155,7 +155,9 @@ def parse_hsplus(code: str) -> ParseResult:
|
|
|
155
155
|
"attachable", "equippable", "consumable", "destructible", "anchor",
|
|
156
156
|
"tracked", "world_locked", "hand_tracked", "eye_tracked",
|
|
157
157
|
"spatial_audio", "ambient", "voice_activated", "state", "reactive",
|
|
158
|
-
"observable", "computed"
|
|
158
|
+
"observable", "computed",
|
|
159
|
+
# Social
|
|
160
|
+
"shareable", "collaborative", "tweetable",
|
|
159
161
|
}
|
|
160
162
|
|
|
161
163
|
for trait in traits:
|
|
@@ -4,8 +4,8 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "holoscript"
|
|
7
|
-
version = "5.
|
|
8
|
-
description = "Python bindings for HoloScript
|
|
7
|
+
version = "5.3.0"
|
|
8
|
+
description = "Python bindings for HoloScript - VR scene description language"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
11
11
|
requires-python = ">=3.8"
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"""
|
|
2
|
+
End-to-end pipeline test: parse -> validate -> generate -> share.
|
|
3
|
+
Validates the full Grok flow with social trait support.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import pytest
|
|
7
|
+
from holoscript import (
|
|
8
|
+
parse,
|
|
9
|
+
validate,
|
|
10
|
+
generate,
|
|
11
|
+
generate_scene,
|
|
12
|
+
share,
|
|
13
|
+
suggest_traits,
|
|
14
|
+
list_traits,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class TestFullPipeline:
|
|
19
|
+
"""Tests the complete generate -> validate -> share chain."""
|
|
20
|
+
|
|
21
|
+
def test_generate_validate_share(self):
|
|
22
|
+
"""Full pipeline: generate, validate, share."""
|
|
23
|
+
# 1. Generate
|
|
24
|
+
result = generate("a glowing sphere in a dark cave")
|
|
25
|
+
assert result.code
|
|
26
|
+
assert len(result.code) > 0
|
|
27
|
+
|
|
28
|
+
# 2. Validate
|
|
29
|
+
validation = validate(result.code)
|
|
30
|
+
assert validation.valid is True, f"Validation failed: {validation.errors}"
|
|
31
|
+
|
|
32
|
+
# 3. Share
|
|
33
|
+
share_result = share(result.code, title="Cave Sphere", platform="x")
|
|
34
|
+
assert share_result.playground_url
|
|
35
|
+
assert share_result.tweet_text
|
|
36
|
+
assert "Cave Sphere" in share_result.tweet_text
|
|
37
|
+
assert share_result.qr_code
|
|
38
|
+
assert share_result.card_meta
|
|
39
|
+
assert share_result.card_meta["twitter:card"] == "player"
|
|
40
|
+
|
|
41
|
+
def test_generate_scene_validate(self):
|
|
42
|
+
"""Generate a full scene and validate it."""
|
|
43
|
+
result = generate_scene("enchanted forest with glowing mushrooms")
|
|
44
|
+
assert result.code
|
|
45
|
+
assert "composition" in result.code
|
|
46
|
+
|
|
47
|
+
validation = validate(result.code)
|
|
48
|
+
assert validation.valid is True, f"Validation failed: {validation.errors}"
|
|
49
|
+
|
|
50
|
+
def test_social_trait_discoverability(self):
|
|
51
|
+
"""Social traits should be discoverable via list_traits."""
|
|
52
|
+
traits = list_traits("social")
|
|
53
|
+
assert "social" in traits
|
|
54
|
+
assert "@shareable" in traits["social"]
|
|
55
|
+
assert "@collaborative" in traits["social"]
|
|
56
|
+
assert "@tweetable" in traits["social"]
|
|
57
|
+
|
|
58
|
+
def test_social_trait_suggestion_share(self):
|
|
59
|
+
"""suggest_traits should suggest @shareable for share keywords."""
|
|
60
|
+
result = suggest_traits("share this artwork and tweet about it")
|
|
61
|
+
assert "@shareable" in result["traits"]
|
|
62
|
+
assert "@tweetable" in result["traits"]
|
|
63
|
+
|
|
64
|
+
def test_social_trait_suggestion_collaborate(self):
|
|
65
|
+
"""suggest_traits should suggest @collaborative."""
|
|
66
|
+
result = suggest_traits("collaborate on this scene together")
|
|
67
|
+
assert "@collaborative" in result["traits"]
|
|
68
|
+
|
|
69
|
+
def test_social_traits_not_flagged_as_unknown(self):
|
|
70
|
+
"""Social traits should not produce 'unknown trait' warnings."""
|
|
71
|
+
code = '''composition "Social" {
|
|
72
|
+
object "Art" @shareable @collaborative @tweetable {
|
|
73
|
+
geometry: "sphere"
|
|
74
|
+
color: "#ff0000"
|
|
75
|
+
}
|
|
76
|
+
}'''
|
|
77
|
+
validation = validate(code)
|
|
78
|
+
# Check no unknown trait warnings for social traits
|
|
79
|
+
trait_warnings = [
|
|
80
|
+
e for e in validation.errors
|
|
81
|
+
if "unknown trait" in e.message.lower()
|
|
82
|
+
and any(t in e.message for t in ["shareable", "collaborative", "tweetable"])
|
|
83
|
+
]
|
|
84
|
+
assert len(trait_warnings) == 0, f"Social traits flagged as unknown: {trait_warnings}"
|
|
85
|
+
|
|
86
|
+
def test_version_consistency(self):
|
|
87
|
+
"""Package version should be 5.3.0."""
|
|
88
|
+
import holoscript
|
|
89
|
+
assert holoscript.__version__ == "5.3.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|