Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Refactor to allow overriding `settings.toml` options directly from CLI

Open
#1,284 0 comments 0 reactions 1 assignee View on GitHub

@alexdewar is already working on this.

Since Jun 16, 2026.

Assessment

This issue has not been assessed yet.

Description

There are a couple of program options (viz. overwrite and debug_model) which can be set either in settings.toml or with command-line arguments with the latter taking precedence. With the way it's currently implemented, you need to update both the code in two places to add an option like this, which is annoying and bugprone (it would be easy to get the "CLI setting takes precedence" code wrong). It would be nice if we could just set them in one place.

The first thing that comes to mind is that we could just have a single struct representing these options. Both the clap crate (which we use for the CLI) and serde (reading TOML files) provide options for "flattening" structs that are members of other structs, so maybe we can do something this way? This will still involve figuring out how to combine the CLI options with the ones in settings.toml though. Dunno. Maybe worth trying!

We could use proc macros for this too, but that will probably be a pain.

Dominant language
Rust
Stars
8
Forks
5
Avg merge
11h 31m
Merged PRs (30d)
33

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.

More from EnergySystemsModellingLab/MUSE2

All issues in EnergySystemsModellingLab/MUSE2

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.