clio icon indicating copy to clipboard operation
clio copied to clipboard

refactor: Clio Config

Open PeterChen13579 opened this issue 1 year ago • 3 comments

Implementation of new config definition + methods + UT

Steps that still need to be implemented:

  • Make ClioConfigDefinition and it's method to be as constexpr as possible
  • Getting User Config file and populating the values in ConfigDefinition while checking for constraints on user values
  • Replacing all the places where we fetch config values (by using config.valueOr/MaybeValue) to instead get it from Config Definition
  • Generate markdown file using Clio Config Description

PeterChen13579 avatar Jul 15 '24 17:07 PeterChen13579

Codecov Report

Attention: Patch coverage is 87.62376% with 25 lines in your changes missing coverage. Please review.

Project coverage is 69.56%. Comparing base (2a74a65) to head (fe84a9c).

Files Patch % Lines
src/util/newconfig/ConfigDefinition.cpp 86.66% 3 Missing and 3 partials :warning:
src/util/newconfig/ObjectView.cpp 85.71% 1 Missing and 3 partials :warning:
src/util/newconfig/ValueView.cpp 82.60% 0 Missing and 4 partials :warning:
src/util/newconfig/ValueView.hpp 71.42% 2 Missing and 2 partials :warning:
src/util/newconfig/ArrayView.hpp 85.00% 0 Missing and 3 partials :warning:
src/util/newconfig/ConfigValue.hpp 91.17% 0 Missing and 3 partials :warning:
src/util/newconfig/Array.hpp 87.50% 0 Missing and 1 partial :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1544      +/-   ##
===========================================
+ Coverage    69.19%   69.56%   +0.37%     
===========================================
  Files          244      254      +10     
  Lines         9702     9904     +202     
  Branches      5384     5466      +82     
===========================================
+ Hits          6713     6890     +177     
- Misses        1589     1595       +6     
- Partials      1400     1419      +19     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jul 15 '24 18:07 codecov[bot]

Thank you for taking the time to review @godexsoft @cindyyan317 🙇

PeterChen13579 avatar Jul 17 '24 03:07 PeterChen13579

There should be also tests for Array, ConfigConstraints (or delete them for now), ConfigDefinition, ConfigValue.

kuznetsss avatar Jul 22 '24 12:07 kuznetsss