Improve the configuration loading
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13
- Forks
- 21
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 8
Description
The configuration loading stage within DVSim is probably the most fragile part of DVSim. Small changes often result in unexpected behaviour. It's difficult to work out what fields are required as there is no clear schema.
There is a wildcard mechanism which allows internal reference to other configuration fields, environment variables, and embedded shell commands (`"{eval_cmd} git status"`). Due to #17 the evaluation of these wildcards is not commutative, so the evaluation order matters (ideally we would remove shell evaluations from the HJSON).
Proposed improvements:
- [ ] Add unit tests to capture the existing behaviours
- [ ] Separate the configuration loading to an independent stage.
- [ ] Evaluate the wildcards as early as possible in the flow.
- [ ] Introduce a clear schema for the config format - using pydantic to validate the config file format.
Several attempts have been made at refactoring DVSim and the configuration loading mechanism is generally where regressions are inadvertently introduced.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining DVSim's current configuration-loading flow and the existing unit-test coverage. Document the observed wildcard behavior, including references, environment variables, and embedded shell commands, before assessing separation, evaluation order, and pydantic schema validation. Done means the existing behavior is captured and the proposed loading and validation stages are defined without regressions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100