Skip to content

Copier update (v0.0.64 → v0.0.78) and pyrefly fixes - #35

Merged
ejfine merged 15 commits into
mainfrom
cop-pyrefyl
Sep 28, 2026
Merged

ejfine merged 15 commits into
mainfrom
cop-pyrefyl

Conversation

@ejfine

@ejfine ejfine commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Link to Issue or Message thread

N/A — routine copier template update.

Why is this change necessary?

Pulls in the upstream copier-base-template changes from v0.0.64 to v0.0.78. The biggest change for this repo is that the template now type-checks source code with pyrefly (strict config in .config/pyrefly.toml) instead of pyright, which surfaced new type errors that had to be resolved for linting to pass.

How does this change address the issue?

Copier update

  • Applies the template update. Most tool config files moved into .config/ (.coveragerc, ruff.toml, pylintrc.toml, _typos.toml, .prettierrc, .copier-answers.yml), and new Claude skills/hooks, a Taskfile.yaml, and a release workflow were added.
  • Resolved the rejected hunks by keeping the repo-specific values: project version, the boto3-stubs/pytest-mock dev dependencies, the coverage threshold, and the workspace-mount retargeting in .devcontainer/initialize-command.sh (with .devcontainer/.env gitignored).

Minimal changes to satisfy pyrefly (no intended behavior changes)

  • if not region: / if resource_name: → explicit == "" / != "" comparisons (implicit-bool).
  • str(args.stack) so the argparse result is typed as str (args.stack is already required=True, type=str).
  • dict[str, Any] → dict[str, object] for get_config's return type.
  • run_cli's stack_config keeps dict[str, Any] with an inline # pyrefly: ignore[explicit-any], matching Pulumi's StackSettings.config.
  • get_stack's stack_config keeps dict[str, Any] with an inline # pyrefly: ignore[explicit-any] — its values are a mix of str and ConfigValue, and Pulumi's StackSettings.config is itself typed dict[str, Any].
  • StackKwargs is now a closed TypedDict (closed=True) so it can be unpacked into Stack.up()/Stack.preview(). The stdlib only supports closed= from Python 3.15, so TypedDict is imported from typing_extensions, which is added as a runtime dependency.
  • get_config: value: object = json_dict["value"] (narrowed by the existing isinstance check), removed an always-true assert, and removed stale pyright-specific # type: ignore comments.
  • Typed the empty outputs dict in one CLI test.

Other

  • Devcontainer: when the repo is opened via "Clone Repository in Container Volume", initialize-command.sh writes WORKSPACE_MOUNT_TARGET=/workspaces to .devcontainer/.env so the compose bind mount of .. no longer shadows the cloned volume with an empty directory.
  • Version bumped to 0.0.8.
  • Coverage threshold raised from 33% to 60% (current total is 62.24%).

What side effects does this change have?

  • New runtime dependency: typing-extensions>=4.12.2.
  • run_cli(stack_config=...) is typed dict[str, Any] (with a # pyrefly: ignore[explicit-any]) to match Pulumi's own StackSettings.config, so downstream callers passing dicts with narrower value types (e.g. dict[str, ConfigValue]) are unaffected. A TODO notes a possible future switch to Mapping[str, object], which would mean get_stack writes its injected keys into a copy rather than the caller's dict.
  • Added a TODO in get_aws_region: str(pulumi_aws.config.region) turns a None region into "None", so the empty-string check never catches a missing region. This is a pre-existing bug, intentionally not fixed in this PR.

How is this change tested?

  • All pre-commit hooks pass, including pyrefly (0 errors), pyright on tests, ruff, ruff-format, and pylint.
  • Unit tests: 17 passed, 62.24% coverage (threshold 60%).

Other

🤖 Generated with Claude Code

ejfine and others added 11 commits September 25, 2026 13:18
Clone Repository in Container Volume runs initializeCommand in a bootstrap container, so the compose bind mount of .. points at a path the Docker host lacks and shadows the clone with an empty directory. Detect that case and write WORKSPACE_MOUNT_TARGET=/workspaces to .devcontainer/.env so VS Code's own /workspaces volume mount replaces the bind mount.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Resolve rejected hunks: keep project version 0.0.7, repo-specific dev deps, coverage fail_under=33 (now in .config/.coveragerc), and the workspace mount retargeting in initialize-command.sh with its .devcontainer/.env gitignore entry.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Make string emptiness checks explicit, type the empty outputs dict in the CLI test, and update the devcontainer context hash. Adds a TODO for the pre-existing None-to-"None" region bug.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ff format

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Adds typing-extensions as a runtime dependency (closed= on TypedDict needs Python 3.15 in stdlib) and bumps version to 0.0.8.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Removes the always-true isinstance assert and pyright-specific type: ignore comments that pyrefly no longer needs. Updates the devcontainer context hash.

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

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 119 files, which is 19 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 configuration

Configuration used: Repository: LabAutomationAndScreening/ephemeral-pulumi-deploy/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: ef83e2ea-9a33-4bcd-a691-6b52a5c7c64c

📥 Commits

Reviewing files that changed from the base of the PR and between 097f4da and 68e0d12.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (119)
  • .claude/.beads/.gitignore
  • .claude/.beads/config.yaml
  • .claude/CLAUDE.md
  • .claude/commands/add-command.md
  • .claude/commands/commit.md
  • .claude/commands/create-adr.md
  • .claude/commands/create-issues.md
  • .claude/commands/gap.md
  • .claude/commands/green.md
  • .claude/commands/issue.md
  • .claude/commands/polish.md
  • .claude/commands/red.md
  • .claude/commands/refactor.md
  • .claude/commands/research.md
  • .claude/commands/simplify.md
  • .claude/commands/spike.md
  • .claude/commands/summarize.md
  • .claude/commands/tdd-review.md
  • .claude/commands/tdd.md
  • .claude/helpers/merge-claude-settings.sh
  • .claude/hooks/bash-chain-guard.js
  • .claude/hooks/caveman-activate.js
  • .claude/hooks/caveman-config.js
  • .claude/hooks/caveman-mode-tracker.js
  • .claude/hooks/package.json
  • .claude/settings/basics.jsonc
  • .claude/settings/hooks.jsonc
  • .claude/settings/models.jsonc
  • .claude/settings/permissions/additional-dirs.jsonc
  • .claude/settings/permissions/bash.jsonc
  • .claude/settings/permissions/edit.jsonc
  • .claude/settings/permissions/read.jsonc
  • .claude/settings/permissions/write.jsonc
  • .claude/skills/address-pr-comments/SKILL.md
  • .claude/skills/address-pr-comments/check-footer.py
  • .claude/skills/address-pr-comments/commit-link.py
  • .claude/skills/address-pr-comments/fetch-pr-comments.py
  • .claude/skills/address-pr-comments/post-reply.py
  • .claude/skills/address-pr-comments/utils.py
  • .claude/skills/address-pr-comments/verify-env.py
  • .claude/skills/caveman/SKILL.md
  • .claude/skills/fix-mutants/SKILL.md
  • .claude/skills/fix-mutants/check-results.py
  • .claude/skills/fix-mutants/group-by-line.py
  • .claude/skills/fix-mutants/list-survived.py
  • .claude/skills/fix-mutants/run-mutmut.py
  • .claude/skills/fix-mutants/show-mutant.py
  • .claude/skills/fix-mutants/utils.py
  • .claude/skills/fix-mutants/verify-mutant.py
  • .coderabbit.yaml
  • .config/.copier-answers.yml
  • .config/.copier-managed-files.json
  • .config/.coveragerc
  • .config/.prettierrc
  • .config/_typos.toml
  • .config/pylintrc.toml
  • .config/pyrefly.mutmut.toml
  • .config/pyrefly.toml
  • .config/ruff-non-src.toml
  • .config/ruff.toml
  • .config/taskfiles/copier-template.yaml
  • .devcontainer/Dockerfile
  • .devcontainer/code-artifact-auth.sh
  • .devcontainer/create-aws-profile.sh
  • .devcontainer/devcontainer.json
  • .devcontainer/docker-compose.yml
  • .devcontainer/initialize-command.sh
  • .devcontainer/install-ci-tooling.py
  • .devcontainer/manual-setup-deps.py
  • .devcontainer/on-create-command-boilerplate.sh
  • .devcontainer/on-create-command.sh
  • .devcontainer/post-start-command.sh
  • .devcontainer/windows-host-helper.sh
  • .github/.codecov.yml
  • .github/CODE_OF_CONDUCT.md
  • .github/CONTRIBUTING.md
  • .github/ISSUE_TEMPLATE/bug-report.yml
  • .github/ISSUE_TEMPLATE/config.yml
  • .github/ISSUE_TEMPLATE/feature-request.yml
  • .github/ISSUE_TEMPLATE/tech-debt.yml
  • .github/actions/check-skip-duplicates/action.yml
  • .github/actions/ecr-auth/action.yml
  • .github/actions/install_deps/action.yml
  • .github/actions/update-devcontainer-hash/action.yml
  • .github/dependabot.yml
  • .github/pull_request_template.md
  • .github/workflows/ci.yaml
  • .github/workflows/confirm-on-tagged-copier-template.yaml
  • .github/workflows/extract_project_version.py
  • .github/workflows/get-values.yaml
  • .github/workflows/git_tag.py
  • .github/workflows/hash_git_files.py
  • .github/workflows/pre-commit.yaml
  • .github/workflows/publish.yaml
  • .github/workflows/publish_to_staging.yaml
  • .github/workflows/release.yaml
  • .gitignore
  • .pre-commit-config.yaml
  • .python-version
  • AGENTS.md
  • CHANGELOG.md
  • CLAUDE.md
  • LICENSE
  • README.md
  • Taskfile.yaml
  • biome.jsonc
  • pyproject.toml
  • pyrightconfig.json
  • pytest.ini
  • scripts/delete_false_positive_rej.py
  • sh.bat
  • src/ephemeral_pulumi_deploy/cli.py
  • src/ephemeral_pulumi_deploy/utils.py
  • tests/__init__.py
  • tests/conftest.py
  • tests/unit/__init__.py
  • tests/unit/conftest.py
  • tests/unit/test_cli.py
  • ty.toml

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/ephemeral_pulumi_deploy/utils.py 16.66% 4 Missing and 1 partial ⚠️
Flag Coverage Δ
unittests 61.27% <50.00%> (+0.29%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/ephemeral_pulumi_deploy/cli.py 100.00% <100.00%> (ø)
src/ephemeral_pulumi_deploy/utils.py 43.16% <16.66%> (+0.30%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ejfine
ejfine marked this pull request as ready for review September 26, 2026 01:55
@ejfine
ejfine requested a review from zendern September 26, 2026 01:55
ejfine and others added 4 commits September 28, 2026 12:55
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dict[str, object] rejected callers passing dicts with narrower value types, since dict is invariant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pulumi 3.265.0, pulumi-aws 7.48.0, pulumi-aws-native 1.81.0, boto3/boto3-stubs 1.43.103, typing-extensions 4.16.0, pytest-mock 3.16.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ejfine
ejfine merged commit 833ca1e into main Sep 28, 2026
17 of 18 checks passed
@ejfine
ejfine deleted the cop-pyrefyl branch September 28, 2026 19:56
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