sysmlv2copilot 0.2.3__tar.gz → 0.2.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.
- {sysmlv2copilot-0.2.3/sysmlv2copilot.egg-info → sysmlv2copilot-0.2.4}/PKG-INFO +3 -3
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/PYPI_README.md +2 -2
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/README.md +2 -2
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/pyproject.toml +1 -1
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/sysmlv2copilot/__init__.py +1 -1
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/sysmlv2copilot/cli.py +49 -31
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4/sysmlv2copilot.egg-info}/PKG-INFO +3 -3
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/CHANGELOG.md +0 -0
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/LICENSE +0 -0
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/MANIFEST.in +0 -0
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/examples/README.md +0 -0
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/examples/client_sdk_basic.py +0 -0
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/examples/repair_basic.py +0 -0
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/examples/sdk_smoke_test.py +0 -0
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/setup.cfg +0 -0
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/sysmlv2copilot/__main__.py +0 -0
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/sysmlv2copilot/client.py +0 -0
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/sysmlv2copilot/convenience.py +0 -0
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/sysmlv2copilot/exceptions.py +0 -0
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/sysmlv2copilot/input_utils.py +0 -0
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/sysmlv2copilot/types.py +0 -0
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/sysmlv2copilot.egg-info/SOURCES.txt +0 -0
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/sysmlv2copilot.egg-info/dependency_links.txt +0 -0
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/sysmlv2copilot.egg-info/entry_points.txt +0 -0
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/sysmlv2copilot.egg-info/requires.txt +0 -0
- {sysmlv2copilot-0.2.3 → sysmlv2copilot-0.2.4}/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.4
|
|
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
|
|
@@ -101,7 +101,7 @@ Generate SysML from inline text:
|
|
|
101
101
|
|
|
102
102
|
```bash
|
|
103
103
|
sysmlv2copilot --api-key sysml_live_... \
|
|
104
|
-
|
|
104
|
+
generate \
|
|
105
105
|
--input "Design a compact warehouse inspection drone that can hover for 15 minutes."
|
|
106
106
|
```
|
|
107
107
|
|
|
@@ -109,7 +109,7 @@ Repair SysML from a file:
|
|
|
109
109
|
|
|
110
110
|
```bash
|
|
111
111
|
sysmlv2copilot --api-key sysml_live_... \
|
|
112
|
-
|
|
112
|
+
repair \
|
|
113
113
|
--input-file ./broken.sysml
|
|
114
114
|
```
|
|
115
115
|
|
|
@@ -60,7 +60,7 @@ Generate SysML from inline text:
|
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
62
|
sysmlv2copilot --api-key sysml_live_... \
|
|
63
|
-
|
|
63
|
+
generate \
|
|
64
64
|
--input "Design a compact warehouse inspection drone that can hover for 15 minutes."
|
|
65
65
|
```
|
|
66
66
|
|
|
@@ -68,7 +68,7 @@ Repair SysML from a file:
|
|
|
68
68
|
|
|
69
69
|
```bash
|
|
70
70
|
sysmlv2copilot --api-key sysml_live_... \
|
|
71
|
-
|
|
71
|
+
repair \
|
|
72
72
|
--input-file ./broken.sysml
|
|
73
73
|
```
|
|
74
74
|
|
|
@@ -74,11 +74,11 @@ CLI examples:
|
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
76
|
sysmlv2copilot --api-key sysml_live_... \
|
|
77
|
-
|
|
77
|
+
generate \
|
|
78
78
|
--input "Design a compact warehouse inspection drone that can hover for 15 minutes."
|
|
79
79
|
|
|
80
80
|
sysmlv2copilot --api-key sysml_live_... \
|
|
81
|
-
|
|
81
|
+
repair \
|
|
82
82
|
--input-file ./broken.sysml
|
|
83
83
|
```
|
|
84
84
|
|
|
@@ -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.4"
|
|
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"
|
|
@@ -12,6 +12,26 @@ from .exceptions import SysMLCopilotError
|
|
|
12
12
|
from .input_utils import ALLOWED_INPUT_SUFFIXES, coerce_input_text
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
def _add_operation_arguments(
|
|
16
|
+
parser: argparse.ArgumentParser,
|
|
17
|
+
*,
|
|
18
|
+
inline_help: str,
|
|
19
|
+
) -> None:
|
|
20
|
+
create_group = parser.add_mutually_exclusive_group(required=True)
|
|
21
|
+
create_group.add_argument("--input", help=inline_help)
|
|
22
|
+
create_group.add_argument(
|
|
23
|
+
"--input-file",
|
|
24
|
+
type=Path,
|
|
25
|
+
help=f"Path to a {', '.join(sorted(ALLOWED_INPUT_SUFFIXES))} file containing the input.",
|
|
26
|
+
)
|
|
27
|
+
parser.add_argument("--model", default="refine-sysml-v1")
|
|
28
|
+
parser.add_argument("--provider", choices=["openai", "anthropic"])
|
|
29
|
+
parser.add_argument("--upstream-model")
|
|
30
|
+
parser.add_argument("--max-iters", type=int, default=10)
|
|
31
|
+
parser.add_argument("--max-total-tokens", type=int, default=40_000)
|
|
32
|
+
parser.add_argument("--temperature", type=float)
|
|
33
|
+
|
|
34
|
+
|
|
15
35
|
def build_parser() -> argparse.ArgumentParser:
|
|
16
36
|
parser = argparse.ArgumentParser(
|
|
17
37
|
prog="sysmlv2copilot",
|
|
@@ -31,39 +51,37 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
31
51
|
|
|
32
52
|
subparsers = parser.add_subparsers(dest="command", required=True)
|
|
33
53
|
|
|
34
|
-
|
|
54
|
+
generate_parser = subparsers.add_parser("generate", help="Generate SysML from text or a file.")
|
|
55
|
+
_add_operation_arguments(
|
|
56
|
+
generate_parser,
|
|
57
|
+
inline_help="Inline natural-language input text.",
|
|
58
|
+
)
|
|
59
|
+
generate_parser.set_defaults(operation="generate")
|
|
60
|
+
|
|
61
|
+
repair_parser = subparsers.add_parser("repair", help="Repair SysML from text or a file.")
|
|
62
|
+
_add_operation_arguments(
|
|
63
|
+
repair_parser,
|
|
64
|
+
inline_help="Inline SysML input text.",
|
|
65
|
+
)
|
|
66
|
+
repair_parser.set_defaults(operation="repair")
|
|
67
|
+
|
|
68
|
+
responses_parser = subparsers.add_parser("responses", help=argparse.SUPPRESS)
|
|
35
69
|
responses_subparsers = responses_parser.add_subparsers(dest="responses_command", required=True)
|
|
36
|
-
create_parser = responses_subparsers.add_parser("create", help=
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"--input-file",
|
|
41
|
-
type=Path,
|
|
42
|
-
help="Path to a .txt, .sysml, or .html file containing the input.",
|
|
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.",
|
|
43
74
|
)
|
|
44
|
-
create_parser.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
create_parser.add_argument("--max-iters", type=int, default=10)
|
|
48
|
-
create_parser.add_argument("--max-total-tokens", type=int, default=40_000)
|
|
49
|
-
create_parser.add_argument("--temperature", type=float)
|
|
50
|
-
|
|
51
|
-
repairs_parser = subparsers.add_parser("repairs", help="Repair existing SysML.")
|
|
75
|
+
create_parser.set_defaults(operation="generate")
|
|
76
|
+
|
|
77
|
+
repairs_parser = subparsers.add_parser("repairs", help=argparse.SUPPRESS)
|
|
52
78
|
repairs_subparsers = repairs_parser.add_subparsers(dest="repairs_command", required=True)
|
|
53
|
-
repair_create_parser = repairs_subparsers.add_parser("create", help=
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"--input-file",
|
|
58
|
-
type=Path,
|
|
59
|
-
help="Path to a .txt, .sysml, or .html file containing the input.",
|
|
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.",
|
|
60
83
|
)
|
|
61
|
-
repair_create_parser.
|
|
62
|
-
repair_create_parser.add_argument("--provider", choices=["openai", "anthropic"])
|
|
63
|
-
repair_create_parser.add_argument("--upstream-model")
|
|
64
|
-
repair_create_parser.add_argument("--max-iters", type=int, default=10)
|
|
65
|
-
repair_create_parser.add_argument("--max-total-tokens", type=int, default=40_000)
|
|
66
|
-
repair_create_parser.add_argument("--temperature", type=float)
|
|
84
|
+
repair_create_parser.set_defaults(operation="repair")
|
|
67
85
|
|
|
68
86
|
requests_parser = subparsers.add_parser("requests", help="Fetch a stored request.")
|
|
69
87
|
requests_subparsers = requests_parser.add_subparsers(dest="requests_command", required=True)
|
|
@@ -91,7 +109,7 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
91
109
|
args = parser.parse_args(argv)
|
|
92
110
|
try:
|
|
93
111
|
with SysMLCopilot(api_key=args.api_key, base_url=args.base_url) as client:
|
|
94
|
-
if args
|
|
112
|
+
if getattr(args, "operation", None) == "generate":
|
|
95
113
|
response = client.responses.create(
|
|
96
114
|
input=_read_input_text(args),
|
|
97
115
|
model=args.model,
|
|
@@ -103,7 +121,7 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
103
121
|
)
|
|
104
122
|
_print_json(response.model_dump())
|
|
105
123
|
return 0
|
|
106
|
-
if args
|
|
124
|
+
if getattr(args, "operation", None) == "repair":
|
|
107
125
|
response = client.repairs.create(
|
|
108
126
|
input=_read_input_text(args),
|
|
109
127
|
model=args.model,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sysmlv2copilot
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
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
|
|
@@ -101,7 +101,7 @@ Generate SysML from inline text:
|
|
|
101
101
|
|
|
102
102
|
```bash
|
|
103
103
|
sysmlv2copilot --api-key sysml_live_... \
|
|
104
|
-
|
|
104
|
+
generate \
|
|
105
105
|
--input "Design a compact warehouse inspection drone that can hover for 15 minutes."
|
|
106
106
|
```
|
|
107
107
|
|
|
@@ -109,7 +109,7 @@ Repair SysML from a file:
|
|
|
109
109
|
|
|
110
110
|
```bash
|
|
111
111
|
sysmlv2copilot --api-key sysml_live_... \
|
|
112
|
-
|
|
112
|
+
repair \
|
|
113
113
|
--input-file ./broken.sysml
|
|
114
114
|
```
|
|
115
115
|
|
|
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
|