Skip to content

refactor: move get settings [part 3] #770

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

Merged
merged 1 commit into from
Sep 20, 2023
Merged

Conversation

glevco
Copy link
Contributor

@glevco glevco commented Sep 4, 2023

Depends on #768

Motivation

Please read the description on #768, this PR is just a follow-up part.

Acceptance Criteria

  • Remove some usages of HathorSettings() from the module level and move it to inside functions/methods
    • For functions, the function just calls the new get_settings()
    • For classes we set self._settings = get_settings() in the class' __init__(), and update all methods to use that new attribute

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@glevco glevco added the refactor label Sep 4, 2023
@glevco glevco self-assigned this Sep 4, 2023
@glevco glevco force-pushed the refactor/move-get-settings-3 branch 2 times, most recently from 20aa1ef to f229ce9 Compare September 5, 2023 17:57
@codecov
Copy link

codecov bot commented Sep 5, 2023

Codecov Report

Patch coverage: 92.46% and project coverage change: -0.07% ⚠️

Comparison is base (dbeaa9e) 84.75% compared to head (57e3d00) 84.69%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #770      +/-   ##
==========================================
- Coverage   84.75%   84.69%   -0.07%     
==========================================
  Files         259      259              
  Lines       21933    21939       +6     
  Branches     2964     2964              
==========================================
- Hits        18590    18581       -9     
- Misses       2700     2709       +9     
- Partials      643      649       +6     
Files Changed Coverage Δ
hathor/consensus/context.py 100.00% <ø> (ø)
hathor/indexes/rocksdb_height_index.py 94.11% <ø> (-0.12%) ⬇️
hathor/merged_mining/coordinator.py 34.02% <ø> (-0.19%) ⬇️
hathor/mining/ws.py 50.00% <ø> (-0.71%) ⬇️
hathor/transaction/storage/tx_allow_scope.py 92.85% <ø> (-0.48%) ⬇️
hathor/wallet/resources/thin_wallet/send_tokens.py 68.51% <40.00%> (ø)
hathor/consensus/block_consensus.py 94.36% <57.14%> (ø)
hathor/graphviz.py 77.02% <66.66%> (ø)
hathor/transaction/resources/utxo_search.py 82.69% <66.66%> (ø)
hathor/p2p/states/hello.py 72.27% <80.00%> (+0.27%) ⬆️
... and 30 more

... and 4 files with indirect coverage changes

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

@glevco glevco marked this pull request as ready for review September 5, 2023 19:23
msbrogli
msbrogli previously approved these changes Sep 6, 2023
jansegre
jansegre previously approved these changes Sep 8, 2023
@glevco glevco force-pushed the refactor/move-get-settings-1 branch from 6cf7be9 to def3c1c Compare September 11, 2023 00:15
@glevco glevco force-pushed the refactor/move-get-settings-3 branch from f229ce9 to e2afcd9 Compare September 11, 2023 01:13
@glevco glevco force-pushed the refactor/move-get-settings-1 branch from def3c1c to 5837030 Compare September 11, 2023 15:46
@glevco glevco force-pushed the refactor/move-get-settings-3 branch 2 times, most recently from 6e3f409 to 1c3a4c3 Compare September 11, 2023 16:08
@glevco glevco force-pushed the refactor/move-get-settings-1 branch from d6e19ea to ac0a152 Compare September 11, 2023 19:26
@glevco glevco force-pushed the refactor/move-get-settings-3 branch from 1c3a4c3 to 49618ab Compare September 11, 2023 19:37
@glevco glevco force-pushed the refactor/move-get-settings-1 branch from ac0a152 to 2404c82 Compare September 12, 2023 04:19
@glevco glevco force-pushed the refactor/move-get-settings-3 branch from 49618ab to d7a774d Compare September 12, 2023 04:20
Base automatically changed from refactor/move-get-settings-1 to master September 12, 2023 20:39
@glevco glevco dismissed stale reviews from jansegre and msbrogli September 12, 2023 20:39

The base branch was changed.

@glevco glevco force-pushed the refactor/move-get-settings-3 branch from d7a774d to 646262f Compare September 12, 2023 20:40
@glevco glevco force-pushed the refactor/move-get-settings-3 branch from 646262f to 57e3d00 Compare September 19, 2023 17:02
@glevco glevco merged commit 3794dd5 into master Sep 20, 2023
@glevco glevco deleted the refactor/move-get-settings-3 branch September 20, 2023 14:52
@jansegre jansegre mentioned this pull request Oct 17, 2023
2 tasks
@jansegre jansegre mentioned this pull request Oct 23, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants