chore(settings): deprecate and remove module based settings#942
Open
chore(settings): deprecate and remove module based settings#942
Conversation
1 task
69d0def to
dbc7a21
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #942 +/- ##
==========================================
+ Coverage 85.32% 85.43% +0.11%
==========================================
Files 290 287 -3
Lines 22477 22450 -27
Branches 3380 3379 -1
==========================================
+ Hits 19179 19181 +2
+ Misses 2626 2606 -20
+ Partials 672 663 -9 ☔ View full report in Codecov by Sentry. |
pedroferreira1
approved these changes
Feb 8, 2024
| Returns the configuration named tuple. | ||
|
|
||
| Tries to get the configuration from a python module in the 'HATHOR_CONFIG_FILE' env var, which will be deprecated. | ||
| If not found, tries to get it from a yaml filepath in the 'HATHOR_YAML_CONFIG', which will be the new standard. |
Member
There was a problem hiding this comment.
Suggested change
| If not found, tries to get it from a yaml filepath in the 'HATHOR_YAML_CONFIG', which will be the new standard. | |
| Gets the configuration from a yaml filepath in the 'HATHOR_YAML_CONFIG'. | |
| Before it, tries to get from a python module, which was deprecated, and throws a RuntimeError in case it's found. |
eb416fa to
21d7909
Compare
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
Using
HATHOR_CONFIG_FILEhas been deprecated in favor ofHATHOR_CONFIG_YAMLfor a while now. I feel like it's time to remove it.Acceptance Criteria
HATHOR_CONFIG_FILEis used and fail loading the settings (this will fail very early on when running any command);hathor/conf/get_settings.pynow that it only has to load YAML settings;hathor/conf/mainnet.py,hathor/conf/testnet.pyandhathor/conf/unittests.py;tests/others/test_hathor_settings.py;tests/resources/p2p/test_status.py(it was still using module settings to get genesis hashes).Checklist
master, confirm this code is production-ready and can be included in future releases as soon as it gets merged