Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move insert_or_update_node/5 from khepri_machine to khepri_tree #187

Merged
merged 1 commit into from
Mar 20, 2023

Conversation

the-mikedavis
Copy link
Member

This change completes the migration started in #184 which moved functions that acted on the tree structure from khepri_machine to khepri_tree. With this change, the tree structure can be created and modified without interacting with the machine state. The implementation of insert_or_update_node/5 is extracted to khepri_tree without changes except that the creation of side-effects and the reorganizing of the return value now live separately in khepri_machine.

This also allows us to remove a few function exports from khepri_tree which were either being called by insert_or_update_node/5 or were only used internally to khepri_tree.

This change completes the migration started in 2ebf1cc which moved
functions that acted on the tree structure from 'khepri_machine' to
'khepri_tree'. With this change, the tree structure can be created and
modified without interacting with the machine state. The implementation
of 'insert_or_update_node/5' is extracted to 'khepri_tree' without
changes except that the creation of side-effects and the reorganizing
of the return value now live separately in 'khepri_machine'.

This also allows us to remove a few function exports from 'khepri_tree'
which were either being called by 'insert_or_update_node/5' or were
only used internally to 'khepri_tree'.
@the-mikedavis the-mikedavis added the enhancement New feature or request label Mar 15, 2023
@the-mikedavis the-mikedavis added this to the v0.7.0 milestone Mar 15, 2023
@the-mikedavis the-mikedavis self-assigned this Mar 15, 2023
@codecov
Copy link

codecov bot commented Mar 15, 2023

Codecov Report

Patch coverage: 96.36% and project coverage change: +0.11 🎉

Comparison is base (cd1fbd5) 90.95% compared to head (bb6fd48) 91.07%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #187      +/-   ##
==========================================
+ Coverage   90.95%   91.07%   +0.11%     
==========================================
  Files          20       20              
  Lines        3495     3494       -1     
==========================================
+ Hits         3179     3182       +3     
+ Misses        316      312       -4     
Flag Coverage Δ
erlang-24 89.46% <96.36%> (-0.01%) ⬇️
erlang-25 89.66% <96.36%> (+0.25%) ⬆️
erlang-26.0-rc1 88.46% <96.36%> (+0.08%) ⬆️
os-ubuntu-latest 91.01% <96.36%> (+0.05%) ⬆️
os-windows-latest 89.66% <96.36%> (+0.31%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/khepri_tree.erl 94.01% <96.29%> (+0.35%) ⬆️
src/khepri_machine.erl 95.35% <100.00%> (+0.74%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dumbbell dumbbell merged commit d23df59 into main Mar 20, 2023
@dumbbell dumbbell deleted the md-migrate-insert_or_update_node/5-to-khepri-tree branch March 20, 2023 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants