Skip to content

Modernize Python package management to use pyproject.toml and uv#1124

Merged
tushuhei merged 7 commits intomainfrom
modernize-python-package-management-13276904844649221747
Feb 5, 2026
Merged

Modernize Python package management to use pyproject.toml and uv#1124
tushuhei merged 7 commits intomainfrom
modernize-python-package-management-13276904844649221747

Conversation

@tushuhei
Copy link
Member

@tushuhei tushuhei commented Feb 5, 2026

Updated the repository to use modern Python package management standards.

Key changes:

  1. Migration to pyproject.toml: All package metadata, build system requirements, and dependencies have been moved to pyproject.toml.
  2. uv Support: Added [dependency-groups] to support the uv package manager for development and testing.
  3. Cleanup: Removed setup.py, setup.cfg, and MANIFEST.in.
  4. Data Files: Ensured all necessary data files (models/*.json, skip_nodes.json, py.typed, unicode_blocks.json) are correctly included via [tool.setuptools.package-data].

Tests (both unit tests and JAX-based trainer tests) have been verified to pass using uv run pytest.


PR created automatically by Jules for task 13276904844649221747 started by @tushuhei

- Migrated metadata from setup.cfg and setup.py to pyproject.toml.
- Added support for uv via [dependency-groups].
- Updated Python version support to >= 3.8 for the library.
- Used environment markers for development-only dependencies like JAX and mypy to ensure library standalone compatibility.
- Updated resource loading in budoux/main.py to use standard library importlib.resources where available.
- Removed legacy configuration files: setup.cfg, setup.py, and MANIFEST.in.

Co-authored-by: tushuhei <734905+tushuhei@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules bot and others added 6 commits February 5, 2026 01:49
- Added .flake8 to correctly configure style checks for 2-space indentation (since flake8 doesn't support pyproject.toml natively).
- Fixed an incompatible type hint in budoux/main.py (Traversable vs Path).
- Removed an unused import (pathlib.Path) in budoux/main.py.
- Applied yapf reformatting to budoux/main.py.
- Updated .flake8 to exclude .venv and other build directories.
- Cleaned up redundant tool configuration in pyproject.toml.

Co-authored-by: tushuhei <734905+tushuhei@users.noreply.github.com>
- Set requires-python = ">=3.10" in pyproject.toml.
- Removed importlib-resources dependency.
- Simplified budoux/main.py to use standard library importlib.resources directly.
- Added .flake8 to maintain style rules for 2-space indentation.
- Migrated all metadata and tool configurations to pyproject.toml where supported.
- Cleaned up legacy setup.py, setup.cfg, and MANIFEST.in.

Co-authored-by: tushuhei <734905+tushuhei@users.noreply.github.com>
- Migrated to pyproject.toml and removed legacy configuration files.
- Dropped support for Python 3.8 and 3.9 (requires-python = ">=3.10").
- Simplified budoux/main.py to use standard library importlib.resources.
- Refined types in budoux/main.py to use Traversable instead of Any.
- Relaxed dependency version pins for better compatibility.
- Added .flake8 to maintain project style rules.
- Ensured all available data files are included in the package.

Co-authored-by: tushuhei <734905+tushuhei@users.noreply.github.com>
- Migrated to pyproject.toml and removed setup.py/setup.cfg/MANIFEST.in.
- Dropped Python 3.8/3.9 support.
- Integrated with uv via [dependency-groups].
- Simplified resource loading in budoux/main.py using open() directly.
- Maintained simple typing with Any for resource objects as requested.
- Added .flake8 for style consistency.

Co-authored-by: tushuhei <734905+tushuhei@users.noreply.github.com>
@tushuhei tushuhei requested a review from kojiishi February 5, 2026 03:24
Copy link
Collaborator

@kojiishi kojiishi left a comment

Choose a reason for hiding this comment

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

LGTM

@tushuhei tushuhei merged commit 6b6e52f into main Feb 5, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants