Migrate configuration to Pydantic settings#261
Merged
Conversation
…ER_URL` variable
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #261 +/- ##
===========================================
- Coverage 71.64% 71.64% -0.01%
===========================================
Files 4 4
Lines 261 268 +7
===========================================
+ Hits 187 192 +5
- Misses 74 76 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dmytrotkk
approved these changes
Feb 18, 2026
| STATE_FILEPATH, | ||
| ) | ||
| from configs.web3 import ENDPOINT, MANAGER_CONTRACTS | ||
| from tools.exceptions import NodeNotFoundException |
Contributor
There was a problem hiding this comment.
why configs.web3 module is still present in the repo?
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.
This pull request introduces several important updates to improve configuration management, time handling, and logging throughout the codebase. The main changes include centralizing configuration using the
SkaleSettingsclass, enforcing timezone-aware datetimes, updating logging to better handle sensitive information, and updating dependencies and test fixtures for better consistency and reliability.Configuration and Initialization Improvements:
SkaleSettingsclass, updating initialization ofBountyAgent,init_skale, and related functions to accept asettingsparameter, and centralized settings file paths inconfigs/__init__.py[1] [2] [3] [4] [5] [6] [7].SkaleSettings, ensuring tests use consistent configuration and environment variables [1] [2] [3] [4].Timezone and Date Handling:
datetime.utcnow()anddatetime.utcfromtimestamp()withdatetime.now(timezone.utc)anddatetime.fromtimestamp(..., timezone.utc)across the codebase and tests [1] [2] [3] [4] [5] [6] [7] [8] [9].Logging and Sensitive Data Handling:
sgx_urlandendpointinto file handlers, and updated thecompose_hiding_patternsfunction to dynamically hide sensitive information based on these values [1] [2] [3].Dependency and Environment Updates:
skale.pydependency to version7.12dev2for improved compatibility and features.DEFAULT_GAS_PRICE_WEIto the environment variables and ensured low gas price is used in tests to prevent insufficient funds errors [1] [2].Test and Helper Function Updates:
SkaleManagerinterface [1] [2] [3].These changes collectively improve maintainability, reliability, and security in both production and testing environments.