Skip to content

Conversation

@PeterChen13579
Copy link
Collaborator

@PeterChen13579 PeterChen13579 commented Jul 15, 2024

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

@codecov
Copy link

codecov bot commented Jul 15, 2024

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 ⚠️
src/util/newconfig/ObjectView.cpp 85.71% 1 Missing and 3 partials ⚠️
src/util/newconfig/ValueView.cpp 82.60% 0 Missing and 4 partials ⚠️
src/util/newconfig/ValueView.hpp 71.42% 2 Missing and 2 partials ⚠️
src/util/newconfig/ArrayView.hpp 85.00% 0 Missing and 3 partials ⚠️
src/util/newconfig/ConfigValue.hpp 91.17% 0 Missing and 3 partials ⚠️
src/util/newconfig/Array.hpp 87.50% 0 Missing and 1 partial ⚠️
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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@PeterChen13579 PeterChen13579 requested a review from godexsoft July 15, 2024 19:07
Copy link
Collaborator

@godexsoft godexsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice progress. Leaving some improvement ideas 👍

@PeterChen13579
Copy link
Collaborator Author

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

@kuznetsss
Copy link
Collaborator

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

kuznetsss
kuznetsss previously approved these changes Jul 30, 2024
Copy link
Collaborator

@kuznetsss kuznetsss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@PeterChen13579 PeterChen13579 requested a review from godexsoft July 30, 2024 16:48
Copy link
Collaborator

@godexsoft godexsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this is a pretty cool system and i like the implementation 👍
This could be already be shipped but since this is a learning experience for you I'm leaving a few more suggestions and comments.

You can still use [[nodiscard]] more as well as const is missing in many places where it could be added.
It's also good to look for other algorithms than find_if - many times there will be some algo that's a better choice for the job at hand.

Copy link
Collaborator

@godexsoft godexsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes since my last review look good 👍 🚀

@PeterChen13579 PeterChen13579 merged commit 2bd7ac3 into XRPLF:develop Aug 6, 2024
PeterChen13579 added a commit that referenced this pull request Sep 19, 2024
Add constraint + parse json into Config
Second part of refactoring Clio Config; First PR found
[here](#1544)

Steps that are left to implement:
- 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
kuznetsss pushed a commit that referenced this pull request Sep 25, 2024
Add constraint + parse json into Config
Second part of refactoring Clio Config; First PR found
[here](#1544)

Steps that are left to implement:
- 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 added a commit that referenced this pull request Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants