-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add diode-replay-dyrun helper #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new CLI helper for ingesting dry-run JSON messages into Diode, registers it as a script, and updates documentation accordingly.
- Added
netboxlabs/diode/sdk/dryrun_replay.py
implementing thediode-replay-dryrun
command - Registered the script in
pyproject.toml
- Updated
README.md
with usage examples for the new CLI
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
pyproject.toml | Registered diode-replay-dryrun in project.scripts |
netboxlabs/diode/sdk/dryrun_replay.py | Implemented the new CLI helper tool |
README.md | Added instructions for using the new CLI command |
Comments suppressed due to low confidence (3)
pyproject.toml:49
- [nitpick] The CLI command name 'diode-replay-dryrun' differs from the PR title/description ('diode-load-dryrun'). Standardize the name across code, docs, and metadata to avoid confusion.
diode-replay-dryrun = "netboxlabs.diode.sdk.dryrun_replay:main"
netboxlabs/diode/sdk/dryrun_replay.py:1
- There are currently no tests for this new CLI helper. Consider adding unit tests for argument parsing, successful ingestions, and error handling to ensure proper coverage.
"""CLI helper to ingest dry-run JSON messages into Diode."""
README.md:108
- [nitpick] The example here doesn't mention the
-c/--client-id
and-k/--client-secret
flags or their environment variable defaults. Document these options to help users configure OAuth credentials.
Alternatively, the same file can be ingested using the `diode-replay-dryrun`
As this isn't part of the sdk as such, I wonder whether moving it to netboxlabs/diode/sdk/bin might make that clearer? Not 100% sure on this, but it feels closer to the approach we'd take with the golang version too |
This pull request introduces a new CLI tool,
diode-replay-dryrun
, to simplify the ingestion of dry-run JSON files into Diode. It also updates the documentation and project configuration to support this new functionality.CLI Tool Addition:
netboxlabs/diode/sdk/dryrun_replay.py
: Added a new CLI helper,diode-replay-dryrun
, to ingest dry-run JSON messages into Diode. It supports arguments for target server, application name/version, OAuth2 credentials, and input files.Documentation Updates:
README.md
: Updated usage instructions to include the newdiode-replay-dryrun
command for ingesting dry-run files, alongside the existingDiodeClient
method. [1] [2]Project Configuration Updates:
pyproject.toml
: Registered thediode-replay-dryrun
script as an entry point in the project configuration.