Refactor code for improved performance and type safety across multiple modules#190
Merged
soumendrak merged 9 commits intomainfrom Dec 2, 2025
Merged
Refactor code for improved performance and type safety across multiple modules#190soumendrak merged 9 commits intomainfrom
soumendrak merged 9 commits intomainfrom
Conversation
Owner
soumendrak
commented
Dec 2, 2025
- Replace shuffle-and-slice pattern with random.sample in _odianames.py for better performance
- Add zero-division guard in _summarization.py word frequency calculation
- Remove unnecessary list comprehension brackets in set comprehension
- Remove redundant ABC inheritance from WordFrequency class
- Expand static translations dictionary in _translate.py with bidirectional test cases
- Add type hints to word_tokenizer and sentence_tokenizer
…e modules - Replace shuffle-and-slice pattern with random.sample in _odianames.py for better performance - Add zero-division guard in _summarization.py word frequency calculation - Remove unnecessary list comprehension brackets in set comprehension - Remove redundant ABC inheritance from WordFrequency class - Expand static translations dictionary in _translate.py with bidirectional test cases - Add type hints to word_tokenizer and sentence_tokenizer
Deploying openodia with
|
| Latest commit: |
19c886d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://633e6919.openodia.pages.dev |
| Branch Preview URL: | https://enhancements.openodia.pages.dev |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #190 +/- ##
==========================================
- Coverage 99.49% 99.48% -0.02%
==========================================
Files 9 9
Lines 199 193 -6
==========================================
- Hits 198 192 -6
Misses 1 1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
- Format long tuples and dictionaries with proper line breaks in _translate.py - Fix whitespace inconsistencies in _understandData.py - Add blank lines after docstrings in test modules for PEP 8 compliance - Replace single quotes with double quotes for string literals across test files - Remove trailing whitespace and fix indentation in test cases - Improve code readability with consistent formatting in test_constants.py, test_corpus
…workflows and project configuration
…olete encoding declarations - Remove `# -*- coding: utf-8 -*-` encoding declarations (Python 3 default) - Remove shebang line from _summarization.py - Replace `typing.List` with built-in `list` type hint - Replace `typing.Set` with built-in `set` type hint - Replace `typing.Dict` with built-in `dict` type hint - Replace `typing.Tuple` with built-in `tuple` type hint - Replace `typing.Union` with pipe operator `|` for union types - Remove
- Add mkdocs>=1.2.2 for documentation generation - Add mkdocs-git-revision-date-localized-plugin>=0.10.0 for git-based page dates - Add mkdocs-material>=7.3.2 for Material theme support
- Remove numpy>=1.22.3 from project dependencies - Remove unused pytest import from test_corpus_init.py - Remove unused time import from test_edge_cases.py - Remove unused sys import from test_main.py - Reorder imports alphabetically in test files - Remove redundant "r" mode from file open calls (default mode) - Fix variable naming in test_edge_cases.py (summary -> result)
- Add STOPWORDS to __all__ exports in openodia/__init__.py - Remove unused pytest imports from test_constants.py, test_init.py, test_letters.py, and test_main.py - Remove unused mock_open import from test_dictionary.py - Move threading import to top of test_edge_cases.py and reorder imports alphabetically - Add noqa comment for intentional unused import in test_main.py - Rename variable in test_odianames.py to avoid shadowing built-in name
…conflicts in matrix builds
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.