lowRISC / lowRISC/opentitan

Orchestrator python argument parsing uses redundant options

Open
#28,886 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

Nit: (on original PR, not backport code) - You don't need `default=False` for an argparse argument with `action="store_true"`. See the [docs](https://docs.python.org/3/library/argparse.html#action):

> `'store_true'` and `'store_false'` - These are special cases of `'store_const'` that respectively store the values `True` and `False` with default values of `False` and `True`:

Looking at the orchestrator, it seems like this is repeated for many fields here.

_Originally posted by @AlexJones0 in https://github.com/lowRISC/opentitan/pull/28878#discussion_r2592043768_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the orchestrator's argparse argument definitions and review fields using action="store_true" with an explicit default=False. Remove the redundant options consistently, then verify that the parser behavior remains unchanged using any existing orchestrator tests or parser checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.