Closed yihuang closed 2 months ago
The changes involve restructuring configuration management within the testground/benchmark
project. Key modifications include the introduction of nested dictionaries for configuration patches, the adoption of the jsonmerge
library for merging JSON objects, and updates to functions handling TOML and JSON patching. Additionally, the pyproject.toml
file now includes a dependency on jsonmerge
, enhancing the project's capabilities in managing configuration data.
Files | Change Summary |
---|---|
testground/benchmark/benchmark/peer.py |
Restructured configuration patching logic to use nested dictionaries and updated merging logic using jsonmerge . |
testground/benchmark/benchmark/stateless.py |
Removed JSON parsing logic from _gen function, simplifying code and assuming JSON-compatible input. |
testground/benchmark/benchmark/utils.py |
Removed patch_dict function; updated patch_toml and patch_json functions for improved merging of nested structures. |
testground/benchmark/pyproject.toml |
Added jsonmerge dependency with version constraint ^1.9.2 . |
stateless.py
regarding the handling of configuration patches are related to the restructuring of configuration management in the main PR, as both involve enhancing the flexibility and organization of configuration settings.gen
function in stateless.py
to accept a consolidated options
dictionary align with the main PR's focus on improving configuration management and patching logic, indicating a shared goal of enhancing configurability within the Testground framework.🐰 In the land of code where patches grow,
Nested structures bloom, a lovely show.
Withjsonmerge
now in play,
Configuration dances, bright and gay.
A hop, a skip, to cleaner ways,
Our code now sings in joyful rays! 🌼
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 15.24%. Comparing base (
73c19da
) to head (c6661a7
). Report is 1 commits behind head on main.
Solution:
👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻
PR Checklist:
make
)make test
)go fmt
)golangci-lint run
)go list -json -m all | nancy sleuth
)Thank you for your code, it's appreciated! :)
Summary by CodeRabbit
New Features
jsonmerge
library for more robust JSON merging capabilities.Bug Fixes
Documentation
Chores
jsonmerge
as a new dependency to enhance JSON handling capabilities.