Skip to content

Conversation

@ogenstad
Copy link
Contributor

@ogenstad ogenstad commented Dec 22, 2025

Summary by CodeRabbit

  • Chores
    • Updated continuous integration workflow to improve dependency synchronization coverage
    • Bumped linting tool dependency to a newer version
    • Refined code quality checking configuration with more targeted rule sets across different parts of the codebase

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 22, 2025

Walkthrough

The changes update the CI/CD configuration and dependency management. The workflow CI file modifies the UV synchronization command in the Python linting step to use broader scope parameters. The project configuration file upgrades the ty linting tool dependency, adds targeted per-file type-checking overrides for specific source files, and restructures the ignore rules from a consolidated global list into localized per-file and per-directory overrides.

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'Upgrade ty and cleanup rules' accurately summarizes the main changes: upgrading the ty dependency from 0.0.4 to 0.0.5 and reorganizing type-checking rules with per-file overrides.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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 and usage tips.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 22, 2025

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 64ca67a
Status: ✅  Deploy successful!
Preview URL: https://00f21b47.infrahub-sdk-python.pages.dev
Branch Preview URL: https://pog-upgrade-ty-with-cleanup.infrahub-sdk-python.pages.dev

View logs

@ogenstad ogenstad force-pushed the pog-upgrade-ty-with-cleanup branch from 45e9232 to 64ca67a Compare December 22, 2025 11:27
@github-actions github-actions bot added the group/ci Issue related to the CI pipeline label Dec 22, 2025
@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@                Coverage Diff                @@
##           infrahub-develop     #706   +/-   ##
=================================================
  Coverage             76.28%   76.28%           
=================================================
  Files                   114      114           
  Lines                  9830     9830           
  Branches               1508     1508           
=================================================
  Hits                   7499     7499           
  Misses                 1837     1837           
  Partials                494      494           
Flag Coverage Δ
integration-tests 34.42% <ø> (ø)
python-3.10 50.15% <ø> (ø)
python-3.11 50.15% <ø> (ø)
python-3.12 50.13% <ø> (-0.03%) ⬇️
python-3.13 50.15% <ø> (ø)
python-3.14 51.80% <ø> (ø)
python-filler-3.12 24.01% <ø> (ø)

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ogenstad ogenstad marked this pull request as ready for review December 22, 2025 12:14
@ogenstad ogenstad requested a review from a team December 22, 2025 12:14
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

89-89: Consider reverting to --group lint for efficiency.

The change from --group lint to --all-groups --all-extras installs all dependency groups (tests, dev, types, etc.) when only linting tools are needed. This increases CI time and resource usage without apparent benefit, as the subsequent linting steps only use ruff and ty from the lint group.

🔎 Proposed fix to restore targeted dependency installation
-        run: uv sync --all-groups --all-extras
+        run: uv sync --group lint
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fde1504 and 64ca67a.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • pyproject.toml
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-10T17:13:08.136Z
Learning: Run `uv run invoke format lint` before committing Python code
📚 Learning: 2025-12-10T17:13:08.136Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-10T17:13:08.136Z
Learning: Run `uv run invoke format lint` before committing Python code

Applied to files:

  • .github/workflows/ci.yml
📚 Learning: 2025-12-10T17:13:08.136Z
Learnt from: CR
Repo: opsmill/infrahub-sdk-python PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-10T17:13:08.136Z
Learning: Applies to **/*.py : Never bypass type checking without justification

Applied to files:

  • pyproject.toml
🔇 Additional comments (1)
pyproject.toml (1)

85-85: No action needed for this upgrade.

The upgrade from ty==0.0.4 to ty==0.0.5 is a minor patch released 4 days later (December 16 to December 20, 2025) that focuses on performance improvements for TypedDict checking, not breaking changes. Both versions are in Beta status with no reported compatibility issues between them.

Comment on lines +141 to +145
[[tool.ty.overrides]]
include = ["infrahub_sdk/ctl/config.py"]

[tool.ty.overrides.rules]
unresolved-import = "ignore" # import tomli as tomllib when running on later versions of Python
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cat -n infrahub_sdk/ctl/config.py | head -40

Repository: opsmill/infrahub-sdk-python

Length of output: 1468


Clarify the misleading comment in the unresolved-import override.

The comment states "import tomli as tomllib when running on later versions of Python," but this is backwards. tomllib is available in Python 3.11+, and tomli is needed for earlier versions. Update the comment to reflect: # tomli needed for Python < 3.11. The unresolved-import bypass itself is justified since the code uses the standard version-check pattern and type checkers have documented limitations with conditional imports.

🤖 Prompt for AI Agents
In pyproject.toml around lines 141 to 145, the inline comment on the
unresolved-import override is misleading; change the comment to state that tomli
is needed for Python < 3.11 (e.g. "# tomli needed for Python < 3.11") to
accurately reflect that tomllib is the stdlib in Python 3.11+ and tomli is used
on earlier versions, leaving the override itself unchanged.

@ogenstad ogenstad merged commit 1925f37 into infrahub-develop Dec 22, 2025
21 checks passed
@ogenstad ogenstad deleted the pog-upgrade-ty-with-cleanup branch December 22, 2025 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

group/ci Issue related to the CI pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants