Merged
Conversation
bb9b38c to
126309d
Compare
1 task
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #768 +/- ##
==========================================
- Coverage 84.74% 84.71% -0.04%
==========================================
Files 259 259
Lines 21940 21933 -7
Branches 2964 2964
==========================================
- Hits 18594 18580 -14
- Misses 2700 2708 +8
+ Partials 646 645 -1
☔ View full report in Codecov by Sentry. |
1 task
jansegre
previously approved these changes
Sep 5, 2023
msbrogli
previously approved these changes
Sep 6, 2023
msbrogli
reviewed
Sep 6, 2023
def3c1c to
5837030
Compare
msbrogli
approved these changes
Sep 11, 2023
jansegre
approved these changes
Sep 11, 2023
d6e19ea to
ac0a152
Compare
ac0a152 to
2404c82
Compare
This was referenced Oct 17, 2023
Merged
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
This PR is the first on of a series of PRs focused on improving settings handling in the project, aiming to remove "global settings" that often cause importing order problems and limit varying settings for tests.
Those improvements will be made in two phases:
HathorSettings()function toget_settings()and removing all invocations from module-level, moving them to inside functions/methods. This will be done incrementally in multiple PRs, and this PR is part 1 of that.Eventually the objective is that
get_settings()is only called once in the whole system, and then injected as arguments on all objects/functions that need it.In this PR, changes are very simple, code is mostly just renamed and the function call is moved. No logic should be changed. The only exceptions are changes to conform to linters and such.
Acceptance Criteria
get_settings()function that is just a forward ofHathorSettings(). This is just so we can do an "incremental rename" without having to touch all code that usesHathorSettings()at once. When it's done,HathorSettings()will be removed.HathorSettings()from the module level and move it to inside functions/methodsget_settings()self._settings = get_settings()in the class'__init__(), and update all methods to use that new attributeChecklist
master, confirm this code is production-ready and can be included in future releases as soon as it gets merged