NCAR / NCAR/MechanismConfiguration
Add `write()` export
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1
- Forks
- 3
- Avg merge
- 9h 30m
- Merged PRs (30d)
- 4
Description
See #268. Add include/mechanism_configuration/exporter.hpp.
Acceptance criteria
void write(const Mechanism&, const std::filesystem::path&)compiles.yamlproduces YAML;.jsonproduces JSON; unknown suffix is an error- Round-trip:
parse(path)thenwrite(out)thenparse(out)produces equalMechanism
Ideas
- Unknown suffix must error; silent wrong-format output is worse than a clear error
- might have to do some tricks to emit json, but seems possible?
Contributor guide
No contributing guide indexed for this repository
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
Read #268 and inspect the existing parse(path) behavior before starting in include/mechanism_configuration/exporter.hpp. Implement the requested write(const Mechanism&, const std::filesystem::path&) interface, then verify YAML and JSON output, unknown-suffix errors, and the parse/write/parse round-trip acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100