dirigent-cli 0.10.0__tar.gz → 0.10.2__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.
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/PKG-INFO +1 -1
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/pyproject.toml +1 -1
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/pyproject.toml.orig +1 -1
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/main.py +11 -12
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/summaries.py +4 -20
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/LICENSE +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/README.md +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/__init__.py +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/aliases.py +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/commands.py +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/context.py +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/formatters.py +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/graph.py +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/health.py +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/init_form.py +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/local.py +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/output.py +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/params.py +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/profiles.py +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/project.py +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/py.typed +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/reaper.py +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/scaffold.py +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/schemas.py +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/sources.py +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/stream.py +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/templates/pack/README.md.tmpl +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/templates/pack/__init__.py.tmpl +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/templates/pack/operator.py.tmpl +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/templates/pack/pyproject.toml.tmpl +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/templates/pack/test_plugin.py.tmpl +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/timing.py +0 -0
- {dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/triggers.py +0 -0
|
@@ -109,9 +109,20 @@ app.command("validate", rich_help_panel=DEFINE_PANEL)(commands.validate_command)
|
|
|
109
109
|
app.command("export", rich_help_panel=DEFINE_PANEL)(commands.export_command)
|
|
110
110
|
|
|
111
111
|
|
|
112
|
+
def _say_version(asked: bool) -> None:
|
|
113
|
+
"""Answer --version with one plain line, the way every CLI does, and stop."""
|
|
114
|
+
if asked:
|
|
115
|
+
typer.echo(f"dg {distribution_version('dirigent-cli')}")
|
|
116
|
+
raise typer.Exit
|
|
117
|
+
|
|
118
|
+
|
|
112
119
|
@app.callback()
|
|
113
120
|
def main_callback(
|
|
114
121
|
ctx: typer.Context,
|
|
122
|
+
version: Annotated[
|
|
123
|
+
bool,
|
|
124
|
+
typer.Option("--version", callback=_say_version, is_eager=True, help="Print dg's version and exit."),
|
|
125
|
+
] = False,
|
|
115
126
|
url: Annotated[str | None, typer.Option("--url", help="The server to talk to.")] = None,
|
|
116
127
|
token: Annotated[str | None, typer.Option("--token", help="The bearer token to present.")] = None,
|
|
117
128
|
profile: Annotated[str | None, typer.Option("--profile", help="Which profile to use.")] = None,
|
|
@@ -177,8 +188,6 @@ def _output_format(named: str | None, *, json_output: bool) -> Format:
|
|
|
177
188
|
return cast("Format", resolved)
|
|
178
189
|
|
|
179
190
|
|
|
180
|
-
DISTRIBUTIONS = ("dirigent-cli", "dirigent-core", "dirigent-server", "dirigent-plugin", "dirigent-blocks")
|
|
181
|
-
|
|
182
191
|
DEV_ADMIN = "dev"
|
|
183
192
|
DEV_PASSWORD = "dirigent-dev" # noqa: S105
|
|
184
193
|
DEV_TOKEN_NAME = "dev"
|
|
@@ -243,16 +252,6 @@ def format_command(
|
|
|
243
252
|
emit_rendered(item)
|
|
244
253
|
|
|
245
254
|
|
|
246
|
-
@app.command(name="version", rich_help_panel=ADMIN_PANEL)
|
|
247
|
-
def version_command() -> None:
|
|
248
|
-
"""Show the versions of the installed dirigent packages."""
|
|
249
|
-
emit_fact(
|
|
250
|
-
"version",
|
|
251
|
-
message="dirigent",
|
|
252
|
-
packages=[{"package": name, "version": distribution_version(name)} for name in DISTRIBUTIONS],
|
|
253
|
-
)
|
|
254
|
-
|
|
255
|
-
|
|
256
255
|
@config_app.command("show")
|
|
257
256
|
def config_show() -> None:
|
|
258
257
|
"""Show the effective configuration, with secrets redacted."""
|
|
@@ -291,33 +291,18 @@ def _initialised(record: Record) -> RenderableType | None:
|
|
|
291
291
|
f"\ntoken of its first admin, [bold]{admin}[/], is in .env, where the local profile reads it."
|
|
292
292
|
"\nShown here once:"
|
|
293
293
|
f"\n [bold]{token}[/]"
|
|
294
|
-
"\n\nStart the instance in a second terminal
|
|
294
|
+
"\n\nStart the instance in a second terminal, in this directory; it keeps running:"
|
|
295
295
|
"\n [bold]uv sync[/]"
|
|
296
296
|
"\n [bold]uv run dg dev[/]"
|
|
297
|
-
f"\nThe UI is at http://127.0.0.1:3333
|
|
298
|
-
"\n\nThen apply the example
|
|
297
|
+
f"\nThe UI is at http://127.0.0.1:3333 and {admin} logs in with the password you gave."
|
|
298
|
+
"\n\nThen, in this directory, apply the example and run it:"
|
|
299
299
|
"\n [bold]uv run dg apply[/]"
|
|
300
300
|
"\n [bold]uv run dg run hello-world --watch[/]"
|
|
301
|
-
"\n\n[
|
|
302
|
-
"\nno secret key, so a connection carrying a credential cannot be stored until"
|
|
303
|
-
"\nDIRIGENT_SECRET_KEY is set. A real server is the compose stack, with PostgreSQL"
|
|
304
|
-
"\nand workers of its own."
|
|
301
|
+
"\n\n[dim]No DIRIGENT_SECRET_KEY is set, so a connection carrying a credential cannot be stored until it is.[/]"
|
|
305
302
|
)
|
|
306
303
|
return Group(*parts)
|
|
307
304
|
|
|
308
305
|
|
|
309
|
-
def _version(record: Record) -> RenderableType | None:
|
|
310
|
-
"""Render the installed packages as the table `dg version` used to draw itself."""
|
|
311
|
-
packages = _mappings(record, "packages")
|
|
312
|
-
if not packages:
|
|
313
|
-
return None
|
|
314
|
-
return build_table(
|
|
315
|
-
"dirigent",
|
|
316
|
-
["package", "version"],
|
|
317
|
-
[[str(one.get("package")), str(one.get("version"))] for one in packages],
|
|
318
|
-
)
|
|
319
|
-
|
|
320
|
-
|
|
321
306
|
def _config(record: Record) -> RenderableType | None:
|
|
322
307
|
"""Render the effective configuration as a setting-per-row table."""
|
|
323
308
|
settings = record.get("settings")
|
|
@@ -414,7 +399,6 @@ RENDERERS: Final[Mapping[str, Callable[[Record], RenderableType | None]]] = {
|
|
|
414
399
|
"run": _run,
|
|
415
400
|
"run.profile": _profile,
|
|
416
401
|
"backfill": _backfill,
|
|
417
|
-
"version": _version,
|
|
418
402
|
"config": _config,
|
|
419
403
|
"db.history": _db_history,
|
|
420
404
|
"validation": _validation,
|
|
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
|
{dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/templates/pack/__init__.py.tmpl
RENAMED
|
File without changes
|
{dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/templates/pack/operator.py.tmpl
RENAMED
|
File without changes
|
{dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/templates/pack/pyproject.toml.tmpl
RENAMED
|
File without changes
|
{dirigent_cli-0.10.0 → dirigent_cli-0.10.2}/src/dirigent_cli/templates/pack/test_plugin.py.tmpl
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|