blazerops 0.2.0__tar.gz → 0.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.
Files changed (34) hide show
  1. {blazerops-0.2.0/blazerops.egg-info → blazerops-0.3.0}/PKG-INFO +1 -1
  2. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops/api.py +35 -2
  3. {blazerops-0.2.0 → blazerops-0.3.0/blazerops.egg-info}/PKG-INFO +1 -1
  4. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops.egg-info/scm_file_list.json +12 -0
  5. blazerops-0.3.0/blazerops.egg-info/scm_version.json +8 -0
  6. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops_cli/main.py +51 -5
  7. blazerops-0.2.0/blazerops.egg-info/scm_version.json +0 -8
  8. {blazerops-0.2.0 → blazerops-0.3.0}/LICENSE +0 -0
  9. {blazerops-0.2.0 → blazerops-0.3.0}/MANIFEST.in +0 -0
  10. {blazerops-0.2.0 → blazerops-0.3.0}/README.pypi.md +0 -0
  11. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops/__init__.py +0 -0
  12. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops/apps.py +0 -0
  13. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops/credentials.py +0 -0
  14. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops/errors.py +0 -0
  15. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops/outputs.py +0 -0
  16. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops/py.typed +0 -0
  17. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops.egg-info/SOURCES.txt +0 -0
  18. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops.egg-info/dependency_links.txt +0 -0
  19. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops.egg-info/entry_points.txt +0 -0
  20. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops.egg-info/requires.txt +0 -0
  21. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops.egg-info/top_level.txt +0 -0
  22. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops_cli/__init__.py +0 -0
  23. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops_cli/api.py +0 -0
  24. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops_cli/bundle.py +0 -0
  25. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops_cli/code_loop.py +0 -0
  26. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops_cli/codegen.py +0 -0
  27. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops_cli/credentials.py +0 -0
  28. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops_cli/datapush.py +0 -0
  29. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops_cli/datarefs.py +0 -0
  30. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops_cli/outputs.py +0 -0
  31. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops_cli/push_state.py +0 -0
  32. {blazerops-0.2.0 → blazerops-0.3.0}/blazerops_cli/typed_client.py +0 -0
  33. {blazerops-0.2.0 → blazerops-0.3.0}/pyproject.toml +0 -0
  34. {blazerops-0.2.0 → blazerops-0.3.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blazerops
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Python client and code-first pipeline authoring CLI for the BlazerOps platform.
5
5
  Author-email: Hyades <contact@hyades.space>
6
6
  License-Expression: Apache-2.0
@@ -585,17 +585,27 @@ class Client:
585
585
  def start_run(self, pipeline_id: str, *, variables: dict[str, Any],
586
586
  use_cache: bool = True, auto_start: bool = True,
587
587
  inputs: dict[str, Any] | None = None,
588
- compute: str | None = None) -> dict[str, Any]:
588
+ compute: str | None = None,
589
+ allow_unbuilt: bool = False) -> dict[str, Any]:
589
590
  """`inputs` are the pipeline's declared interface inputs (HYA-1052): file inputs
590
591
  as datawell artifact ids, scalars/json as values. Sent only when given, so a
591
592
  pipeline without an interface is started exactly as before; the server refuses a
592
593
  missing or ill-typed input by name (422 with `detail.refusals[]`).
593
594
 
594
595
  `compute` is where the run's nodes run unless a node says otherwise (HYA-1136):
595
- auto, own (your compute) or provided (Hyades compute). Sent only when given."""
596
+ auto, own (your compute) or provided (Hyades compute). Sent only when given.
597
+
598
+ `allow_unbuilt` is an explicit request for Build authority, never inferred.
599
+ False is omitted for old-server compatibility; older BFFs may ignore true,
600
+ or reject it. A rejection is never retried without the flag.
601
+ """
602
+ if type(allow_unbuilt) is not bool:
603
+ raise ValueError("allow_unbuilt must be true or false; omit it for a normal Run")
596
604
  self.handshake()
597
605
  body: dict[str, Any] = {"pipeline_id": pipeline_id, "auto_start": auto_start,
598
606
  "use_cache": use_cache, "variables": variables}
607
+ if allow_unbuilt:
608
+ body["allow_unbuilt"] = True
599
609
  if inputs:
600
610
  body["inputs"] = inputs
601
611
  if compute:
@@ -604,6 +614,29 @@ class Client:
604
614
  self._raise_for(r)
605
615
  return r.json()
606
616
 
617
+ def start_build(self, pipeline_id: str, *, variables: dict[str, Any] | None = None,
618
+ sample_fraction: float | None = None, sample_max: int | None = None,
619
+ inputs: dict[str, Any] | None = None,
620
+ use_cache: bool = True) -> dict[str, Any]:
621
+ """Build this exact version through the existing Build door, never a Run alias.
622
+
623
+ Omit sample options unless supplied: the server owns defaults and validation.
624
+ The BFF attaches the Build's submit delegation, just as for start_run.
625
+ Old/mixed servers may reject this request; no fallback or retry is safe.
626
+ """
627
+ self.handshake()
628
+ body: dict[str, Any] = {"variables": variables or {}, "use_cache": use_cache}
629
+ if sample_fraction is not None:
630
+ body["sample_fraction"] = sample_fraction
631
+ if sample_max is not None:
632
+ body["sample_max"] = sample_max
633
+ if inputs:
634
+ body["inputs"] = inputs
635
+ r = self._post(f"/v1/pipeline-defs/{pipeline_id}/build",
636
+ headers=self._auth_headers(), json=body)
637
+ self._raise_for(r)
638
+ return r.json()
639
+
607
640
  def get_run_result(self, run_id: str) -> dict[str, Any]:
608
641
  """The run's result document (the `respond` node's output, HYA-1052). 409 while the
609
642
  run is unfinished, 404 when it finished without one; both raised as ApiError."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blazerops
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Python client and code-first pipeline authoring CLI for the BlazerOps platform.
5
5
  Author-email: Hyades <contact@hyades.space>
6
6
  License-Expression: Apache-2.0
@@ -61,19 +61,27 @@
61
61
  "scripts/e2e_hya1995_requirements.py",
62
62
  "scripts/freeze_hya1995_peers.py",
63
63
  "scripts/live_hya1160.py",
64
+ "scripts/mirror_release.sh",
64
65
  "scripts/mutants_hya1160.py",
65
66
  "scripts/mutants_hya1184.py",
66
67
  "scripts/mutants_hya1383.py",
67
68
  "scripts/mutants_hya1532.py",
68
69
  "scripts/mutants_hya1533.py",
69
70
  "scripts/mutants_hya1853.py",
71
+ "scripts/mutants_hya1854.py",
70
72
  "scripts/mutants_hya1870.py",
73
+ "scripts/mutants_hya1889_cli.py",
71
74
  "scripts/mutants_hya1890.py",
72
75
  "scripts/mutants_hya1903.py",
73
76
  "scripts/mutants_hya1995_push_new_kernel.py",
77
+ "scripts/mutants_hya2299_scripts.py",
74
78
  "scripts/mutants_hya948.sh",
75
79
  "scripts/prove_release_toolchain.py",
76
80
  "scripts/release_toolchain.py",
81
+ "scripts/test_hya2299_code_push.py",
82
+ "scripts/test_hya2299_mutants.py",
83
+ "tests/fixtures/hya1889_not_built.json",
84
+ "tests/fixtures/hya1889_not_built.stderr",
77
85
  "tests/fixtures/hya1995_bff_decisions.rs",
78
86
  "tests/fixtures/hya1995_bff_replay.Cargo.lock",
79
87
  "tests/fixtures/hya1995_bff_resolve.rs",
@@ -99,6 +107,7 @@
99
107
  "tests/golden/exam_answers.ts",
100
108
  "tests/golden/kitchen_sink.ts",
101
109
  "tests/hya1995_peer.py",
110
+ "tests/test_build_and_unbuilt.py",
102
111
  "tests/test_bundle.py",
103
112
  "tests/test_cli_help.py",
104
113
  "tests/test_cli_says_what_it_does.py",
@@ -110,12 +119,14 @@
110
119
  "tests/test_consumer_client.py",
111
120
  "tests/test_data_push_registers_on_its_backend.py",
112
121
  "tests/test_datapush.py",
122
+ "tests/test_download_host.py",
113
123
  "tests/test_e2e_hya1995_evidence.py",
114
124
  "tests/test_e2e_hya1995_requirements.py",
115
125
  "tests/test_e2e_hya1995_stored_pin.py",
116
126
  "tests/test_generate.py",
117
127
  "tests/test_headless_runner.py",
118
128
  "tests/test_hya1995_mutant_runner.py",
129
+ "tests/test_install_sh.py",
119
130
  "tests/test_kernel_decisions.py",
120
131
  "tests/test_login_prompt.py",
121
132
  "tests/test_output_versions.py",
@@ -127,6 +138,7 @@
127
138
  "tests/test_push_new_kernel_hya1995.py",
128
139
  "tests/test_push_producer_contract_hya1995.py",
129
140
  "tests/test_push_recovery_hya1995.py",
141
+ "tests/test_release_mirror.py",
130
142
  "tests/test_release_pypi_build.py",
131
143
  "tests/test_release_signing_gate.py",
132
144
  "tests/test_release_toolchain.py",
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "0.3.0",
3
+ "distance": 0,
4
+ "node": "g86c638b4b55fa1cff3df0c9fb4756435eccfc8a5",
5
+ "dirty": false,
6
+ "branch": "HEAD",
7
+ "node_date": "2026-11-20"
8
+ }
@@ -1721,6 +1721,15 @@ def cmd_run(args: argparse.Namespace) -> int:
1721
1721
  """Instantiate + start a run. `--version N` runs THAT version without making
1722
1722
  it current — a superseded version stays runnable (its run history is its own),
1723
1723
  which is how you reproduce an old result or A/B two versions side by side."""
1724
+ return _cmd_start(args, build=False)
1725
+
1726
+
1727
+ def cmd_build(args: argparse.Namespace) -> int:
1728
+ """Build an exact version; HYA-491 will extend this verb with scope/preview."""
1729
+ return _cmd_start(args, build=True)
1730
+
1731
+
1732
+ def _cmd_start(args: argparse.Namespace, *, build: bool) -> int:
1724
1733
  if args.timeout is not None and not args.watch:
1725
1734
  raise CompileError("--timeout bounds --watch; pass both")
1726
1735
  if args.timeout is not None and not (math.isfinite(args.timeout) and args.timeout >= 0):
@@ -1733,17 +1742,26 @@ def cmd_run(args: argparse.Namespace) -> int:
1733
1742
  # The definition says what each input IS; read it only when inputs were given, so a run
1734
1743
  # without them makes exactly the requests it made before.
1735
1744
  interface = client.get_pipeline_def(pid).get("interface") if pairs else None
1745
+ variables = _parse_vars(args.var)
1746
+ inputs = _parse_inputs(pairs, interface)
1736
1747
  try:
1737
- run = client.start_run(pid, variables=_parse_vars(args.var),
1738
- use_cache=not args.no_cache,
1739
- inputs=_parse_inputs(pairs, interface),
1740
- compute=getattr(args, "compute", None))
1748
+ if build:
1749
+ run = client.start_build(pid, variables=variables, inputs=inputs,
1750
+ use_cache=not args.no_cache,
1751
+ sample_fraction=args.sample_fraction,
1752
+ sample_max=args.sample_max)
1753
+ else:
1754
+ run = client.start_run(pid, variables=variables, inputs=inputs,
1755
+ use_cache=not args.no_cache,
1756
+ compute=getattr(args, "compute", None),
1757
+ allow_unbuilt=getattr(args, "allow_unbuilt", False))
1741
1758
  except ApiError as exc:
1742
1759
  if exc.status == 422 and _print_refusals(exc):
1743
1760
  return 1
1744
1761
  raise
1745
1762
  run_id = str(run.get("run_id"))
1746
- print(f"run {run_id} started ({'cache off' if args.no_cache else 'cache on'})", file=log)
1763
+ print(f"{'build' if build else 'run'} {run_id} started "
1764
+ f"({'cache off' if args.no_cache else 'cache on'})", file=log)
1747
1765
  code, doc = 0, None
1748
1766
  if args.watch:
1749
1767
  try:
@@ -2216,6 +2234,11 @@ def build_parser() -> argparse.ArgumentParser:
2216
2234
  rns.set_defaults(fn=cmd_runs)
2217
2235
 
2218
2236
  rn = sub.add_parser("run", help="start a run of a pipeline")
2237
+ rn.add_argument("--allow-unbuilt", action="store_true",
2238
+ help="intentionally run an unbuilt version (requires build permission); "
2239
+ "may author on the full corpus, is not a cheap Build and does not "
2240
+ "bypass unproven-kernel checks. Older servers may ignore this flag; "
2241
+ "rejections are never retried without it")
2219
2242
  rn.add_argument("pipeline", help="pipeline name or id")
2220
2243
  rn.add_argument("--var", action="append", default=[], metavar="NAME=VALUE",
2221
2244
  help="set a run variable (repeatable)")
@@ -2239,6 +2262,29 @@ def build_parser() -> argparse.ArgumentParser:
2239
2262
  help="print the run summary as JSON on stdout; progress goes to stderr")
2240
2263
  rn.set_defaults(fn=cmd_run)
2241
2264
 
2265
+ bd = sub.add_parser(
2266
+ "build", help="build a pipeline version on a sample",
2267
+ description="Author, smoke-test and pin a pipeline version on a sample. "
2268
+ "Uses the existing Build endpoint; an unsupported server returns an "
2269
+ "API error, never a fallback to Run. Sample defaults are server-owned.")
2270
+ bd.add_argument("pipeline", help="pipeline name or id")
2271
+ _version_flag(bd)
2272
+ bd.add_argument("--sample-fraction", type=float, help="sample fraction (server default when omitted)")
2273
+ bd.add_argument("--sample-max", type=int, help="absolute sample cap (server default when omitted)")
2274
+ bd.add_argument("--var", action="append", default=[], metavar="NAME=VALUE",
2275
+ help="set a Build variable (repeatable)")
2276
+ bd.add_argument("--input", action="append", default=[], metavar="NAME=VALUE",
2277
+ help="supply a declared interface input, as for run; @path reads a value file")
2278
+ bd.add_argument("--no-cache", action="store_true", help="build without reusing cached outputs")
2279
+ bd.add_argument("--watch", action="store_true",
2280
+ help="follow through verification to terminal (0 succeeded, 3 failed, "
2281
+ "4 cancelled, 5 --timeout reached)")
2282
+ bd.add_argument("--timeout", type=float, metavar="SECONDS",
2283
+ help="with --watch, stop watching after this many seconds; the Build continues")
2284
+ bd.add_argument("--json", action="store_true",
2285
+ help="print the run summary as JSON on stdout; progress goes to stderr")
2286
+ bd.set_defaults(fn=cmd_build)
2287
+
2242
2288
  bm = sub.add_parser("bom", help="print a run's bill of materials")
2243
2289
  bm.add_argument("run_id", help="run id")
2244
2290
  bm.set_defaults(fn=cmd_bom)
@@ -1,8 +0,0 @@
1
- {
2
- "tag": "0.2.0",
3
- "distance": 0,
4
- "node": "g60549ce576d69c9928f17b2d6b9e1ccc67930db8",
5
- "dirty": false,
6
- "branch": "HEAD",
7
- "node_date": "2026-11-15"
8
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes