holoscript 6.0.5__tar.gz → 6.0.7__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.7/PKG-INFO +168 -0
- holoscript-6.0.7/README.md +133 -0
- {holoscript-6.0.5 → holoscript-6.0.7}/holoscript/__init__.py +53 -53
- holoscript-6.0.7/holoscript.egg-info/PKG-INFO +168 -0
- {holoscript-6.0.5 → holoscript-6.0.7}/pyproject.toml +64 -64
- holoscript-6.0.5/PKG-INFO +0 -41
- holoscript-6.0.5/README.md +0 -6
- holoscript-6.0.5/holoscript.egg-info/PKG-INFO +0 -41
- {holoscript-6.0.5 → holoscript-6.0.7}/holoscript/bridges/__init__.py +0 -0
- {holoscript-6.0.5 → holoscript-6.0.7}/holoscript/bridges/alphafold.py +0 -0
- {holoscript-6.0.5 → holoscript-6.0.7}/holoscript/bridges/medical.py +0 -0
- {holoscript-6.0.5 → holoscript-6.0.7}/holoscript/bridges/narupa.py +0 -0
- {holoscript-6.0.5 → holoscript-6.0.7}/holoscript/bridges/radio_astronomy.py +0 -0
- {holoscript-6.0.5 → holoscript-6.0.7}/holoscript/bridges/robotics.py +0 -0
- {holoscript-6.0.5 → holoscript-6.0.7}/holoscript/bridges/scientific.py +0 -0
- {holoscript-6.0.5 → holoscript-6.0.7}/holoscript.egg-info/SOURCES.txt +0 -0
- {holoscript-6.0.5 → holoscript-6.0.7}/holoscript.egg-info/dependency_links.txt +0 -0
- {holoscript-6.0.5 → holoscript-6.0.7}/holoscript.egg-info/requires.txt +0 -0
- {holoscript-6.0.5 → holoscript-6.0.7}/holoscript.egg-info/top_level.txt +0 -0
- {holoscript-6.0.5 → holoscript-6.0.7}/setup.cfg +0 -0
- {holoscript-6.0.5 → holoscript-6.0.7}/tests/test_smoke.py +0 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: holoscript
|
|
3
|
+
Version: 6.0.7
|
|
4
|
+
Summary: Python bindings for HoloScript — parsing, validation, and domain bridges for scientific computing
|
|
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
|
+
Provides-Extra: medical
|
|
23
|
+
Requires-Dist: pydicom>=2.4.0; extra == "medical"
|
|
24
|
+
Requires-Dist: numpy>=1.24.0; extra == "medical"
|
|
25
|
+
Provides-Extra: alphafold
|
|
26
|
+
Requires-Dist: requests>=2.31.0; extra == "alphafold"
|
|
27
|
+
Provides-Extra: astronomy
|
|
28
|
+
Requires-Dist: numpy>=1.24.0; extra == "astronomy"
|
|
29
|
+
Provides-Extra: robotics
|
|
30
|
+
Requires-Dist: roslibpy>=1.6.0; extra == "robotics"
|
|
31
|
+
Provides-Extra: scientific
|
|
32
|
+
Requires-Dist: numpy>=1.24.0; extra == "scientific"
|
|
33
|
+
Provides-Extra: all
|
|
34
|
+
Requires-Dist: holoscript[alphafold,astronomy,medical,robotics,scientific]; extra == "all"
|
|
35
|
+
|
|
36
|
+
# holoscript
|
|
37
|
+
|
|
38
|
+
Python bindings for [HoloScript](https://github.com/brianonbased-dev/HoloScript) — parse, validate, and bridge domain-specific scientific tools into the HoloScript spatial computing ecosystem.
|
|
39
|
+
|
|
40
|
+
The README you see on [pypi.org/project/holoscript](https://pypi.org/project/holoscript/) comes from this file in the published wheel and sdist. Bump the package version (e.g. 6.0.7) when refreshing PyPI-facing docs so the project page picks up changes after the next release.
|
|
41
|
+
|
|
42
|
+
## Install
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install holoscript
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Quick Start
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
import holoscript
|
|
52
|
+
|
|
53
|
+
# Parse a .holo composition
|
|
54
|
+
result = holoscript.parse('object Cube { position: [0, 1, 0] }')
|
|
55
|
+
print(result.success) # True
|
|
56
|
+
print(result.ast) # {"type": "composition", "source": "..."}
|
|
57
|
+
|
|
58
|
+
# Validate
|
|
59
|
+
validation = holoscript.validate('object Cube { position: [0, 1, 0] }')
|
|
60
|
+
print(validation.valid) # True
|
|
61
|
+
|
|
62
|
+
# List available traits
|
|
63
|
+
traits = holoscript.list_traits()
|
|
64
|
+
print(traits) # ["@grabbable", "@physics", "@clickable", "@color", "@position"]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Domain Bridges
|
|
68
|
+
|
|
69
|
+
HoloScript bridges Python scientific libraries into spatial computing. Install the extras you need:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
pip install holoscript[medical] # DICOM imaging
|
|
73
|
+
pip install holoscript[alphafold] # Protein structure prediction
|
|
74
|
+
pip install holoscript[astronomy] # Radio astronomy
|
|
75
|
+
pip install holoscript[robotics] # ROS2 integration
|
|
76
|
+
pip install holoscript[scientific] # Molecular docking (AutoDock)
|
|
77
|
+
pip install holoscript[all] # Everything
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Medical — DICOM Bridge
|
|
81
|
+
|
|
82
|
+
```python
|
|
83
|
+
from holoscript.bridges.medical import load_dicom_series, extract_volume
|
|
84
|
+
|
|
85
|
+
# Load a DICOM series and extract 3D volume for HoloScript visualization
|
|
86
|
+
series = load_dicom_series("/path/to/dicom/")
|
|
87
|
+
volume = extract_volume(series)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Requires: `pydicom`, `numpy`
|
|
91
|
+
|
|
92
|
+
### AlphaFold — Protein Structure
|
|
93
|
+
|
|
94
|
+
```python
|
|
95
|
+
from holoscript.bridges.alphafold import AlphaFoldBridge
|
|
96
|
+
|
|
97
|
+
bridge = AlphaFoldBridge(api_key="your_key")
|
|
98
|
+
structure = bridge.predict("MKFLILLFNILCLFPVLAADNHGVS")
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Requires: `requests`
|
|
102
|
+
|
|
103
|
+
### Astronomy — Radio Telescope Data
|
|
104
|
+
|
|
105
|
+
```python
|
|
106
|
+
from holoscript.bridges.radio_astronomy import calculate_synchrotron
|
|
107
|
+
|
|
108
|
+
flux = calculate_synchrotron({
|
|
109
|
+
"magnetic_field_gauss": 1e-4,
|
|
110
|
+
"frequency_hz": 1.4e9
|
|
111
|
+
})
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Robotics — ROS2
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
from holoscript.bridges.robotics import ROS2Bridge
|
|
118
|
+
|
|
119
|
+
bridge = ROS2Bridge("ws://localhost:9090")
|
|
120
|
+
bridge.connect()
|
|
121
|
+
bridge.publish_joint_command("/joint_states", {"position": [0, 0.5, 1.0]})
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Requires: `roslibpy`
|
|
125
|
+
|
|
126
|
+
### Scientific — Molecular Docking
|
|
127
|
+
|
|
128
|
+
```python
|
|
129
|
+
from holoscript.bridges.scientific import AutoDockBridge
|
|
130
|
+
|
|
131
|
+
bridge = AutoDockBridge()
|
|
132
|
+
results = bridge.run_docking({
|
|
133
|
+
"protein_pdb": "receptor.pdb",
|
|
134
|
+
"ligand_mol": "compound.mol"
|
|
135
|
+
})
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## MCP Server
|
|
139
|
+
|
|
140
|
+
HoloScript also runs as an MCP server with 214 tools (verify via `curl mcp.holoscript.net/health`). The Python package provides local parsing — the MCP server provides compilation, rendering, and deployment.
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# No auth needed for parsing
|
|
144
|
+
curl -X POST https://mcp.holoscript.net/api/compile \
|
|
145
|
+
-H "Content-Type: application/json" \
|
|
146
|
+
-d '{"code": "object Cube { position: [0,1,0] }", "target": "r3f"}'
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## npm Ecosystem
|
|
150
|
+
|
|
151
|
+
The full HoloScript ecosystem is on npm:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
npx create-holoscript my-app # Scaffold a project
|
|
155
|
+
npm install @holoscript/core # Core library
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Links
|
|
159
|
+
|
|
160
|
+
- [GitHub](https://github.com/brianonbased-dev/HoloScript)
|
|
161
|
+
- [MCP Server](https://mcp.holoscript.net)
|
|
162
|
+
- [Store](https://store.holoscript.net)
|
|
163
|
+
- [npm](https://www.npmjs.com/org/holoscript)
|
|
164
|
+
- [PyPI](https://pypi.org/project/holoscript/)
|
|
165
|
+
|
|
166
|
+
## License
|
|
167
|
+
|
|
168
|
+
MIT
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# holoscript
|
|
2
|
+
|
|
3
|
+
Python bindings for [HoloScript](https://github.com/brianonbased-dev/HoloScript) — parse, validate, and bridge domain-specific scientific tools into the HoloScript spatial computing ecosystem.
|
|
4
|
+
|
|
5
|
+
The README you see on [pypi.org/project/holoscript](https://pypi.org/project/holoscript/) comes from this file in the published wheel and sdist. Bump the package version (e.g. 6.0.7) when refreshing PyPI-facing docs so the project page picks up changes after the next release.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install holoscript
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
import holoscript
|
|
17
|
+
|
|
18
|
+
# Parse a .holo composition
|
|
19
|
+
result = holoscript.parse('object Cube { position: [0, 1, 0] }')
|
|
20
|
+
print(result.success) # True
|
|
21
|
+
print(result.ast) # {"type": "composition", "source": "..."}
|
|
22
|
+
|
|
23
|
+
# Validate
|
|
24
|
+
validation = holoscript.validate('object Cube { position: [0, 1, 0] }')
|
|
25
|
+
print(validation.valid) # True
|
|
26
|
+
|
|
27
|
+
# List available traits
|
|
28
|
+
traits = holoscript.list_traits()
|
|
29
|
+
print(traits) # ["@grabbable", "@physics", "@clickable", "@color", "@position"]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Domain Bridges
|
|
33
|
+
|
|
34
|
+
HoloScript bridges Python scientific libraries into spatial computing. Install the extras you need:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pip install holoscript[medical] # DICOM imaging
|
|
38
|
+
pip install holoscript[alphafold] # Protein structure prediction
|
|
39
|
+
pip install holoscript[astronomy] # Radio astronomy
|
|
40
|
+
pip install holoscript[robotics] # ROS2 integration
|
|
41
|
+
pip install holoscript[scientific] # Molecular docking (AutoDock)
|
|
42
|
+
pip install holoscript[all] # Everything
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Medical — DICOM Bridge
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
from holoscript.bridges.medical import load_dicom_series, extract_volume
|
|
49
|
+
|
|
50
|
+
# Load a DICOM series and extract 3D volume for HoloScript visualization
|
|
51
|
+
series = load_dicom_series("/path/to/dicom/")
|
|
52
|
+
volume = extract_volume(series)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Requires: `pydicom`, `numpy`
|
|
56
|
+
|
|
57
|
+
### AlphaFold — Protein Structure
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
from holoscript.bridges.alphafold import AlphaFoldBridge
|
|
61
|
+
|
|
62
|
+
bridge = AlphaFoldBridge(api_key="your_key")
|
|
63
|
+
structure = bridge.predict("MKFLILLFNILCLFPVLAADNHGVS")
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Requires: `requests`
|
|
67
|
+
|
|
68
|
+
### Astronomy — Radio Telescope Data
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
from holoscript.bridges.radio_astronomy import calculate_synchrotron
|
|
72
|
+
|
|
73
|
+
flux = calculate_synchrotron({
|
|
74
|
+
"magnetic_field_gauss": 1e-4,
|
|
75
|
+
"frequency_hz": 1.4e9
|
|
76
|
+
})
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Robotics — ROS2
|
|
80
|
+
|
|
81
|
+
```python
|
|
82
|
+
from holoscript.bridges.robotics import ROS2Bridge
|
|
83
|
+
|
|
84
|
+
bridge = ROS2Bridge("ws://localhost:9090")
|
|
85
|
+
bridge.connect()
|
|
86
|
+
bridge.publish_joint_command("/joint_states", {"position": [0, 0.5, 1.0]})
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Requires: `roslibpy`
|
|
90
|
+
|
|
91
|
+
### Scientific — Molecular Docking
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
from holoscript.bridges.scientific import AutoDockBridge
|
|
95
|
+
|
|
96
|
+
bridge = AutoDockBridge()
|
|
97
|
+
results = bridge.run_docking({
|
|
98
|
+
"protein_pdb": "receptor.pdb",
|
|
99
|
+
"ligand_mol": "compound.mol"
|
|
100
|
+
})
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## MCP Server
|
|
104
|
+
|
|
105
|
+
HoloScript also runs as an MCP server with 214 tools (verify via `curl mcp.holoscript.net/health`). The Python package provides local parsing — the MCP server provides compilation, rendering, and deployment.
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# No auth needed for parsing
|
|
109
|
+
curl -X POST https://mcp.holoscript.net/api/compile \
|
|
110
|
+
-H "Content-Type: application/json" \
|
|
111
|
+
-d '{"code": "object Cube { position: [0,1,0] }", "target": "r3f"}'
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## npm Ecosystem
|
|
115
|
+
|
|
116
|
+
The full HoloScript ecosystem is on npm:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
npx create-holoscript my-app # Scaffold a project
|
|
120
|
+
npm install @holoscript/core # Core library
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Links
|
|
124
|
+
|
|
125
|
+
- [GitHub](https://github.com/brianonbased-dev/HoloScript)
|
|
126
|
+
- [MCP Server](https://mcp.holoscript.net)
|
|
127
|
+
- [Store](https://store.holoscript.net)
|
|
128
|
+
- [npm](https://www.npmjs.com/org/holoscript)
|
|
129
|
+
- [PyPI](https://pypi.org/project/holoscript/)
|
|
130
|
+
|
|
131
|
+
## License
|
|
132
|
+
|
|
133
|
+
MIT
|
|
@@ -1,53 +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.
|
|
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
|
-
]
|
|
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.7"
|
|
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,168 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: holoscript
|
|
3
|
+
Version: 6.0.7
|
|
4
|
+
Summary: Python bindings for HoloScript — parsing, validation, and domain bridges for scientific computing
|
|
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
|
+
Provides-Extra: medical
|
|
23
|
+
Requires-Dist: pydicom>=2.4.0; extra == "medical"
|
|
24
|
+
Requires-Dist: numpy>=1.24.0; extra == "medical"
|
|
25
|
+
Provides-Extra: alphafold
|
|
26
|
+
Requires-Dist: requests>=2.31.0; extra == "alphafold"
|
|
27
|
+
Provides-Extra: astronomy
|
|
28
|
+
Requires-Dist: numpy>=1.24.0; extra == "astronomy"
|
|
29
|
+
Provides-Extra: robotics
|
|
30
|
+
Requires-Dist: roslibpy>=1.6.0; extra == "robotics"
|
|
31
|
+
Provides-Extra: scientific
|
|
32
|
+
Requires-Dist: numpy>=1.24.0; extra == "scientific"
|
|
33
|
+
Provides-Extra: all
|
|
34
|
+
Requires-Dist: holoscript[alphafold,astronomy,medical,robotics,scientific]; extra == "all"
|
|
35
|
+
|
|
36
|
+
# holoscript
|
|
37
|
+
|
|
38
|
+
Python bindings for [HoloScript](https://github.com/brianonbased-dev/HoloScript) — parse, validate, and bridge domain-specific scientific tools into the HoloScript spatial computing ecosystem.
|
|
39
|
+
|
|
40
|
+
The README you see on [pypi.org/project/holoscript](https://pypi.org/project/holoscript/) comes from this file in the published wheel and sdist. Bump the package version (e.g. 6.0.7) when refreshing PyPI-facing docs so the project page picks up changes after the next release.
|
|
41
|
+
|
|
42
|
+
## Install
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install holoscript
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Quick Start
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
import holoscript
|
|
52
|
+
|
|
53
|
+
# Parse a .holo composition
|
|
54
|
+
result = holoscript.parse('object Cube { position: [0, 1, 0] }')
|
|
55
|
+
print(result.success) # True
|
|
56
|
+
print(result.ast) # {"type": "composition", "source": "..."}
|
|
57
|
+
|
|
58
|
+
# Validate
|
|
59
|
+
validation = holoscript.validate('object Cube { position: [0, 1, 0] }')
|
|
60
|
+
print(validation.valid) # True
|
|
61
|
+
|
|
62
|
+
# List available traits
|
|
63
|
+
traits = holoscript.list_traits()
|
|
64
|
+
print(traits) # ["@grabbable", "@physics", "@clickable", "@color", "@position"]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Domain Bridges
|
|
68
|
+
|
|
69
|
+
HoloScript bridges Python scientific libraries into spatial computing. Install the extras you need:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
pip install holoscript[medical] # DICOM imaging
|
|
73
|
+
pip install holoscript[alphafold] # Protein structure prediction
|
|
74
|
+
pip install holoscript[astronomy] # Radio astronomy
|
|
75
|
+
pip install holoscript[robotics] # ROS2 integration
|
|
76
|
+
pip install holoscript[scientific] # Molecular docking (AutoDock)
|
|
77
|
+
pip install holoscript[all] # Everything
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Medical — DICOM Bridge
|
|
81
|
+
|
|
82
|
+
```python
|
|
83
|
+
from holoscript.bridges.medical import load_dicom_series, extract_volume
|
|
84
|
+
|
|
85
|
+
# Load a DICOM series and extract 3D volume for HoloScript visualization
|
|
86
|
+
series = load_dicom_series("/path/to/dicom/")
|
|
87
|
+
volume = extract_volume(series)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Requires: `pydicom`, `numpy`
|
|
91
|
+
|
|
92
|
+
### AlphaFold — Protein Structure
|
|
93
|
+
|
|
94
|
+
```python
|
|
95
|
+
from holoscript.bridges.alphafold import AlphaFoldBridge
|
|
96
|
+
|
|
97
|
+
bridge = AlphaFoldBridge(api_key="your_key")
|
|
98
|
+
structure = bridge.predict("MKFLILLFNILCLFPVLAADNHGVS")
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Requires: `requests`
|
|
102
|
+
|
|
103
|
+
### Astronomy — Radio Telescope Data
|
|
104
|
+
|
|
105
|
+
```python
|
|
106
|
+
from holoscript.bridges.radio_astronomy import calculate_synchrotron
|
|
107
|
+
|
|
108
|
+
flux = calculate_synchrotron({
|
|
109
|
+
"magnetic_field_gauss": 1e-4,
|
|
110
|
+
"frequency_hz": 1.4e9
|
|
111
|
+
})
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Robotics — ROS2
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
from holoscript.bridges.robotics import ROS2Bridge
|
|
118
|
+
|
|
119
|
+
bridge = ROS2Bridge("ws://localhost:9090")
|
|
120
|
+
bridge.connect()
|
|
121
|
+
bridge.publish_joint_command("/joint_states", {"position": [0, 0.5, 1.0]})
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Requires: `roslibpy`
|
|
125
|
+
|
|
126
|
+
### Scientific — Molecular Docking
|
|
127
|
+
|
|
128
|
+
```python
|
|
129
|
+
from holoscript.bridges.scientific import AutoDockBridge
|
|
130
|
+
|
|
131
|
+
bridge = AutoDockBridge()
|
|
132
|
+
results = bridge.run_docking({
|
|
133
|
+
"protein_pdb": "receptor.pdb",
|
|
134
|
+
"ligand_mol": "compound.mol"
|
|
135
|
+
})
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## MCP Server
|
|
139
|
+
|
|
140
|
+
HoloScript also runs as an MCP server with 214 tools (verify via `curl mcp.holoscript.net/health`). The Python package provides local parsing — the MCP server provides compilation, rendering, and deployment.
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# No auth needed for parsing
|
|
144
|
+
curl -X POST https://mcp.holoscript.net/api/compile \
|
|
145
|
+
-H "Content-Type: application/json" \
|
|
146
|
+
-d '{"code": "object Cube { position: [0,1,0] }", "target": "r3f"}'
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## npm Ecosystem
|
|
150
|
+
|
|
151
|
+
The full HoloScript ecosystem is on npm:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
npx create-holoscript my-app # Scaffold a project
|
|
155
|
+
npm install @holoscript/core # Core library
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Links
|
|
159
|
+
|
|
160
|
+
- [GitHub](https://github.com/brianonbased-dev/HoloScript)
|
|
161
|
+
- [MCP Server](https://mcp.holoscript.net)
|
|
162
|
+
- [Store](https://store.holoscript.net)
|
|
163
|
+
- [npm](https://www.npmjs.com/org/holoscript)
|
|
164
|
+
- [PyPI](https://pypi.org/project/holoscript/)
|
|
165
|
+
|
|
166
|
+
## License
|
|
167
|
+
|
|
168
|
+
MIT
|
|
@@ -1,64 +1,64 @@
|
|
|
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.
|
|
10
|
-
description = "Python bindings for HoloScript — parsing, validation, and domain bridges for scientific computing"
|
|
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
|
-
medical = [
|
|
34
|
-
"pydicom>=2.4.0",
|
|
35
|
-
"numpy>=1.24.0",
|
|
36
|
-
]
|
|
37
|
-
alphafold = [
|
|
38
|
-
"requests>=2.31.0",
|
|
39
|
-
]
|
|
40
|
-
astronomy = [
|
|
41
|
-
"numpy>=1.24.0",
|
|
42
|
-
]
|
|
43
|
-
robotics = [
|
|
44
|
-
"roslibpy>=1.6.0",
|
|
45
|
-
]
|
|
46
|
-
scientific = [
|
|
47
|
-
"numpy>=1.24.0",
|
|
48
|
-
]
|
|
49
|
-
all = [
|
|
50
|
-
"holoscript[medical,alphafold,astronomy,robotics,scientific]",
|
|
51
|
-
]
|
|
52
|
-
|
|
53
|
-
[tool.setuptools.packages.find]
|
|
54
|
-
include = ["holoscript*"]
|
|
55
|
-
|
|
56
|
-
[tool.pytest.ini_options]
|
|
57
|
-
testpaths = ["tests"]
|
|
58
|
-
python_files = ["test_*.py"]
|
|
59
|
-
|
|
60
|
-
[tool.mypy]
|
|
61
|
-
python_version = "3.8"
|
|
62
|
-
warn_return_any = true
|
|
63
|
-
warn_unused_configs = true
|
|
64
|
-
disallow_untyped_defs = true
|
|
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.7"
|
|
10
|
+
description = "Python bindings for HoloScript — parsing, validation, and domain bridges for scientific computing"
|
|
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
|
+
medical = [
|
|
34
|
+
"pydicom>=2.4.0",
|
|
35
|
+
"numpy>=1.24.0",
|
|
36
|
+
]
|
|
37
|
+
alphafold = [
|
|
38
|
+
"requests>=2.31.0",
|
|
39
|
+
]
|
|
40
|
+
astronomy = [
|
|
41
|
+
"numpy>=1.24.0",
|
|
42
|
+
]
|
|
43
|
+
robotics = [
|
|
44
|
+
"roslibpy>=1.6.0",
|
|
45
|
+
]
|
|
46
|
+
scientific = [
|
|
47
|
+
"numpy>=1.24.0",
|
|
48
|
+
]
|
|
49
|
+
all = [
|
|
50
|
+
"holoscript[medical,alphafold,astronomy,robotics,scientific]",
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
[tool.setuptools.packages.find]
|
|
54
|
+
include = ["holoscript*"]
|
|
55
|
+
|
|
56
|
+
[tool.pytest.ini_options]
|
|
57
|
+
testpaths = ["tests"]
|
|
58
|
+
python_files = ["test_*.py"]
|
|
59
|
+
|
|
60
|
+
[tool.mypy]
|
|
61
|
+
python_version = "3.8"
|
|
62
|
+
warn_return_any = true
|
|
63
|
+
warn_unused_configs = true
|
|
64
|
+
disallow_untyped_defs = true
|
holoscript-6.0.5/PKG-INFO
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: holoscript
|
|
3
|
-
Version: 6.0.5
|
|
4
|
-
Summary: Python bindings for HoloScript — parsing, validation, and domain bridges for scientific computing
|
|
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
|
-
Provides-Extra: medical
|
|
23
|
-
Requires-Dist: pydicom>=2.4.0; extra == "medical"
|
|
24
|
-
Requires-Dist: numpy>=1.24.0; extra == "medical"
|
|
25
|
-
Provides-Extra: alphafold
|
|
26
|
-
Requires-Dist: requests>=2.31.0; extra == "alphafold"
|
|
27
|
-
Provides-Extra: astronomy
|
|
28
|
-
Requires-Dist: numpy>=1.24.0; extra == "astronomy"
|
|
29
|
-
Provides-Extra: robotics
|
|
30
|
-
Requires-Dist: roslibpy>=1.6.0; extra == "robotics"
|
|
31
|
-
Provides-Extra: scientific
|
|
32
|
-
Requires-Dist: numpy>=1.24.0; extra == "scientific"
|
|
33
|
-
Provides-Extra: all
|
|
34
|
-
Requires-Dist: holoscript[alphafold,astronomy,medical,robotics,scientific]; extra == "all"
|
|
35
|
-
|
|
36
|
-
# holoscript (Python bindings)
|
|
37
|
-
|
|
38
|
-
Python bindings for core HoloScript operations.
|
|
39
|
-
|
|
40
|
-
This package keeps a local development version (`6.0.0.dev0`) in source.
|
|
41
|
-
Release versions are injected by CI from git tags (for example `v6.1.0` -> `6.1.0`).
|
holoscript-6.0.5/README.md
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: holoscript
|
|
3
|
-
Version: 6.0.5
|
|
4
|
-
Summary: Python bindings for HoloScript — parsing, validation, and domain bridges for scientific computing
|
|
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
|
-
Provides-Extra: medical
|
|
23
|
-
Requires-Dist: pydicom>=2.4.0; extra == "medical"
|
|
24
|
-
Requires-Dist: numpy>=1.24.0; extra == "medical"
|
|
25
|
-
Provides-Extra: alphafold
|
|
26
|
-
Requires-Dist: requests>=2.31.0; extra == "alphafold"
|
|
27
|
-
Provides-Extra: astronomy
|
|
28
|
-
Requires-Dist: numpy>=1.24.0; extra == "astronomy"
|
|
29
|
-
Provides-Extra: robotics
|
|
30
|
-
Requires-Dist: roslibpy>=1.6.0; extra == "robotics"
|
|
31
|
-
Provides-Extra: scientific
|
|
32
|
-
Requires-Dist: numpy>=1.24.0; extra == "scientific"
|
|
33
|
-
Provides-Extra: all
|
|
34
|
-
Requires-Dist: holoscript[alphafold,astronomy,medical,robotics,scientific]; extra == "all"
|
|
35
|
-
|
|
36
|
-
# holoscript (Python bindings)
|
|
37
|
-
|
|
38
|
-
Python bindings for core HoloScript operations.
|
|
39
|
-
|
|
40
|
-
This package keeps a local development version (`6.0.0.dev0`) in source.
|
|
41
|
-
Release versions are injected by CI from git tags (for example `v6.1.0` -> `6.1.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
|