feat: add diode-replay-dryrun helper - #54
Merged
Merged
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
leoparente
requested review from
jajeffries,
ltucker and
mfiedorowicz
as code owners
July 9, 2025 12:39
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new command-line tool for ingesting dry-run JSON files into Diode, updates packaging to expose the script, and enhances project docs.
- Adds
diode-replay-dryrunCLI script (dryrun_replay.py) - Registers the script and includes the
scriptspackage inpyproject.toml, and excludes it from coverage - Updates
README.mdwith usage instructions for the new CLI
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pyproject.toml | Added netboxlabs.diode.scripts to packages, registered diode-replay-dryrun, and excluded scripts from coverage |
| netboxlabs/diode/scripts/dryrun_replay.py | New CLI script to ingest dry-run JSON files into Diode |
| netboxlabs/diode/scripts/init.py | Initialized scripts package with a module docstring |
| README.md | Documented usage of the new diode-replay-dryrun command |
Comments suppressed due to low confidence (3)
netboxlabs/diode/scripts/dryrun_replay.py:3
- [nitpick] The module docstring is minimal; consider adding a short usage example or summary of supported arguments to help future maintainers and users.
"""CLI helper to ingest dry-run JSON messages into Diode."""
netboxlabs/diode/scripts/dryrun_replay.py:1
- The new CLI script lacks any associated tests; consider adding unit or integration tests for argument parsing and error handling to ensure maintainability.
#!/usr/bin/env python
netboxlabs/diode/scripts/init.py:1
- Shebang lines are only needed on executables; consider removing it from the module
__init__.pyto avoid confusion.
#!/usr/bin/env python
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
jajeffries
approved these changes
Jul 9, 2025
mfiedorowicz
approved these changes
Jul 10, 2025
|
🎉 This PR is included in version 1.2.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new CLI tool,
diode-replay-dryrun, to simplify the ingestion of dry-run JSON files into Diode, along with updates to the documentation and project configuration to support this feature. Below are the key changes:New CLI Tool for Dry-Run Ingestion:
dryrun_replay.py, which provides a command-line interface (diode-replay-dryrun) to ingest dry-run JSON messages into a Diode instance. The script supports arguments for specifying the target server, application name, version, OAuth2 credentials, and input files. (netboxlabs/diode/scripts/dryrun_replay.py)Documentation Updates:
README.mdto include instructions for using the newdiode-replay-dryruncommand as an alternative to theload_dryrun_entitiesfunction for ingesting dry-run files. (README.md) [1] [2]Project Configuration Changes:
diode-replay-dryrunscript in the[project.scripts]section ofpyproject.tomlto make it available as a command-line tool. (pyproject.toml)netboxlabs.diode.scriptspackage to the list of included packages inpyproject.toml. (pyproject.toml)netboxlabs/diode/scriptsdirectory from coverage reporting in the test configuration. (pyproject.toml)Miscellaneous:
__init__.pyfile for thenetboxlabs.diode.scriptspackage, including a module docstring and copyright notice. (netboxlabs/diode/scripts/__init__.py)