Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export HELP
.PHONY: \
all help env env-verbose check-uv check-uv-verbose lock install update build \
format lint ruff-format ruff-lint pyright mypy pylint plxt plxt-format plxt-lint \
rules rules-claude-standalone up-kit-configs ukc check-config-sync ccs check-rules check-urls cu insert-skeleton \
rules rules-claude-standalone up-kit-configs ukc check-config-sync ccs check-keyword-only cko check-rules check-urls cu insert-skeleton \
cleanderived cleanenv cleanall \
test test-xdist t test-quiet tq test-with-prints tp test-inference ti \
test-llm tl test-img-gen tg test-extract te test-temporal ttm codex-tests gha-tests \
Expand Down Expand Up @@ -316,6 +316,13 @@ check-config-sync: env
ccs: check-config-sync
@echo "> done: ccs = check-config-sync"

check-keyword-only: env
$(call PRINT_TITLE,"Enforcing the keyword-only-arguments convention across pipelex/ source")
$(VENV_PIPELEX_DEV) check-keyword-only --quiet

cko: check-keyword-only
@echo "> done: cko = check-keyword-only"

generate-mthds-schema: env
$(call PRINT_TITLE,"Generating MTHDS JSON Schema")
$(VENV_PIPELEX_DEV) generate-mthds-schema
Expand Down Expand Up @@ -1146,10 +1153,10 @@ cc: cleanderived regenerate-test-models-quiet generate-mthds-schema-quiet update
up: generate-mthds-schema-quiet update-gateway-models-quiet up-kit-configs rules
@echo "> done: up = generate-mthds-schema update-gateway-models up-kit-configs rules"

check: cc check-unused-imports check-config-sync check-rules check-urls check-gateway-models check-mthds-schema pylint
check: cc check-unused-imports check-config-sync check-keyword-only check-rules check-urls check-gateway-models check-mthds-schema pylint
@echo "> done: check"

agent-check: fix-unused-imports format lint pyright mypy
agent-check: fix-unused-imports format lint pyright mypy check-keyword-only
@echo "> done: agent-check"

v: validate
Expand Down
236 changes: 228 additions & 8 deletions TODOS.md

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions pipelex/cli/dev_cli/_dev_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

from pipelex.cli.dev_cli.commands.check_config_sync_cmd import LeadingConfig, check_config_sync_cmd
from pipelex.cli.dev_cli.commands.check_gateway_models_cmd import check_gateway_models_cmd
from pipelex.cli.dev_cli.commands.check_keyword_only_cmd import check_keyword_only_cmd
from pipelex.cli.dev_cli.commands.check_mthds_schema_cmd import check_mthds_schema_cmd
from pipelex.cli.dev_cli.commands.check_rules_sync_cmd import check_rules_sync_cmd
from pipelex.cli.dev_cli.commands.check_urls_cmd import DEFAULT_TIMEOUT, check_urls_cmd
Expand All @@ -36,6 +37,7 @@ def list_commands(self, ctx: Context) -> list[str]:
return [
"check-config-sync",
"check-gateway-models",
"check-keyword-only",
"check-mthds-schema",
"check-rules",
"check-urls",
Expand Down Expand Up @@ -246,6 +248,28 @@ def check_mthds_schema_command(
sys.exit(1)


@app.command(name="check-keyword-only", help="Enforce the keyword-only-arguments convention across pipelex/ source")
def check_keyword_only_command(
report: Annotated[bool, typer.Option("--report", help="Print the full violation inventory grouped by package")] = False,
regen_baseline: Annotated[bool, typer.Option("--regen-baseline", help="Rewrite the baseline file with all current violations")] = False,
quiet: Annotated[bool, typer.Option("--quiet", "-q", help="Output only a single validation line")] = False,
) -> None:
"""Enforce the keyword-only-arguments convention across pipelex/ source."""
try:
check_keyword_only_cmd(report=report, regen_baseline=regen_baseline, quiet=quiet)
except (typer.Exit, typer.Abort):
# Typer control-flow exits carry an intended exit code — not a failure. Let them through.
raise
except Exception: # noqa: BLE001
# Dev CLI command root: print a traceback for any unexpected failure and exit non-zero.
console = get_console()
console.print()
console.print("[bold red]Unexpected error occurred[/bold red]")
console.print()
console.print(Traceback())
sys.exit(1)


@app.command(name="sync-main-config", help="Sync main config values to kit and project configs")
def sync_main_config_command(
target: Annotated[
Expand Down
Loading
Loading