Skip to content

chore: modernize python repository#10

Merged
Ciemaar merged 4 commits intomasterfrom
modernize-python-project-12854738292463353026
Mar 13, 2026
Merged

chore: modernize python repository#10
Ciemaar merged 4 commits intomasterfrom
modernize-python-project-12854738292463353026

Conversation

@Ciemaar
Copy link
Owner

@Ciemaar Ciemaar commented Mar 13, 2026

Modernizes the Python repository by centralizing configurations into pyproject.toml and adopting an src/ layout.

  • Uses the standard src/ layout.
  • Removes outdated setup.py and requirements.txt scripts.
  • Adds CLI migration using click in the mythica example model script.
  • Correctly configures tooling (tox, pytest, mypy, ruff, mdformat) centrally within the pyproject.toml definition.
  • Fixes type hints utilizing modern built-in syntaxes avoiding typing.Any or typing.Union.
  • Sets up robust Github Actions and .pre-commit-config.yaml to enforce strict formatting, typing, and local pytest validation natively.

PR created automatically by Jules for task 12854738292463353026 started by @Ciemaar

- Move source files to `src/` layout.
- Remove `setup.py` and `requirements.txt`.
- Centralize all configurations, including `tox`, `ruff`, and `mypy` within `pyproject.toml`.
- Configure testing, linting, and documentation tools in the `dev` optional dependency group.
- Migrate CLI usage in `examples/mythica/model.py` from `argparse` to `click`.
- Use correct pipe operator for unions and fix type hints inside the source code without using `Any`.
- Update Github Actions workflow to include linting, type checks, and formatting verification.
- Update pre-commit hook configs to use format, type checking and local tox testing.

Co-authored-by: Ciemaar <1388496+Ciemaar@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.

- Move source files to `src/` layout.
- Remove `setup.py` and `requirements.txt`.
- Centralize all configurations, including `tox`, `ruff`, and `mypy` within `pyproject.toml`.
- Configure testing, linting, and documentation tools in the `dev` optional dependency group.
- Migrate CLI usage in `examples/mythica/model.py` from `argparse` to `click`.
- Use correct pipe operator for unions and fix type hints inside the source code without using `Any`.
- Update Github Actions workflow to include linting, type checks, and formatting verification.
- Update pre-commit hook configs to use format, type checking and local tox testing.

Co-authored-by: Ciemaar <1388496+Ciemaar@users.noreply.github.com>
google-labs-jules bot and others added 2 commits March 13, 2026 11:51
As requested in code review, this relaxes the dependencies specified in `pyproject.toml` by removing strict pin versions (e.g., `>=8.0.0` or `>=2.0.0`). Because this repository is intended as a library, dependencies should be left as unpinned as reasonably possible so that dependent projects do not suffer from version collision issues.

Co-authored-by: Ciemaar <1388496+Ciemaar@users.noreply.github.com>
Enables 'W' (pycodestyle warnings) and 'I' (isort) rules in ruff configuration per PR review request and runs `ruff check --fix` to correctly sort imports across `src` and `test` directories.

Co-authored-by: Ciemaar <1388496+Ciemaar@users.noreply.github.com>
@Ciemaar Ciemaar marked this pull request as ready for review March 13, 2026 12:17
@Ciemaar Ciemaar merged commit c2b273c into master Mar 13, 2026
4 of 5 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.

1 participant