Skip to content

chore: keyword args for project-internal multi-arg calls#83

Merged
hmgaudecker merged 12 commits into
ai-instructions-ty-migrationfrom
chore/kwarg-call-sweep
Jun 15, 2026
Merged

chore: keyword args for project-internal multi-arg calls#83
hmgaudecker merged 12 commits into
ai-instructions-ty-migrationfrom
chore/kwarg-call-sweep

Conversation

@hmgaudecker

Copy link
Copy Markdown
Collaborator

Summary

Sweep: every call to a project-defined function/method/class with 2+ positional args is rewritten to use keyword names.

Scope:

  • src/soep_preparation and tests
  • Project-internal targets only — stdlib, numpy, pandas, jax, and third-party calls are left alone.

41 call sites across 3 files. ty / py314 (47 passed) all green.

Origin: code-review preference flagged on ttsim-dev/ttsim#108.

Test plan

  • `pixi run -e py314 ty`
  • `pixi run -e py314 tests -n 7`

🤖 Generated with Claude Code

hmgaudecker and others added 7 commits May 17, 2026 11:11
- Switch .ai-instructions submodule URL to HTTPS, branch to main
- Update submodule to latest main
- Bump ruff hook v0.15.11 -> v0.15.13
- Add check-github-workflows hook
- Add per-rule descriptions to all per-file-ignores
- Bump setup-pixi v0.9.3 -> v0.9.5, pixi v0.62.2 -> v0.68.1
- Migrate CLAUDE.md content to AGENTS.md, shrink CLAUDE.md to @AGENTS.md
- Add GEMINI.md (@AGENTS.md) for Gemini CLI / roborev
- pixi 0.68.1 -> 0.69.0 in CI
- pre-commit: pyproject-fmt 2.21.1->2.21.2, ruff 0.15.13->0.15.14
- ty pinned to 0.0.23: 0.0.39 flags a real but out-of-scope
  type-narrowing issue in `_sort_dataset_merging_information`
- pixi.lock regenerated with pixi 0.69.0 so `pixi run --locked`
  is back-current

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…fix module)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sweep applied across src/soep_preparation and tests. Rewrites only
calls whose target is a project-defined function, method, or class
with statically-known parameter names. Leaves stdlib, numpy, pandas,
jax, and other third-party calls alone.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@codecov

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

hmgaudecker and others added 3 commits May 27, 2026 12:40
ty 0.0.39 narrows TypedDict-valued dict literals more strictly than 0.0.23,
so `_get_sorted_dataset_merging_information` needs an explicit annotation
on the accumulator dict for the narrowing to match the function's return
type.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- ty runs as the astral-sh/ty-pre-commit hook (v0.0.49, --no-project),
  resolving third-party imports from .pixi/envs/py314 via
  [tool.ty] environment.python; drop the `ty` pixi task and dep.
- pre-commit.ci skips ty (no pixi/network); new GHA run-ty job covers it.
- AGENTS.md: ty now runs via `prek run --all-files`.
- Bump .ai-instructions submodule to 80d7122 (real tiering, distilled
  modules, ty-pre-commit boilerplate).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PR #9 was squash-merged, so the earlier 80d7122 pin is orphaned; c2701d4 is
the merged commit (includes the ty-jax-out-of-boilerplate cleanup).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hmgaudecker hmgaudecker changed the base branch from beartype to ai-instructions-ty-migration June 15, 2026 15:31
@hmgaudecker hmgaudecker requested a review from MImmesberger June 15, 2026 15:31
@hmgaudecker hmgaudecker force-pushed the ai-instructions-ty-migration branch from cc8abd4 to 5dfccc3 Compare June 15, 2026 15:47

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
pixi-version: v0.70.2

Probably not relevant after merging into base, just in case

@hmgaudecker hmgaudecker merged commit 7a6a8e4 into ai-instructions-ty-migration Jun 15, 2026
1 of 5 checks passed
@hmgaudecker hmgaudecker deleted the chore/kwarg-call-sweep branch June 15, 2026 17:23
hmgaudecker added a commit that referenced this pull request Jun 15, 2026
)

* Adopt ty pre-commit hook; bump .ai-instructions to c2701d4

- ty runs as the official astral-sh/ty-pre-commit hook (v0.0.49, --no-project),
  resolving imports from .pixi/envs/py314 via [tool.ty] environment.python.
- Remove the type-checking pixi env + feature (the old pinned ty + ty task).
- Track .ai-instructions on its main branch over HTTPS (.gitmodules) and bump it
  to c2701d4 (real tiering, distilled modules, ty-pre-commit boilerplate); add the
  AGENTS.md / GEMINI.md wrappers.
- Annotate `_get_sorted_dataset_merging_information`'s dict so ty can check it.
- Relock: pytask 0.6 (from #85), pinned `ty` dropped from the env.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: keyword args for project-internal multi-arg calls (#83)

* Apply boilerplate update for tier-b-research

- Switch .ai-instructions submodule URL to HTTPS, branch to main
- Update submodule to latest main
- Bump ruff hook v0.15.11 -> v0.15.13
- Add check-github-workflows hook
- Add per-rule descriptions to all per-file-ignores
- Bump setup-pixi v0.9.3 -> v0.9.5, pixi v0.62.2 -> v0.68.1
- Migrate CLAUDE.md content to AGENTS.md, shrink CLAUDE.md to @AGENTS.md
- Add GEMINI.md (@AGENTS.md) for Gemini CLI / roborev

* Bump .ai-instructions to e93e058 (add beartype rollout module)

* Bump .ai-instructions to 40e0ac6 (document claw callable-instance gotcha)

* Refresh CI/pre-commit pins and lock; pin ty to 0.0.23

- pixi 0.68.1 -> 0.69.0 in CI
- pre-commit: pyproject-fmt 2.21.1->2.21.2, ruff 0.15.13->0.15.14
- ty pinned to 0.0.23: 0.0.39 flags a real but out-of-scope
  type-narrowing issue in `_sort_dataset_merging_information`
- pixi.lock regenerated with pixi 0.69.0 so `pixi run --locked`
  is back-current

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* Bump .ai-instructions to pick up sweep/pass/handler naming guidance

* Bump .ai-instructions to 82a2746 (jaxtyping sentinel-pickle upstream fix module)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* Use keyword args for project-internal calls with 2+ positional args

Sweep applied across src/soep_preparation and tests. Rewrites only
calls whose target is a project-defined function, method, or class
with statically-known parameter names. Leaves stdlib, numpy, pandas,
jax, and other third-party calls alone.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* Unpin ty; track latest

ty 0.0.39 narrows TypedDict-valued dict literals more strictly than 0.0.23,
so `_get_sorted_dataset_merging_information` needs an explicit annotation
on the accumulator dict for the narrowing to match the function's return
type.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* Adopt ty-pre-commit hook; bump .ai-instructions to 80d7122

- ty runs as the astral-sh/ty-pre-commit hook (v0.0.49, --no-project),
  resolving third-party imports from .pixi/envs/py314 via
  [tool.ty] environment.python; drop the `ty` pixi task and dep.
- pre-commit.ci skips ty (no pixi/network); new GHA run-ty job covers it.
- AGENTS.md: ty now runs via `prek run --all-files`.
- Bump .ai-instructions submodule to 80d7122 (real tiering, distilled
  modules, ty-pre-commit boilerplate).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Re-pin .ai-instructions to merged main (c2701d4)

PR #9 was squash-merged, so the earlier 80d7122 pin is orphaned; c2701d4 is
the merged commit (includes the ty-jax-out-of-boilerplate cleanup).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>

* Relock against current repodata (drop yanked ca-certificates 2026.4.22)

conda-forge superseded the `ca-certificates 2026.4.22` builds, so the locked
CI job (`pixi install --frozen`) could no longer load the lock ("refers to a
package that does not exist"). A targeted update is impossible because pixi
must first load the unloadable lock, so regenerate it from scratch against
current repodata. ca-certificates is now 2026.5.20; 47 tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Test _get_sorted_dataset_merging_information

Cover the module-selection and index-count sort directly, closing the patch
coverage gap on the type annotation added to that helper.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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