sysmlv2copilot 0.2.4__tar.gz → 0.2.6__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.
- {sysmlv2copilot-0.2.4/sysmlv2copilot.egg-info → sysmlv2copilot-0.2.6}/PKG-INFO +16 -2
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/PYPI_README.md +15 -1
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/pyproject.toml +1 -1
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/sysmlv2copilot/__init__.py +1 -1
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/sysmlv2copilot/cli.py +22 -35
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6/sysmlv2copilot.egg-info}/PKG-INFO +16 -2
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/CHANGELOG.md +0 -0
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/LICENSE +0 -0
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/MANIFEST.in +0 -0
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/README.md +0 -0
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/examples/README.md +0 -0
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/examples/client_sdk_basic.py +0 -0
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/examples/repair_basic.py +0 -0
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/examples/sdk_smoke_test.py +0 -0
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/setup.cfg +0 -0
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/sysmlv2copilot/__main__.py +0 -0
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/sysmlv2copilot/client.py +0 -0
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/sysmlv2copilot/convenience.py +0 -0
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/sysmlv2copilot/exceptions.py +0 -0
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/sysmlv2copilot/input_utils.py +0 -0
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/sysmlv2copilot/types.py +0 -0
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/sysmlv2copilot.egg-info/SOURCES.txt +0 -0
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/sysmlv2copilot.egg-info/dependency_links.txt +0 -0
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/sysmlv2copilot.egg-info/entry_points.txt +0 -0
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/sysmlv2copilot.egg-info/requires.txt +0 -0
- {sysmlv2copilot-0.2.4 → sysmlv2copilot-0.2.6}/sysmlv2copilot.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sysmlv2copilot
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
4
4
|
Summary: Internal Python client SDK and CLI for the SysML refinement API used by the Visual Design and Engineering Lab at Carnegie Mellon University
|
|
5
5
|
Author: Chance LaVoie
|
|
6
6
|
License-Expression: MIT
|
|
@@ -65,7 +65,21 @@ Set your API key once:
|
|
|
65
65
|
export SYSMLV2COPILOT_API_KEY=sysml_live_...
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
Or pass it directly in code
|
|
68
|
+
Or pass it directly in code:
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
from sysmlv2copilot import generate, repair
|
|
72
|
+
|
|
73
|
+
sysml = generate(
|
|
74
|
+
"Design a compact warehouse inspection drone that can hover for 15 minutes.",
|
|
75
|
+
api_key="sysml_live_...",
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
repaired = repair(
|
|
79
|
+
"broken.sysml",
|
|
80
|
+
api_key="sysml_live_...",
|
|
81
|
+
)
|
|
82
|
+
```
|
|
69
83
|
|
|
70
84
|
## Python
|
|
71
85
|
|
|
@@ -24,7 +24,21 @@ Set your API key once:
|
|
|
24
24
|
export SYSMLV2COPILOT_API_KEY=sysml_live_...
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
Or pass it directly in code
|
|
27
|
+
Or pass it directly in code:
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
from sysmlv2copilot import generate, repair
|
|
31
|
+
|
|
32
|
+
sysml = generate(
|
|
33
|
+
"Design a compact warehouse inspection drone that can hover for 15 minutes.",
|
|
34
|
+
api_key="sysml_live_...",
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
repaired = repair(
|
|
38
|
+
"broken.sysml",
|
|
39
|
+
api_key="sysml_live_...",
|
|
40
|
+
)
|
|
41
|
+
```
|
|
28
42
|
|
|
29
43
|
## Python
|
|
30
44
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "sysmlv2copilot"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.6"
|
|
8
8
|
description = "Internal Python client SDK and CLI for the SysML refinement API used by the Visual Design and Engineering Lab at Carnegie Mellon University"
|
|
9
9
|
readme = "PYPI_README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -32,6 +32,27 @@ def _add_operation_arguments(
|
|
|
32
32
|
parser.add_argument("--temperature", type=float)
|
|
33
33
|
|
|
34
34
|
|
|
35
|
+
def _normalize_legacy_argv(argv: list[str] | None) -> list[str] | None:
|
|
36
|
+
if argv is None:
|
|
37
|
+
return None
|
|
38
|
+
normalized: list[str] = []
|
|
39
|
+
index = 0
|
|
40
|
+
while index < len(argv):
|
|
41
|
+
current = argv[index]
|
|
42
|
+
following = argv[index + 1] if index + 1 < len(argv) else None
|
|
43
|
+
if current == "responses" and following == "create":
|
|
44
|
+
normalized.append("generate")
|
|
45
|
+
index += 2
|
|
46
|
+
continue
|
|
47
|
+
if current == "repairs" and following == "create":
|
|
48
|
+
normalized.append("repair")
|
|
49
|
+
index += 2
|
|
50
|
+
continue
|
|
51
|
+
normalized.append(current)
|
|
52
|
+
index += 1
|
|
53
|
+
return normalized
|
|
54
|
+
|
|
55
|
+
|
|
35
56
|
def build_parser() -> argparse.ArgumentParser:
|
|
36
57
|
parser = argparse.ArgumentParser(
|
|
37
58
|
prog="sysmlv2copilot",
|
|
@@ -65,32 +86,6 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
65
86
|
)
|
|
66
87
|
repair_parser.set_defaults(operation="repair")
|
|
67
88
|
|
|
68
|
-
responses_parser = subparsers.add_parser("responses", help=argparse.SUPPRESS)
|
|
69
|
-
responses_subparsers = responses_parser.add_subparsers(dest="responses_command", required=True)
|
|
70
|
-
create_parser = responses_subparsers.add_parser("create", help=argparse.SUPPRESS)
|
|
71
|
-
_add_operation_arguments(
|
|
72
|
-
create_parser,
|
|
73
|
-
inline_help="Inline natural-language input text.",
|
|
74
|
-
)
|
|
75
|
-
create_parser.set_defaults(operation="generate")
|
|
76
|
-
|
|
77
|
-
repairs_parser = subparsers.add_parser("repairs", help=argparse.SUPPRESS)
|
|
78
|
-
repairs_subparsers = repairs_parser.add_subparsers(dest="repairs_command", required=True)
|
|
79
|
-
repair_create_parser = repairs_subparsers.add_parser("create", help=argparse.SUPPRESS)
|
|
80
|
-
_add_operation_arguments(
|
|
81
|
-
repair_create_parser,
|
|
82
|
-
inline_help="Inline SysML input text.",
|
|
83
|
-
)
|
|
84
|
-
repair_create_parser.set_defaults(operation="repair")
|
|
85
|
-
|
|
86
|
-
requests_parser = subparsers.add_parser("requests", help="Fetch a stored request.")
|
|
87
|
-
requests_subparsers = requests_parser.add_subparsers(dest="requests_command", required=True)
|
|
88
|
-
retrieve_parser = requests_subparsers.add_parser("retrieve", help="Retrieve a request by id.")
|
|
89
|
-
retrieve_parser.add_argument("request_id")
|
|
90
|
-
|
|
91
|
-
health_parser = subparsers.add_parser("health", help="Check service health.")
|
|
92
|
-
health_subparsers = health_parser.add_subparsers(dest="health_command", required=True)
|
|
93
|
-
health_subparsers.add_parser("check", help="Get /healthz.")
|
|
94
89
|
return parser
|
|
95
90
|
|
|
96
91
|
|
|
@@ -106,7 +101,7 @@ def _print_json(data: Any) -> None:
|
|
|
106
101
|
|
|
107
102
|
def main(argv: list[str] | None = None) -> int:
|
|
108
103
|
parser = build_parser()
|
|
109
|
-
args = parser.parse_args(argv)
|
|
104
|
+
args = parser.parse_args(_normalize_legacy_argv(argv))
|
|
110
105
|
try:
|
|
111
106
|
with SysMLCopilot(api_key=args.api_key, base_url=args.base_url) as client:
|
|
112
107
|
if getattr(args, "operation", None) == "generate":
|
|
@@ -133,14 +128,6 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
133
128
|
)
|
|
134
129
|
_print_json(response.model_dump())
|
|
135
130
|
return 0
|
|
136
|
-
if args.command == "requests" and args.requests_command == "retrieve":
|
|
137
|
-
detail = client.requests.retrieve(args.request_id)
|
|
138
|
-
_print_json(detail.model_dump())
|
|
139
|
-
return 0
|
|
140
|
-
if args.command == "health" and args.health_command == "check":
|
|
141
|
-
health = client.health.check()
|
|
142
|
-
_print_json(health.model_dump())
|
|
143
|
-
return 0
|
|
144
131
|
except SysMLCopilotError as exc:
|
|
145
132
|
print(f"error: {exc}")
|
|
146
133
|
return 1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sysmlv2copilot
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
4
4
|
Summary: Internal Python client SDK and CLI for the SysML refinement API used by the Visual Design and Engineering Lab at Carnegie Mellon University
|
|
5
5
|
Author: Chance LaVoie
|
|
6
6
|
License-Expression: MIT
|
|
@@ -65,7 +65,21 @@ Set your API key once:
|
|
|
65
65
|
export SYSMLV2COPILOT_API_KEY=sysml_live_...
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
Or pass it directly in code
|
|
68
|
+
Or pass it directly in code:
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
from sysmlv2copilot import generate, repair
|
|
72
|
+
|
|
73
|
+
sysml = generate(
|
|
74
|
+
"Design a compact warehouse inspection drone that can hover for 15 minutes.",
|
|
75
|
+
api_key="sysml_live_...",
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
repaired = repair(
|
|
79
|
+
"broken.sysml",
|
|
80
|
+
api_key="sysml_live_...",
|
|
81
|
+
)
|
|
82
|
+
```
|
|
69
83
|
|
|
70
84
|
## Python
|
|
71
85
|
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|