Skip to content

Add extensible JSON command line client - #385

Merged
timkpaine merged 1 commit into
mainfrom
tkp/clcli
Oct 20, 2026
Merged

timkpaine merged 1 commit into
mainfrom
tkp/clcli

Conversation

@timkpaine

Copy link
Copy Markdown
Member

No description provided.

Add csp-gateway-client, an argparse CLI over the synchronous client that prints compact JSON (--pretty to indent) and can be subclassed by gateway applications. GatewayClientConfig reads unset fields from environment variables, following the server Settings convention, and closing a stream now awaits its connection cleanup.

Signed-off-by: Tim Paine <[email protected]>
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

1 242 tests  +64   1 232 ✅ +64   9m 39s ⏱️ - 1m 17s
    1 suites ± 0      10 💤 ± 0 
    1 files   ± 0       0 ❌ ± 0 

Results for commit 1331896. ± Comparison against base commit 0932a2f.

This pull request removes 1 and adds 65 tests. Note that renamed tests count towards both.
csp_gateway.tests.server.modules.web.test_outputs.TestOutputsApi ‑ test_file_types_without_libmagic[app.log.gz-\x1f\x8b\x08\x00\xf1\xcf\xd7j\x02\xff\xcb\xc9OW\xc8\xc9\xccK\xe5\x02\x00G\x11\xd2\xbc\t\x00\x00\x00-application/gzip-download-]
csp_gateway.tests.client.test_cli ‑ test_connection_refused_against_real_client
csp_gateway.tests.client.test_cli ‑ test_main_entry_point
csp_gateway.tests.client.test_cli ‑ test_module_entry_point
csp_gateway.tests.client.test_cli.TestAgainstGateway ‑ test_commands
csp_gateway.tests.client.test_cli.TestBuiltInCommands ‑ test_basket_key_passes_through_as_field
csp_gateway.tests.client.test_cli.TestBuiltInCommands ‑ test_controls
csp_gateway.tests.client.test_cli.TestBuiltInCommands ‑ test_help_lists_builtin_commands
csp_gateway.tests.client.test_cli.TestBuiltInCommands ‑ test_json_argument_missing_file
csp_gateway.tests.client.test_cli.TestBuiltInCommands ‑ test_last_prints_compact_json
csp_gateway.tests.client.test_cli.TestBuiltInCommands ‑ test_last_without_channel_lists_channels
…

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.65472% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.06%. Comparing base (0932a2f) to head (1331896).

Files with missing lines Patch % Lines
csp_gateway/client/cli.py 93.47% 22 Missing ⚠️
csp_gateway/client/__main__.py 0.00% 3 Missing ⚠️
csp_gateway/tests/client/test_cli.py 99.51% 2 Missing ⚠️
csp_gateway/client/client.py 96.77% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #385      +/-   ##
==========================================
+ Coverage   88.61%   89.06%   +0.44%     
==========================================
  Files         167      170       +3     
  Lines       21465    22297     +832     
  Branches     1948     2005      +57     
==========================================
+ Hits        19022    19858     +836     
+ Misses       2443     2439       -4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@timkpaine
timkpaine merged commit 76c5fc4 into main Oct 20, 2026
10 checks passed
@timkpaine
timkpaine deleted the tkp/clcli branch October 20, 2026 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant