hathor-core
hathor-core copied to clipboard
chore(settings): deprecate and remove module based settings
Motivation
Using HATHOR_CONFIG_FILE has been deprecated in favor of HATHOR_CONFIG_YAML for a while now. I feel like it's time to remove it.
Acceptance Criteria
- Log a "critical" error when
HATHOR_CONFIG_FILEis used and fail loading the settings (this will fail very early on when running any command); - Clean up
hathor/conf/get_settings.pynow that it only has to load YAML settings; - Remove
hathor/conf/mainnet.py,hathor/conf/testnet.pyandhathor/conf/unittests.py; - Remove module settings tests from
tests/others/test_hathor_settings.py; - Fix
tests/resources/p2p/test_status.py(it was still using module settings to get genesis hashes).
Checklist
- [x] 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
Codecov Report
Attention: 3 lines in your changes are missing coverage. Please review.
Comparison is base (
8b13de7) 85.32% compared to head (dbc7a21) 85.43%.
| Files | Patch % | Lines |
|---|---|---|
| hathor/conf/get_settings.py | 40.00% | 3 Missing :warning: |
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
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.