Skip to content

feat(ping): add mlstdb ping subcommand - #38

Merged
himal2007 merged 10 commits into
mainfrom
mlstdb_auth_check_feature
May 27, 2026
Merged

himal2007 merged 10 commits into
mainfrom
mlstdb_auth_check_feature

Conversation

@himal2007

Copy link
Copy Markdown
Collaborator

Summary

Adds a new mlstdb ping subcommand for probing a single BIGSdb API endpoint. It displays the HTTP status code and response body, making it easy to verify that credentials are working or to inspect raw API data without running a full update.

Changes

  • src/mlstdb/core/auth.py: Added ping_url() with auth-priority logic
    (API key → OAuth → unauthenticated fallback).
  • src/mlstdb/cli/ping.py: New ping Click command with --db, --no-auth,
    and --verbose options.
  • src/mlstdb/cli/__init__.py: Registered the ping command.
  • tests/test_cli/test_ping.py: 9 unit tests covering all auth paths and
    error responses.
  • docs/usage/ping.md: New documentation page with examples and expected output.
  • README.md: Brief section pointing to the ping documentation.
  • mkdocs.yml / docs/usage/overview.md: Navigation and overview updated.
  • Closes feat(connect): add --url option to test authenticated API responses #37

Testing

  • All 24 existing tests pass. 9 new tests added for ping.

@himal2007
himal2007 merged commit f92b00d into main May 27, 2026
5 checks passed
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.

feat(connect): add --url option to test authenticated API responses

1 participant