Skip to content

add uv and ruff support#182

Merged
soumendrak merged 7 commits intomainfrom
uv
Jun 28, 2025
Merged

add uv and ruff support#182
soumendrak merged 7 commits intomainfrom
uv

Conversation

@soumendrak
Copy link
Owner

No description provided.

@soumendrak soumendrak requested a review from Copilot June 28, 2025 12:25
@soumendrak soumendrak self-assigned this Jun 28, 2025
@soumendrak soumendrak added the enhancement New feature or request label Jun 28, 2025

This comment was marked as outdated.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 28, 2025

Deploying openodia with  Cloudflare Pages  Cloudflare Pages

Latest commit: bcc4923
Status:🚫  Build failed.

View logs

…ctionality and update dependencies in pyproject.toml and uv.lock
@codecov
Copy link

codecov bot commented Jun 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.49%. Comparing base (c02dc25) to head (bcc4923).
Report is 8 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #182      +/-   ##
==========================================
+ Coverage   97.01%   99.49%   +2.48%     
==========================================
  Files           9        9              
  Lines         201      199       -2     
==========================================
+ Hits          195      198       +3     
+ Misses          6        1       -5     
Flag Coverage Δ
pytest 99.49% <100.00%> (+2.48%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
openodia/__init__.py 100.00% <100.00%> (ø)
openodia/_odianames.py 100.00% <100.00%> (ø)
openodia/_summarization.py 98.30% <100.00%> (+4.97%) ⬆️
openodia/_translate.py 100.00% <100.00%> (ø)
openodia/_understandData.py 100.00% <100.00%> (+6.66%) ⬆️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c02dc25...bcc4923. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Introduced tests for corpus module initialization in `test_corpus_init.py`
- Expanded dictionary module tests in `test_dictionary.py` to cover various scenarios
- Added edge case tests in `test_edge_cases.py` for error handling across the library
- Created initialization tests for the main module in `test_init.py`
- Enhanced letter tests in `test_letters.py` with additional cases
- Implemented main module tests in `test_main.py` to verify CLI functionality
- Extended odianames tests in `test_odianames.py` for name generation edge cases
- Improved summarization tests in `test_summarization.py` for word frequency analysis
- Added comprehensive tests for UnderstandData module in `test_understandData.py`
- Introduced utility module tests in `test_utility.py` to validate logging configuration
@soumendrak soumendrak requested a review from Copilot June 28, 2025 13:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request migrates the project from Poetry to uv and introduces ruff for linting and formatting. Key changes include updating the dependency management configuration in pyproject.toml, revising CI/CD workflows to use uv, and replacing the googletrans API with deep_translator in the translation module.

Reviewed Changes

Copilot reviewed 27 out of 29 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pyproject.toml Updated project metadata, dependencies, and added ruff configuration for linting.
openodia/_translate.py Replaced googletrans translation with deep_translator’s GoogleTranslator implementation.
openodia/_odianames.py Adjusted error logging message in generate_firstnames for consistency.
.pre-commit-config.yaml Added ruff hooks for linting and formatting.
tests/test_utility.py Minor improvements in logger test assertions.
Various GitHub workflows and docs Updated CI/CD workflows and documentation to reflect migration from Poetry to uv.
Comments suppressed due to low confidence (4)

pyproject.toml:62

  • Ensure the build_command change to use uv is intentional and that all CI/CD workflows have been updated to reflect the migration.
build_command = "pip install uv && uv build"

openodia/_translate.py:40

  • Review the change from googletrans to deep_translator; verify that the new translator’s API behavior meets all translation requirements.
    translator = GoogleTranslator(source=source_lang_code, target=destination_lang_code)

openodia/_odianames.py:56

  • [nitpick] Consider removing newline characters in the exception log message for consistency and improved readability.
            LOGGER.exception(f"Invalid {name_type=} provided.\n Please provide one of these {valid_types=}")

tests/test_utility.py:41

  • The assertion 'len(LOGGER.handlers) >= 0' always passes; consider verifying the expected number of handlers to ensure the logger is configured as intended.
        assert len(LOGGER.handlers) >= 0  # Handlers might be on parent logger

language_version: python3.9
repo: https://github.com/ambv/black
rev: 21.12b0
- id: ruff
Copy link

Copilot AI Jun 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Confirm that the specified version of ruff (v0.8.0) is compatible with the project's codebase.

Copilot uses AI. Check for mistakes.
@soumendrak soumendrak merged commit b1ee992 into main Jun 28, 2025
25 of 31 checks passed
@soumendrak soumendrak deleted the uv branch June 28, 2025 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants