Repository navigation
Copier update: pyrefly - #71
Conversation
Resolves the remaining explicit-any errors, leaving pyrefly at 0. src is now free of Any entirely: - the XML payload dicts threaded through the step classes become dict[str, JsonValue], which is what they actually are on their way to json.dumps - WORKING_DIRECTION_KWARGS and volume_info drop their annotations so the type is inferred rather than asserted - model_post_init's discarded parameter widens to object The three remaining sites are test-only. They build a dict of kwargs to spread into a pydantic constructor, omitting entries so the constructor defaults get exercised, so the value type is heterogeneous by construction. dict[str, object] is rejected on the unpack and a TypedDict cannot be built from a comprehension, so these carry an inline pyrefly suppression instead.
The dependency swap to types-lxml changed pyproject.toml and uv.lock, which are part of the devcontainer build context.
The parameter is a list of selection payloads, each containing a Wells list alongside the deck section, spacing and working direction --- not the single well that the identically named parameters on _add_mix_group and _create_heights_value_tuple receive. It is serialized under the MultiSelection key, so name it for that.
…election Each of these locals has exactly one use, as the multi_selection argument to _add_location_group. Naming them for what they are keeps the two halves of that call consistent.
…mage
hadolint v2.15.1, which the template update pins, adds DL3066: a
username may not be resolvable by the host system, so a UID is
preferred. v2.14.0 did not report this.
root is UID 0, so the build is unchanged. This switch is build-time
only --- the final USER remains ${NB_USER} at UID 1000, which is what
repo2docker requires of the image's primary user.
|
Important Review skippedToo many files! This PR contains 131 files, which is 31 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (131)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Updates the repository’s Copier templates and migrates source type checking from Pyright to Pyrefly.
Changes:
- Adds Pyrefly configuration and resolves typing errors.
- Updates template-managed CI, release, development, and agent tooling.
- Adds mutation-testing utilities and dependency updates.
Template-managed fixes should be applied to the owning base or Python-package template and re-synced.
Reviewed changes
Copilot reviewed 129 out of 132 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
ty.toml |
Removes obsolete type-checker configuration. |
tests/unit/method_steps/test_simple_transfer.py |
Updates lint and Pyrefly suppressions. |
tests/unit/method_steps/test_multi_dispense.py |
Updates lint and Pyrefly suppressions. |
tests/unit/conftest.py |
Adds template ownership notice. |
tests/unit/__init__.py |
Establishes the unit-test package. |
tests/conftest.py |
Registers assertion rewriting. |
tests/__init__.py |
Establishes the test package. |
src/pyalab/steps/transfer.py |
Refines payload types and naming. |
src/pyalab/steps/set_volume.py |
Removes unnecessary Any annotation. |
src/pyalab/steps/params.py |
Uses relative imports. |
src/pyalab/steps/multi_dispense.py |
Refines payload types and naming. |
src/pyalab/steps/builders.py |
Uses JsonValue and relative imports. |
src/pyalab/steps/base.py |
Adds Pyrefly-compatible state and payload types. |
src/pyalab/steps/__init__.py |
Declares intentional exports. |
src/pyalab/program.py |
Removes stale suppression and Any. |
src/pyalab/integra_xml.py |
Expands filtering for branch coverage. |
sh.bat |
Adds template ownership notice. |
scripts/delete_false_positive_rej.py |
Adds template ownership notice. |
README.md |
Documents release and Copier workflows. |
pytest.ini |
Points coverage at the relocated configuration. |
pyrightconfig.json |
Restricts Pyright to consumer-style test checking. |
pyproject.toml |
Updates typing, testing, and mutation dependencies. |
LICENSE |
Adds template ownership notice. |
docs/requirements.txt |
Adds template ownership notice. |
docs/Makefile |
Adds template ownership notice. |
docs/make.bat |
Adds template ownership notice. |
docs/index.rst |
Adds template ownership notice. |
docs/conf.py |
Updates callback lint suppression. |
docs/_static/.gitkeep |
Adds template ownership notice. |
Dockerfile |
Uses numeric root UID. |
CLAUDE.md |
Removes superseded root configuration. |
CHANGELOG.md |
Adds template ownership notice. |
biome.jsonc |
Adds template ownership notice. |
AGENTS.md |
Expands development and review guidance. |
.readthedocs.yaml |
Adds template ownership notice. |
.python-version |
Updates generated formatting. |
.pre-commit-config.yaml |
Adds Pyrefly and updates hooks/config paths. |
.gitignore |
Ignores mutation output. |
.github/workflows/release.yaml |
Adds the consolidated release workflow. |
.github/workflows/publish.yaml |
Updates actions and tag handling. |
.github/workflows/publish_to_staging.yaml |
Updates action versions. |
.github/workflows/pre-commit.yaml |
Reworks pre-commit caching. |
.github/workflows/hash_git_files.py |
Normalizes line endings while hashing. |
.github/workflows/git_tag.py |
Separates version extraction from tagging. |
.github/workflows/get-values.yaml |
Safely handles merge messages. |
.github/workflows/extract_project_version.py |
Adds reusable version extraction. |
.github/workflows/confirm-on-tagged-copier-template.yaml |
Updates checkout action. |
.github/workflows/ci.yaml |
Builds and stores release artifacts. |
.github/pull_request_template.md |
Adds template ownership notice. |
.github/ISSUE_TEMPLATE/tech-debt.yml |
Adds template ownership notice. |
.github/ISSUE_TEMPLATE/feature-request.yml |
Adds template ownership notice. |
.github/ISSUE_TEMPLATE/config.yml |
Adds template ownership notice. |
.github/ISSUE_TEMPLATE/bug-report.yml |
Adds template ownership notice. |
.github/dependabot.yml |
Adds template ownership notice. |
.github/CONTRIBUTING.md |
Corrects links and adds ownership notice. |
.github/CODE_OF_CONDUCT.md |
Adds template ownership notice. |
.github/actions/update-devcontainer-hash/action.yml |
Updates checkout action. |
.github/actions/install_deps/action.yml |
Modernizes Python, Node, and pnpm setup. |
.github/actions/ecr-auth/action.yml |
Updates AWS actions. |
.github/actions/check-skip-duplicates/action.yml |
Adds template ownership notice. |
.github/.codecov.yml |
Adds template ownership notice. |
.devcontainer/windows-host-helper.sh |
Adds template ownership notice. |
.devcontainer/post-start-command.sh |
Adds template ownership notice. |
.devcontainer/on-create-command.sh |
Allows uv-managed Python installation. |
.devcontainer/on-create-command-boilerplate.sh |
Adds template ownership notice. |
.devcontainer/manual-setup-deps.py |
Adds template ownership notice. |
.devcontainer/install-ci-tooling.py |
Updates development tool versions. |
.devcontainer/initialize-command.sh |
Adds template ownership notice. |
.devcontainer/Dockerfile |
Adds template ownership notice. |
.devcontainer/docker-compose.yml |
Adds template ownership notice. |
.devcontainer/devcontainer.json |
Configures Pyrefly and updates extensions. |
.devcontainer/create-aws-profile.sh |
Adds template ownership notice. |
.devcontainer/code-artifact-auth.sh |
Adds template ownership notice. |
.config/ruff.toml |
Relocates cache and expands coverage-oriented rules. |
.config/ruff-non-src.toml |
Adds template ownership notice. |
.config/pyrefly.toml |
Configures project-wide Pyrefly checking. |
.config/pyrefly.mutmut.toml |
Configures mutation type checking. |
.config/pylintrc.toml |
Adds ownership and spelling directives. |
.config/.prettierrc |
Adds shared formatting configuration. |
.config/.coveragerc |
Updates Pyrefly terminology and ownership. |
.config/.copier-managed-files.json |
Records template file ownership. |
.config/.copier-answers.yml |
Advances the Copier template version. |
.config/_typos.toml |
Updates spell-check configuration. |
.coderabbit.yaml |
Updates review guidance for Pyrefly and Copier. |
.claude/skills/fix-mutants/verify-mutant.py |
Adds single-mutant verification. |
.claude/skills/fix-mutants/utils.py |
Adds shared mutation utilities. |
.claude/skills/fix-mutants/SKILL.md |
Defines the mutation-testing workflow. |
.claude/skills/fix-mutants/show-mutant.py |
Adds mutant inspection output. |
.claude/skills/fix-mutants/run-mutmut.py |
Adds mutation-suite execution. |
.claude/skills/fix-mutants/list-survived.py |
Lists actionable mutants. |
.claude/skills/fix-mutants/group-by-line.py |
Groups mutants by source line. |
.claude/skills/fix-mutants/check-results.py |
Detects prior mutation results. |
.claude/skills/caveman/SKILL.md |
Adds template ownership notice. |
.claude/skills/address-pr-comments/verify-env.py |
Adds environment and PR validation. |
.claude/skills/address-pr-comments/utils.py |
Adds shared command execution. |
.claude/skills/address-pr-comments/SKILL.md |
Refines the PR-comment workflow. |
.claude/skills/address-pr-comments/post-reply.py |
Reuses shared command handling. |
.claude/skills/address-pr-comments/fetch-pr-comments.py |
Forces UTF-8 subprocess decoding. |
.claude/skills/address-pr-comments/commit-link.py |
Generates commit links for replies. |
.claude/skills/address-pr-comments/check-footer.py |
Adds template ownership notice. |
.claude/settings/permissions/write.jsonc |
Adds template ownership notice. |
.claude/settings/permissions/read.jsonc |
Adds template ownership notice. |
.claude/settings/permissions/bash.jsonc |
Broadens Git permissions with safeguards. |
.claude/settings/permissions/additional-dirs.jsonc |
Adds template ownership notice. |
.claude/settings/models.jsonc |
Defines available models. |
.claude/settings/hooks.jsonc |
Adds template ownership notice. |
.claude/settings/basics.jsonc |
Adds template ownership notice. |
.claude/hooks/caveman-mode-tracker.js |
Adds template ownership notice. |
.claude/hooks/caveman-config.js |
Adds template ownership notice. |
.claude/hooks/caveman-activate.js |
Adds template ownership notice. |
.claude/hooks/bash-chain-guard.js |
Expands command-chain detection. |
.claude/helpers/merge-claude-settings.sh |
Adds template ownership notice. |
.claude/commands/tdd.md |
Refines one-behavior TDD guidance. |
.claude/commands/tdd-review.md |
Refines test-smell criteria. |
.claude/commands/summarize.md |
Adds template ownership notice. |
.claude/commands/spike.md |
Refines one-behavior TDD guidance. |
.claude/commands/simplify.md |
Adds template ownership notice. |
.claude/commands/research.md |
Adds template ownership notice. |
.claude/commands/refactor.md |
Refines one-behavior TDD guidance. |
.claude/commands/red.md |
Refines one-behavior TDD guidance. |
.claude/commands/polish.md |
Adds template ownership notice. |
.claude/commands/issue.md |
Refines one-behavior TDD guidance. |
.claude/commands/green.md |
Refines one-behavior TDD guidance. |
.claude/commands/gap.md |
Adds template ownership notice. |
.claude/commands/create-issues.md |
Adds template ownership notice. |
.claude/commands/create-adr.md |
Adds template ownership notice. |
.claude/commands/commit.md |
Adds template ownership notice. |
.claude/commands/add-command.md |
Adds template ownership notice. |
.claude/CLAUDE.md |
Redirects Claude guidance to AGENTS.md. |
.claude/.beads/config.yaml |
Adds template ownership notice. |
.claude/.beads/.gitignore |
Adds template ownership notice. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Why is this change necessary?
Update do use pyrefly
How does this change address the issue?
Two distinct parts.
1. Template sync — the bulk of the diff, applied from
copier-base-template. Mostly generated; the files it owns are listed in.config/.copier-managed-files.json.2. Making the codebase pass pyrefly — 45 errors, in five groups:
bad-assignment,bad-argument-type,bad-returnlxml-stubs0.5.1 declares attributes with PEP 484 type comments (text = ... # type: Optional[str]), which pyrefly does not read, so it inferred_Element.textasEllipsistypes-lxmlexplicit-anydict[str, Any]on the XML payload dicts threaded through the step classespydantic.JsonValue,object, or dropped annotationsimplicit-reexportsrc/pyalab/steps/__init__.pyre-exported without declaring intent__all__bad-argument-typesteps/*.pyimported the package absolutely (from pyalab.plate import ...) while the rest ofsrcused relative imports, so one class resolved under two module names and read as two nominal typesimplicit-bool,implicitly-defined-attribute,unused-type-ignoreis not Noneloop, declared private attr, deleted a stale pyright ignoreResult: pyrefly reports 0 errors, with 3 suppressions (see below).
Two naming fixes came out of reading the code closely, both pure renames with no type or behavior change:
_add_location_group'swell_info→multi_selection. ThreeStepmethods took awell_infoparameter; two received a single well ({Item1, Item2}) while this one received a list of selection payloads that merely contain a wells list. It serializes under the XML keyMultiSelection, so it is now named for that.source_info/target_infolocals →source_selection/target_selection.Separately, 3 pre-existing
PLR0917ruff violations are fixed. Each already carried a deliberate# noqa: PLR0913;PLR0917is that rule's sibling for positional argument count and was never suppressed. All three genuinely cannot go keyword-only (a Sphinx callback signature, and two parametrized tests), so the existing noqa was extended with reasoning.What side effects does this change have?
lxml-stubs→types-lxmlpulls intypes-html5lib,types-webencodings,cssselect,soupsieve,beautifulsoup4. All dev-only; runtime dependencies are unchanged. Worth notinglxml-stubs0.5.1 is the latest release and dates from 2024-01-10, whereastypes-lxmlis actively maintained.src. If you rely on pyright diagnostics in the editor for library code, that is now pyrefly's job..config/. Anything invoking these tools directly needs the new paths;pre-commit run <hook-id>handles it already.dict[str, object]is rejected on the unpack and aTypedDictcannot be built from a comprehension, so neither alternative works.src/itself contains noAnyand no suppressions.How is this change tested?
Existing CI