Provide a config generator
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start from the issue's proposed config template and the hermes::Config values returned by InitDefaultConfig(). Determine how command-line options should override those values and how the output filename should be selected, including the default ./hermes.conf. Done means a generated configuration file contains the populated template and can be written to the requested path.
Written by the indexing model from the issue text.
Description
An outline
#include <regex>
#include <string>
// Create a config template with capitalized VARIABLE_NAMES as placeholders for
// config parameter values
std::string conf_template = R"(
num_devices = NUM_DEVICES;
num_targets = NUM_TARGETS;
capacities_mb = CAPACITIES;
block_sizes_kb = BLOCK_SIZES;
num_slabs = NUM_SLABS;
slab_unit_sizes = {
SLAB_UNIT_SIZES
};
desired_slab_percentages = {
SLAB_PERCENTAGES
};
etc ...
)";
int main() {
// Create a default Config
hermes::Config conf = hermes::InitDefaultConfig();
// Parse command line options and overwrite default Config values with the
// user-supplied values.
// Replace variables in the config template with the values in conf
conf_template = std::regex_replace(conf_template, std::regex("NUM_DEVICES"),
std::to_string(conf.num_devices));
conf_template = std::regex_replace(conf_template, std::regex("NUM_TARGETS"),
std::to_string(conf.num_targets));
// etc.
// Finally, write the final conf_template string to a file. The filename
// should be passed via command line option, with ./hermes.conf as the default
return 0;
}
- Dominant language
- C++
- Stars
- 34
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from HDFGroup/hermes
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Figure is missing on Wiki pageMay be free again @lukemartinlogan claimed this 785 days ago, and no pull request is open. Opendocumentation
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
Similar issues
-
documentation
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
grumpycoders/pcsx-redux#2667 ·
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)Open
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
google/tensorstore#305 ·
-
bug module: copilot
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
MaaAssistantArknights/MaaAssistantArknights#19250 · 2 comments ·
Maintainers usually reply within 1 day