hector-cli 0.1.0__tar.gz → 0.2.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.
- {hector_cli-0.1.0 → hector_cli-0.2.0}/PKG-INFO +13 -1
- {hector_cli-0.1.0 → hector_cli-0.2.0}/README.md +12 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/commands/base.py +10 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/commands/init.py +6 -3
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/commands/validate.py +6 -2
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/pipeline.py +14 -5
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/scaffold.py +3 -3
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector_cli.egg-info/PKG-INFO +13 -1
- {hector_cli-0.1.0 → hector_cli-0.2.0}/setup.py +1 -1
- {hector_cli-0.1.0 → hector_cli-0.2.0}/LICENSE +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/__init__.py +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/__main__.py +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/commands/__init__.py +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/commands/export.py +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/commands/run.py +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/commands/test.py +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/connections.py +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/core.py +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/dependencies.py +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/docker.py +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/generator.py +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/hubs.py +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/mappings.py +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/modules.py +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/peripherals.py +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/reporters.py +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/runners.py +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector/validator.py +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector_cli.egg-info/SOURCES.txt +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector_cli.egg-info/dependency_links.txt +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector_cli.egg-info/entry_points.txt +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector_cli.egg-info/requires.txt +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/hector_cli.egg-info/top_level.txt +0 -0
- {hector_cli-0.1.0 → hector_cli-0.2.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hector-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: YAML-driven Renode + Verilator simulation orchestrator for embedded hardware CI
|
|
5
5
|
Home-page: https://hector-ci.com
|
|
6
6
|
Author: Nemesis
|
|
@@ -117,6 +117,7 @@ Generated files go in `.hector/` — add it to your `.gitignore`. The Renode **b
|
|
|
117
117
|
| Command | Behaviour |
|
|
118
118
|
|---|---|
|
|
119
119
|
| `hector run` | Run simulation interactively (Renode monitor) |
|
|
120
|
+
| `hector run -f board.yaml` | Read a config file other than `.hector.yaml` (`-f`/`--file`; works on every command) |
|
|
120
121
|
| `hector run --set BIN=fw.elf` | Override a config argument at the command line |
|
|
121
122
|
| `hector run --set BIN=fw.elf --set BOARD=nucleo` | Override multiple arguments |
|
|
122
123
|
| `hector run --debug boardA:3333` | Halt a CPU and open a GDB server |
|
|
@@ -147,13 +148,24 @@ Generated files go in `.hector/` — add it to your `.gitignore`. The Renode **b
|
|
|
147
148
|
| `hector export` | Generate the files and print the run command instead of executing it |
|
|
148
149
|
| `hector export --no-docker` | Print the bare `renode <resc>` command instead of the `docker run …` one |
|
|
149
150
|
| `hector validate` | Validate `.hector.yaml` without running anything |
|
|
151
|
+
| `hector validate -f board.yaml` | Validate a config file by another name |
|
|
150
152
|
| `hector init` | Scaffold a starter `.hector.yaml` |
|
|
153
|
+
| `hector init -f board.yaml` | Scaffold the starter config under a custom name |
|
|
151
154
|
| `hector --version` | Print the tool version |
|
|
152
155
|
|
|
153
156
|
`hector` is structured as subcommands: `run` (simulate), `test` (run the `tests:`
|
|
154
157
|
section), `export` (emit the command without running it), plus `init` and
|
|
155
158
|
`validate`. Run `hector <command> --help` for the flags each one accepts.
|
|
156
159
|
|
|
160
|
+
Every command reads (or, for `init`, writes) `.hector.yaml` by default. Point it
|
|
161
|
+
at a different file with **`-f` / `--file`** — useful when one project keeps
|
|
162
|
+
several configs (e.g. `ci.hector.yaml`, `local.hector.yaml`):
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
hector test -f ci.hector.yaml
|
|
166
|
+
hector run --file boards/nucleo.yaml
|
|
167
|
+
```
|
|
168
|
+
|
|
157
169
|
### Debug mode (`--debug NODE:PORT`)
|
|
158
170
|
|
|
159
171
|
Repeat the flag for each machine you want to debug. ([Renode docs: GDB debugging](https://renode.readthedocs.io/en/latest/debugging/gdb.html))
|
|
@@ -87,6 +87,7 @@ Generated files go in `.hector/` — add it to your `.gitignore`. The Renode **b
|
|
|
87
87
|
| Command | Behaviour |
|
|
88
88
|
|---|---|
|
|
89
89
|
| `hector run` | Run simulation interactively (Renode monitor) |
|
|
90
|
+
| `hector run -f board.yaml` | Read a config file other than `.hector.yaml` (`-f`/`--file`; works on every command) |
|
|
90
91
|
| `hector run --set BIN=fw.elf` | Override a config argument at the command line |
|
|
91
92
|
| `hector run --set BIN=fw.elf --set BOARD=nucleo` | Override multiple arguments |
|
|
92
93
|
| `hector run --debug boardA:3333` | Halt a CPU and open a GDB server |
|
|
@@ -117,13 +118,24 @@ Generated files go in `.hector/` — add it to your `.gitignore`. The Renode **b
|
|
|
117
118
|
| `hector export` | Generate the files and print the run command instead of executing it |
|
|
118
119
|
| `hector export --no-docker` | Print the bare `renode <resc>` command instead of the `docker run …` one |
|
|
119
120
|
| `hector validate` | Validate `.hector.yaml` without running anything |
|
|
121
|
+
| `hector validate -f board.yaml` | Validate a config file by another name |
|
|
120
122
|
| `hector init` | Scaffold a starter `.hector.yaml` |
|
|
123
|
+
| `hector init -f board.yaml` | Scaffold the starter config under a custom name |
|
|
121
124
|
| `hector --version` | Print the tool version |
|
|
122
125
|
|
|
123
126
|
`hector` is structured as subcommands: `run` (simulate), `test` (run the `tests:`
|
|
124
127
|
section), `export` (emit the command without running it), plus `init` and
|
|
125
128
|
`validate`. Run `hector <command> --help` for the flags each one accepts.
|
|
126
129
|
|
|
130
|
+
Every command reads (or, for `init`, writes) `.hector.yaml` by default. Point it
|
|
131
|
+
at a different file with **`-f` / `--file`** — useful when one project keeps
|
|
132
|
+
several configs (e.g. `ci.hector.yaml`, `local.hector.yaml`):
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
hector test -f ci.hector.yaml
|
|
136
|
+
hector run --file boards/nucleo.yaml
|
|
137
|
+
```
|
|
138
|
+
|
|
127
139
|
### Debug mode (`--debug NODE:PORT`)
|
|
128
140
|
|
|
129
141
|
Repeat the flag for each machine you want to debug. ([Renode docs: GDB debugging](https://renode.readthedocs.io/en/latest/debugging/gdb.html))
|
|
@@ -30,9 +30,19 @@ class Command:
|
|
|
30
30
|
# Reusable flag groups (shared so each command's surface stays consistent)
|
|
31
31
|
# ---------------------------------------------------------------------------
|
|
32
32
|
|
|
33
|
+
def add_config_file_argument(parser):
|
|
34
|
+
"""The Hector config file to read. Shared by every config-driven command
|
|
35
|
+
(run / test / export / validate) and `init` (which writes it)."""
|
|
36
|
+
parser.add_argument(
|
|
37
|
+
"-f", "--file", metavar="PATH", dest="file", default=".hector.yaml",
|
|
38
|
+
help="Path to the Hector config file (default: .hector.yaml).",
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
33
42
|
def add_common_arguments(parser):
|
|
34
43
|
"""Flags shared by the config-driven commands (run / test / export): they all
|
|
35
44
|
read .hector.yaml, pin a Renode version, expand the matrix, and collect output."""
|
|
45
|
+
add_config_file_argument(parser)
|
|
36
46
|
parser.add_argument(
|
|
37
47
|
"--set", action="append", metavar="KEY=VALUE", dest="set_args",
|
|
38
48
|
help="Override a config argument. Repeatable. Takes precedence over env vars "
|
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
"""`hector init` — scaffold a new .hector.yaml in the current directory."""
|
|
3
3
|
|
|
4
4
|
from ..scaffold import scaffold_init
|
|
5
|
-
from .base import COMMANDS, Command
|
|
5
|
+
from .base import COMMANDS, Command, add_config_file_argument
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
@COMMANDS.register("init")
|
|
9
9
|
class InitCommand(Command):
|
|
10
10
|
name = "init"
|
|
11
|
-
help = "Scaffold a new
|
|
11
|
+
help = "Scaffold a new config file in the current directory."
|
|
12
|
+
|
|
13
|
+
def add_arguments(self, parser):
|
|
14
|
+
add_config_file_argument(parser)
|
|
12
15
|
|
|
13
16
|
def execute(self, args):
|
|
14
|
-
scaffold_init()
|
|
17
|
+
scaffold_init(args.file)
|
|
15
18
|
return 0
|
|
@@ -2,14 +2,18 @@
|
|
|
2
2
|
"""`hector validate` — check .hector.yaml without running anything; exit 1 on errors."""
|
|
3
3
|
|
|
4
4
|
from .. import pipeline
|
|
5
|
-
from .base import COMMANDS, Command
|
|
5
|
+
from .base import COMMANDS, Command, add_config_file_argument
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
@COMMANDS.register("validate")
|
|
9
9
|
class ValidateCommand(Command):
|
|
10
10
|
name = "validate"
|
|
11
|
-
help = "Validate
|
|
11
|
+
help = "Validate the config file without running anything; exit 1 on errors."
|
|
12
|
+
|
|
13
|
+
def add_arguments(self, parser):
|
|
14
|
+
add_config_file_argument(parser)
|
|
12
15
|
|
|
13
16
|
def execute(self, args):
|
|
17
|
+
pipeline.apply_global_flags(args) # picks up -f/--file
|
|
14
18
|
# _run_validate prints a report and exits with the right code itself.
|
|
15
19
|
pipeline._run_validate()
|
|
@@ -43,8 +43,17 @@ from .validator import print_issues, validate_config
|
|
|
43
43
|
# adding one module — no changes here.
|
|
44
44
|
# ---------------------------------------------------------------------------
|
|
45
45
|
|
|
46
|
+
# The config file every command reads/writes. Overridable with -f/--file; set by
|
|
47
|
+
# apply_global_flags before any config is loaded.
|
|
48
|
+
CONFIG_PATH = ".hector.yaml"
|
|
49
|
+
|
|
50
|
+
|
|
46
51
|
def apply_global_flags(args):
|
|
47
|
-
"""Honour --workspace-mount / --no-docker before anything touches paths."""
|
|
52
|
+
"""Honour --file / --workspace-mount / --no-docker before anything touches paths."""
|
|
53
|
+
path = getattr(args, "file", None)
|
|
54
|
+
if path:
|
|
55
|
+
global CONFIG_PATH
|
|
56
|
+
CONFIG_PATH = path
|
|
48
57
|
if getattr(args, "workspace_mount", None):
|
|
49
58
|
_core.WORKSPACE_MOUNT = args.workspace_mount
|
|
50
59
|
if getattr(args, "no_docker", False):
|
|
@@ -53,8 +62,8 @@ def apply_global_flags(args):
|
|
|
53
62
|
|
|
54
63
|
|
|
55
64
|
def load_config_or_exit():
|
|
56
|
-
"""Load and sanity-check
|
|
57
|
-
config_path =
|
|
65
|
+
"""Load and sanity-check the config file (CONFIG_PATH), or print an error and exit."""
|
|
66
|
+
config_path = CONFIG_PATH
|
|
58
67
|
if not os.path.exists(config_path):
|
|
59
68
|
print(f"[ERROR] No '{config_path}' in the current directory ({os.getcwd()}).\n"
|
|
60
69
|
" Run hector from a project that has a .hector.yaml, or create one "
|
|
@@ -198,8 +207,8 @@ def snapshot_fastpath(args):
|
|
|
198
207
|
|
|
199
208
|
|
|
200
209
|
def _run_validate():
|
|
201
|
-
"""Load
|
|
202
|
-
config_path =
|
|
210
|
+
"""Load the config file (CONFIG_PATH) and report all config errors, then exit."""
|
|
211
|
+
config_path = CONFIG_PATH
|
|
203
212
|
if not os.path.exists(config_path):
|
|
204
213
|
print(f"[VALIDATE] {config_path} not found in current directory.")
|
|
205
214
|
sys.exit(1)
|
|
@@ -41,9 +41,9 @@ _PLATFORMS_NOTE = """\
|
|
|
41
41
|
"""
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
def scaffold_init():
|
|
45
|
-
"""Interactively create a starter
|
|
46
|
-
|
|
44
|
+
def scaffold_init(target=".hector.yaml"):
|
|
45
|
+
"""Interactively create a starter config in the current directory (default
|
|
46
|
+
name .hector.yaml; override via -f/--file)."""
|
|
47
47
|
if os.path.exists(target):
|
|
48
48
|
print(f"[INIT] {target} already exists — not overwriting.")
|
|
49
49
|
print(f"[INIT] Delete or rename it, then run 'hector init' again.")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hector-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: YAML-driven Renode + Verilator simulation orchestrator for embedded hardware CI
|
|
5
5
|
Home-page: https://hector-ci.com
|
|
6
6
|
Author: Nemesis
|
|
@@ -117,6 +117,7 @@ Generated files go in `.hector/` — add it to your `.gitignore`. The Renode **b
|
|
|
117
117
|
| Command | Behaviour |
|
|
118
118
|
|---|---|
|
|
119
119
|
| `hector run` | Run simulation interactively (Renode monitor) |
|
|
120
|
+
| `hector run -f board.yaml` | Read a config file other than `.hector.yaml` (`-f`/`--file`; works on every command) |
|
|
120
121
|
| `hector run --set BIN=fw.elf` | Override a config argument at the command line |
|
|
121
122
|
| `hector run --set BIN=fw.elf --set BOARD=nucleo` | Override multiple arguments |
|
|
122
123
|
| `hector run --debug boardA:3333` | Halt a CPU and open a GDB server |
|
|
@@ -147,13 +148,24 @@ Generated files go in `.hector/` — add it to your `.gitignore`. The Renode **b
|
|
|
147
148
|
| `hector export` | Generate the files and print the run command instead of executing it |
|
|
148
149
|
| `hector export --no-docker` | Print the bare `renode <resc>` command instead of the `docker run …` one |
|
|
149
150
|
| `hector validate` | Validate `.hector.yaml` without running anything |
|
|
151
|
+
| `hector validate -f board.yaml` | Validate a config file by another name |
|
|
150
152
|
| `hector init` | Scaffold a starter `.hector.yaml` |
|
|
153
|
+
| `hector init -f board.yaml` | Scaffold the starter config under a custom name |
|
|
151
154
|
| `hector --version` | Print the tool version |
|
|
152
155
|
|
|
153
156
|
`hector` is structured as subcommands: `run` (simulate), `test` (run the `tests:`
|
|
154
157
|
section), `export` (emit the command without running it), plus `init` and
|
|
155
158
|
`validate`. Run `hector <command> --help` for the flags each one accepts.
|
|
156
159
|
|
|
160
|
+
Every command reads (or, for `init`, writes) `.hector.yaml` by default. Point it
|
|
161
|
+
at a different file with **`-f` / `--file`** — useful when one project keeps
|
|
162
|
+
several configs (e.g. `ci.hector.yaml`, `local.hector.yaml`):
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
hector test -f ci.hector.yaml
|
|
166
|
+
hector run --file boards/nucleo.yaml
|
|
167
|
+
```
|
|
168
|
+
|
|
157
169
|
### Debug mode (`--debug NODE:PORT`)
|
|
158
170
|
|
|
159
171
|
Repeat the flag for each machine you want to debug. ([Renode docs: GDB debugging](https://renode.readthedocs.io/en/latest/debugging/gdb.html))
|
|
@@ -19,7 +19,7 @@ def _read_readme():
|
|
|
19
19
|
|
|
20
20
|
setup(
|
|
21
21
|
name="hector-cli",
|
|
22
|
-
version="0.
|
|
22
|
+
version="0.2.0",
|
|
23
23
|
description="YAML-driven Renode + Verilator simulation orchestrator for embedded hardware CI",
|
|
24
24
|
long_description=_read_readme(),
|
|
25
25
|
long_description_content_type="text/markdown",
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|