test: reorganize tests into logical directory structure#199
Merged
astrogilda merged 8 commits intomainfrom Jul 7, 2025
Merged
Conversation
Fixed VAR (Vector Autoregression) model data shape issues in multiple components: - TimeSeriesModelSklearn: Removed incorrect transpose for VAR data, now correctly passes (n_obs, n_vars) to backend - BackendToStatsmodelsAdapter: Updated forecast method to properly handle VAR model parameters - test_backend_feature_coverage.py: Fixed VAR test data preparation to use correct shape All VAR models now consistently expect data in (n_obs, n_vars) format throughout the codebase.
- Remove test_tsfit_compatibility that tried to import non-existent TSFit - Replace with test_tsfitbestlag_compatibility that tests deprecation warning - TSFitBestLag is now a deprecated subclass of AutoOrderSelector, not an alias - Test verifies deprecation warning is shown and functionality still works
- Remove TSFitBestLag class entirely from codebase - Update all imports to use AutoOrderSelector directly - Remove deprecation warnings and documentation mentions - Update tests to use AutoOrderSelector instead of TSFitBestLag - Clean up __all__ exports in __init__.py files The AutoOrderSelector class provides the same functionality without the legacy naming. This completes the removal of all TSFit-related code from the codebase.
…folder - Move AutoOrderSelector from model_selection/best_lag.py to utils/auto_order_selector.py - Remove empty model_selection folder entirely - Update all imports to use new location - Rename test_best_lag.py to test_auto_order_selector_legacy.py for clarity - Export AutoOrderSelector from utils/__init__.py - Fix all patch statements in tests to use new import path This simplifies the project structure by removing a folder that contained only one file with a confusing name (best_lag.py).
This commit improves documentation throughout the codebase and completes the migration to the new high-performance backend system. Backend Migration: - Remove deprecated TSFit classes and references - Clean up legacy code paths - Remove obsolete analysis documentation Documentation Improvements: - Update docstrings across 37 files for better clarity - Add detailed explanations of design decisions - Include practical examples and usage patterns - Improve error messages for better debugging - Remove internal references inappropriate for public repository Code Quality: - Enhanced type annotations in type system modules - Improved protocol definitions for backend system - Better documented service architecture - Clearer validation error messages This ensures the codebase has consistent, high-quality documentation that helps users understand both functionality and design rationale.
…uplicates - Move test_rescaling_service.py from test_services/ to tests/ root - Remove duplicate ValidationService tests from test_services.py - Keep comprehensive ValidationService tests in test_validation_service.py
- Set ruff target-version to py39 to prevent 3.10+ syntax - Add ignore rules for UP (pyupgrade) rules that would introduce 3.10+ syntax: - UP007: Use X | Y for type annotations (3.10+ only) - UP038: Use X | Y in isinstance (3.10+ only) - UP040: Type alias should use TypeAlias (3.10+ only) - UP045: Use X | None for type annotations (3.10+ only) - This ensures all code remains compatible with Python 3.9
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #199 +/- ##
==========================================
+ Coverage 45.66% 46.57% +0.90%
==========================================
Files 61 59 -2
Lines 6223 6038 -185
==========================================
- Hits 2842 2812 -30
+ Misses 3381 3226 -155 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.




Description
This PR reorganizes the test suite into a more logical and maintainable directory structure, following standard testing patterns.
Changes
Test Directory Reorganization
tests/unit/- Unit tests for individual componentstests/integration/- Integration tests for component interactionstests/compatibility/- Compatibility tests for dependencies and sklearnFile Movements
unit/backends/)test_phase1_feature_parity.pytotest_backend_compatibility.pyfor clarityDocumentation Updates
Additional Improvements
__init__.pyfiles to all test directoriestests/README.mdexplaining the test structureTesting
pytest tests/unit/pytest tests/integration/pytest tests/compatibility/pytestBackward Compatibility
This PR only reorganizes test files and does not change any source code functionality. All tests continue to pass with the same coverage.
Related Issues
Part of the ongoing effort to improve code organization and maintainability.