Skip to content

feat: add diode-replay-dryrun helper - #54

Merged
leoparente merged 6 commits into
developfrom
feat/OBS-1220-dry-run-ingest
Jul 10, 2025
Merged

feat: add diode-replay-dryrun helper#54
leoparente merged 6 commits into
developfrom
feat/OBS-1220-dry-run-ingest

Conversation

@leoparente

Copy link
Copy Markdown
Contributor

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:

  • Added a new script, 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:

  • Updated the README.md to include instructions for using the new diode-replay-dryrun command as an alternative to the load_dryrun_entities function for ingesting dry-run files. (README.md) [1] [2]

Project Configuration Changes:

  • Registered the diode-replay-dryrun script in the [project.scripts] section of pyproject.toml to make it available as a command-line tool. (pyproject.toml)
  • Added the netboxlabs.diode.scripts package to the list of included packages in pyproject.toml. (pyproject.toml)
  • Excluded the netboxlabs/diode/scripts directory from coverage reporting in the test configuration. (pyproject.toml)

Miscellaneous:

  • Added an __init__.py file for the netboxlabs.diode.scripts package, including a module docstring and copyright notice. (netboxlabs/diode/scripts/__init__.py)

@leoparente
leoparente requested a review from Copilot July 9, 2025 12:39
@leoparente leoparente self-assigned this Jul 9, 2025
@github-actions github-actions Bot added dependencies Pull requests that update a dependency file markdown python labels Jul 9, 2025
@github-actions

github-actions Bot commented Jul 9, 2025

Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissCoverMissing
/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/netboxlabs/diode/sdk
   client.py240797%102, 277, 337, 342, 346, 402, 430
TOTAL274797% 

Tests Skipped Failures Errors Time
97 0 💤 0 ❌ 0 🔥 1.115s ⏱️

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 command-line tool for ingesting dry-run JSON files into Diode, updates packaging to expose the script, and enhances project docs.

  • Adds diode-replay-dryrun CLI script (dryrun_replay.py)
  • Registers the script and includes the scripts package in pyproject.toml, and excludes it from coverage
  • Updates README.md with 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__.py to avoid confusion.
#!/usr/bin/env python

Comment thread netboxlabs/diode/scripts/dryrun_replay.py Outdated
@leoparente leoparente changed the title Feat/obs 1220 dry run ingest feat: add diode-replay-dyrun helper Jul 9, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@leoparente leoparente changed the title feat: add diode-replay-dyrun helper feat: add diode-replay-dryrun helper Jul 10, 2025
@leoparente
leoparente merged commit 85adb8e into develop Jul 10, 2025
6 checks passed
@leoparente
leoparente deleted the feat/OBS-1220-dry-run-ingest branch July 10, 2025 13:08
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file markdown python released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants