updated test_switch to align with dependencies #173
Merged
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.
Pull Request Template
Description
This pull request introduces essential updates to the
dependencies.py
andtest_switch.py
modules to enhance dependency management and streamline the testing process within the project. The primary changes include:Refactored
dependencies.py
:BaseModel
andfield_validator
, eliminating the need for external validation mechanisms. This ensures robust input validation while maintaining a lean codebase.SeverityEnum
: Utilized Python'sEnum
to define allowable severity levels (ERROR
,WARNING
,NONE
), reducing the risk of typos and enhancing code clarity.__author__
list to include "astrogilda" alongside "fkiraly" to acknowledge contributions.Updated
test_switch.py
:dependencies.py
: Replaced the old_check_estimator_deps
function with the newcheck_estimator_dependencies
function to maintain consistency.check_estimator_dependencies
function, eliminating the need for internal helper functions.__author__
list to include "astrogilda" for proper credit.These enhancements collectively improve the robustness, readability, and maintainability of the dependency management and testing utilities within the project, ensuring seamless integration and scalability.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
The changes have been thoroughly tested to ensure functionality and compatibility:
test_switch.py
to verify that therun_test_for_class
function correctly determines whether to run tests based on dependency checks.Checklist:
Additional Information (if applicable)
BaseModel
andfield_validator
for inline validation, ensuring compatibility with the latest Pydantic version and enhancing input validation robustness.str
andSeverityEnum
usingfield_validator
and suppressing false positives where necessary with# type: ignore
.logging
module, allowing for better integration with different logging configurations in various environments.test_switch.py
is fully aligned with the updateddependencies.py
, maintaining consistency across modules and reducing potential integration issues.Add All Contributors Command
Remember to acknowledge your contributions, replace
contribution_type
with your contribution (code, doc, etc.):