Skip to content

Conversation

@machshev
Copy link
Collaborator

@machshev machshev commented Nov 19, 2025

To help developing DVSim report templates, add a command that can generate reports from the JSON data of a previous run.

  • Move the existing argparse cli.py -> cli/run.py
  • Create a new click based shim which wraps the existing CLI
  • Create a report generation sub command

Update
Tried using a click shim and initially it seemed to work, but the existing dvsim cli has a positional argument (the hjson config) which makes the parsing unreliable. I can't get it to work with click and argparse mix without bumping the existing dvsim cli to a sub command e.g. dvsim --> dvsim run.

  • Create admin CLI
  • Create new entry point

Reverting to the original idea of creating a separate dvsim-admin click CLI. This can be easily merged back in in the future if we make the CLI breaking change.

Fixes: #59

@machshev machshev changed the title Report cli Report cli with report gen from historic data Nov 19, 2025
@machshev machshev marked this pull request as ready for review November 19, 2025 16:44
@machshev machshev marked this pull request as draft November 20, 2025 09:44
@machshev machshev marked this pull request as ready for review November 20, 2025 10:49
@@ -1,5 +1,5 @@
version = 1
revision = 3
revision = 2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the revision number went backward?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question, probably another PR did a UV lock and got in before this I one.
I can rebase on master and relock in this PR.

It should be fine either way though.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have noticed the same here https://github.com/lowRISC/dvsim/pull/64/files

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's the UV lock format version. So my guess is the version of UV being used in some of the branches is slightly older.

It shouldn't make a difference either way. But I'll rebase and relock and see if that keeps the version the same.

This file is auto-generated by the UV tool. There are no manual changes in it. The changes that drive lock file changes are either:

  • changing dependencies pyproject.toml
  • relocking with later versions - which we should be doing periodically anyway.

The UV.lock format is internal to the tool.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried rebasing and relocking, also nix flake update. It still seems to like revision 2 using the locked nix devshell version of uv. It might be that previously I somehow locked with a later version?

Given this is an internal file format and it is still functional, I'm going to merge this as it is.

Signed-off-by: James McCorrie <[email protected]>
@machshev machshev added this pull request to the merge queue Nov 21, 2025
Merged via the queue into lowRISC:master with commit 8ed6cb3 Nov 21, 2025
6 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.

Regenerate reports from JSON

3 participants