Repository navigation
feat: group python version by minor - #24
Merged
psincraian merged 2 commits intoNov 15, 2025
Merged
psincraian merged 2 commits into
psincraian merged 2 commits into
Conversation
Modified Python version analytics to group by minor version (e.g., 3.14) instead of patch version (e.g., 3.14.1, 3.14.2) for cleaner dashboard metrics. Changes: - Updated get_python_version_distribution() to extract and group by major.minor - Updated get_unique_python_versions_count() to count unique minor versions - Updated get_unique_users_by_dimension() to handle python_version dimension with minor version grouping Uses PostgreSQL regexp_replace to extract "3.14" from versions like "3.14.1", "3.14.2", etc.
Added support for both PostgreSQL and SQLite databases in Python version minor version extraction logic. This allows tests to run on SQLite while production uses PostgreSQL. Changes: - Added _extract_minor_version() helper method in AnalyticsEventRepository - PostgreSQL: Uses regexp_replace for version extraction - SQLite: Uses substr/instr for version extraction - Updated get_python_version_distribution() to use helper method - Updated get_unique_python_versions_count() to use helper method - Updated get_unique_users_by_dimension() to use helper method - Added comprehensive test suite in test_python_version_grouping.py - Tests version distribution grouping - Tests unique version counting - Tests user grouping by version - Tests edge case of already-minor versions All tests pass, linting clean, type checking passes.
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.
No description provided.