Skip to content

Chore/modernize dev tooling#183

Open
BrianWhitneyAI wants to merge 6 commits intomainfrom
chore/modernize-dev-tooling
Open

Chore/modernize dev tooling#183
BrianWhitneyAI wants to merge 6 commits intomainfrom
chore/modernize-dev-tooling

Conversation

@BrianWhitneyAI
Copy link
Copy Markdown
Contributor

@BrianWhitneyAI BrianWhitneyAI commented Mar 30, 2026

Description

This Pr is mostly me experimenting with a new development method and utilizing Claude as much as I can. I was aware that some of our dev tools were out of date so I was doing an ai review of our linting. This led me to the recommendation of Ruff. We have an open ticket for #50 to use Ruff and I thought this might be an opportunity to upgrade. This PR is completely AI generated and all commits and comments were made with Claude as an experiment.

Summary

Three developer tooling improvements to modernize the project's dev workflow:

1. Update pre-commit hook versions
All hooks were significantly out of date. Ran pre-commit autoupdate to bring them current: black 23→26, mypy 1.4→1.19, isort 5.12→8, flake8 6→7, autoflake 2.2→2.3. Also pinned black's target-version to py310–py313 to match requires-python.

2. Move pytest config into pyproject.toml
Test runner arguments were only defined in the Justfile. Added [tool.pytest.ini_options] to pyproject.toml so the config is picked up automatically by any test runner (IDEs, CI, etc.), not just just test.

3. Replace black + isort + flake8 + autoflake with ruff
Consolidates four separate linting/formatting tools into a single ruff hook. Ruff is faster, requires less config, and is now the de facto standard in the Python ecosystem. The [tool.black], [tool.isort], and [tool.flake8] config sections in pyproject.toml are replaced by a single [tool.ruff] block.

Test plan

  • just lint passes (ruff + mypy clean)
  • just test passes (112 tests: 102 passed, 10 xfailed)

🤖 Generated with Claude Code

BrianWhitneyAI and others added 5 commits March 30, 2026 10:42
- Run pre-commit autoupdate (black 23→26, mypy 1.4→1.19, isort 5.12→8, flake8 6→7, autoflake 2.2→2.3)
- Pin black target-version to py310-py313 to match requires-python
- Add E704 to flake8 ignore list (black 26 formats stub defs on one line)
- Auto-reformatted files to match black 26 style

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds [tool.pytest.ini_options] with testpaths and addopts so any
test runner picks up the config automatically. Simplifies the
Justfile test recipe to a plain `pytest` call.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Consolidates four linting/formatting tools into a single ruff hook:
- ruff (linter + import sorter, replaces flake8/isort/autoflake)
- ruff-format (formatter, replaces black)

Removes [tool.black], [tool.isort], and [tool.flake8] config sections
and adds [tool.ruff] with equivalent settings. Dropped ignore rules
that don't exist in ruff (E203, E704, W291, W503).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Removes auto-formatter style changes from Python files to keep the
PR focused on config-only changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Auto-formatting applied by ruff-format to conform to new lint
standards introduced in this branch. No logic changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@BrianWhitneyAI
Copy link
Copy Markdown
Contributor Author

Note on source file changes

The following files were auto-reformatted by ruff-format to conform to the new lint standards introduced in this PR:

  • bioio/array_like_reader.py
  • bioio/bio_image.py
  • bioio/plugins.py
  • bioio/tests/helpers/mock_reader.py
  • bioio/tests/helpers/mock_writer.py

These are purely cosmetic style changes (e.g. string quote normalization, line wrapping). There are no logic changes in any of these files.

@BrianWhitneyAI BrianWhitneyAI marked this pull request as ready for review March 30, 2026 21:21
@BrianWhitneyAI BrianWhitneyAI requested a review from a team as a code owner March 30, 2026 21:21
Copy link
Copy Markdown
Contributor

@kmitcham kmitcham left a comment

Choose a reason for hiding this comment

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

I was a little worried modernizing would give my ancient workstation trouble, but this branch passes tests on 3.10.14 on my ubuntu 18 machine, so I'm in favor.

@BrianWhitneyAI BrianWhitneyAI self-assigned this Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants