Skip to content

refactor: workflows and uv#1

Closed
TomasBalak wants to merge 4 commits into
masterfrom
refactor/workflows-and-uv
Closed

refactor: workflows and uv#1
TomasBalak wants to merge 4 commits into
masterfrom
refactor/workflows-and-uv

Conversation

@TomasBalak

@TomasBalak TomasBalak commented Mar 9, 2026

Copy link
Copy Markdown
Collaborator

This pull request includes the following changes:

  • Migration of the repository from GitLab to GitHub and switch from GitLab CI to GitHub actions.
  • Replacement of pdm with the uv dependency manager.
  • Updating various tools used within the repository.

Any suggestions for improvement are appreciated. 😄

Summary by CodeRabbit

  • Chores

    • Version bumped to 1.0.1 and added project authors.
    • Updated development tooling and pre-commit hooks (commitizen, ruff) and lint/format settings.
  • CI/CD

    • Migrated CI workflows to GitHub Actions and removed previous CI pipeline.
  • Style & Linting

    • Updated linting config and exclusions; added markdown lint configuration and type-check suppression for an external module.
  • Documentation

    • Minor README formatting fix.

@TomasBalak TomasBalak self-assigned this Mar 9, 2026
@TomasBalak TomasBalak changed the title Refactor/workflows and uv refactor: workflows and uv Mar 9, 2026
@coderabbitai

coderabbitai Bot commented Mar 9, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@TomasBalak has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 14 minutes and 48 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5e9aa3ad-e52f-4025-973e-14bf285028ae

📥 Commits

Reviewing files that changed from the base of the PR and between d8502aa and c26fa0c.

📒 Files selected for processing (2)
  • .github/workflows/mkdocs-build.yml
  • .github/workflows/python-lint.yml
📝 Walkthrough

Walkthrough

Migrates CI from GitLab to GitHub Actions, adds two reusable GitHub workflows, removes .gitlab-ci.yml, updates linters/type-checker configs, bumps pre-commit hooks, excludes rationai/qc/blur/piqe.py from linting/type checks, and updates pyproject.toml version/authors and docs extras.

Changes

Cohort / File(s) Summary
CI workflows & removal
/.github/workflows/mkdocs-build.yml, /.github/workflows/python-lint.yml, /.gitlab-ci.yml
Adds two GitHub Actions workflow entries that reuse external workflows; removes the GitLab CI configuration file and its include/stage declarations.
Linting & type-check config
.markdownlint.yaml, .mypy.ini, .ruff.toml, .pre-commit-config.yaml
Adds markdownlint config disabling several rules; adds mypy block to ignore rationai.qc.blur.piqe; excludes rationai/qc/blur/piqe.py from Ruff; bumps commitizen and ruff-pre-commit versions and switches ruff pre-commit hook to use args: [--fix].
Project metadata & minor docs
pyproject.toml, README.md
Increments package version to 1.0.1, adds authors, restructures dev deps into dependency-groups and docs extras (adds pymdown-extensions), and adds a trailing newline to README.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I hopped through configs, tidy and spry,
Replaced old pipelines beneath the sky.
Linters tucked, versions set free,
Docs now extra-sprinkled with glee —
A small rabbit's cheer for CI! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'refactor: workflows and uv' directly addresses the main changes: migrating CI workflows from GitLab to GitHub Actions and switching from pdm to uv dependency manager.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/workflows-and-uv

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.

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on modernizing the project's infrastructure and development workflow. It transitions the project to a new hosting platform and CI/CD system, updates the core dependency management, and ensures that development tools are current, aiming to improve efficiency and maintainability across the board.

Highlights

  • Repository Migration: The repository has been migrated from GitLab to GitHub, accompanied by a switch from GitLab CI to GitHub Actions for continuous integration.
  • Dependency Management: The dependency manager has been replaced, moving from pdm to uv.
  • Tool Updates: Various development tools and their configurations within the repository have been updated to their latest versions.
Changelog
  • .gitlab-ci.yml
    • Removed the entire GitLab CI configuration, indicating a switch to a different CI system.
  • .markdownlint.yaml
    • Introduced a new Markdown linting configuration file, disabling several rules like line length and duplicate headings.
  • .mypy.ini
    • Added a specific ignore rule for type errors within the rationai.qc.blur.piqe module.
  • .pre-commit-config.yaml
    • Updated the commitizen hook from v4.8.3 to v4.10.0.
    • Updated the ruff-pre-commit hook from v0.12.10 to v0.14.10.
    • Modified the ruff linter hook to use --fix argument instead of pdm lint --force-exclude.
    • Removed the entry for ruff-format hook, relying on default behavior.
  • .ruff.toml
    • Added extend-exclude for rationai/qc/focus/piqe.py to ignore it from ruff checks.
    • Changed TCH to TC in extend-select for flake8-type-checking.
    • Changed TCH002 to TC002 in extend-ignore.
    • Adjusted comment for pydocstyle in extend-select.
  • README.md
    • Applied a minor whitespace change to the README.md file.
  • pyproject.toml
    • Incremented the project version from 1.0.0 to 1.0.1.
    • Reordered and added a new author entry.
    • Reordered dependencies, moving rationai-staining.
    • Replaced [tool.pdm.dev-dependencies] with [dependency-groups].
    • Removed all [tool.pdm.scripts] definitions, indicating a shift away from PDM's script management.
    • Added pymdown-extensions>=10.20.1 to the docs dependency group.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/mkdocs-build.yml
    • .github/workflows/python-lint.yml
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request migrates the repository from GitLab to GitHub, switches the dependency manager from pdm to uv, and updates various tools. The changes are generally well-executed and align with the stated goals. I've identified a couple of potential issues: a typo in the Ruff configuration that will prevent a file from being excluded from linting, and the use of GitLab URLs for dependencies which may be outdated due to the migration to GitHub. Addressing these points will help ensure the project's tooling and dependency management are correctly configured.

Comment thread .ruff.toml Outdated
Comment thread pyproject.toml
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@TomasBalak TomasBalak requested a review from matejpekar March 9, 2026 19:58

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (1)
.mypy.ini (1)

8-10: Consider adding warn_unused_configs to catch typos in module patterns.

While ignore_errors = True is reasonable for the externally-sourced piqe.py file (which should remain read-only), the warn_unused_configs option in mypy can help prevent silent regressions if the module pattern is ever accidentally misspelled. This is a low-effort safety improvement.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.mypy.ini around lines 8 - 10, Add the mypy option warn_unused_configs =
True to the [mypy-rationai.qc.blur.piqe] section so mypy will warn if the module
pattern is misspelled or unused; update the section named
[mypy-rationai.qc.blur.piqe] to include warn_unused_configs = True alongside the
existing ignore_errors = True.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/mkdocs-build.yml:
- Around line 3-6: The workflow triggers only list branch "main" under push and
pull_request, so CI won't run for the repo's current "master" branch; update the
trigger lists in the workflow (the push and pull_request branch arrays) to
include "master" as well (or replace with both "main" and "master" or a pattern
like ["main","master"]) so the MkDocs build will run for PRs and pushes
targeting master; locate the branch arrays under the push and pull_request keys
in the mkdocs-build.yml and add "master" to them.

In @.github/workflows/python-lint.yml:
- Around line 3-6: The workflow triggers only target branch name "main" so
pushes and pull requests against the repository's current "master" branch won't
run; update the workflow triggers in the python-lint.yml (the push and
pull_request branch arrays) to include "master" alongside "main" so the lint job
will run for both branches (i.e., add "master" to the branches lists referenced
in the push and pull_request triggers).

In @.pre-commit-config.yaml:
- Around line 17-22: Update the ruff and ruff-format pre-commit hooks to pass
the --force-exclude flag so excluded vendored files (e.g., piqe.py) are not
linted or formatted; specifically, add --force-exclude to the args array for the
hook with id "ruff" (currently args: [--fix]) and add --force-exclude to the
hook with id "ruff-format" so both hooks honor .ruff.toml exclude patterns even
when pre-commit passes staged files explicitly.

In @.ruff.toml:
- Line 5: The extend-exclude entry currently lists "rationai/qc/focus/piqe.py"
which doesn't match the actual vendored file path; update the extend-exclude
value to the correct path "rationai/qc/blur/piqe.py" (or add that path in
addition to the existing one) so Ruff will properly ignore the vendored PIQE
file; target the extend-exclude setting in the .ruff.toml configuration to make
this change.

In `@README.md`:
- Line 8: Remove the literal "TODO: Add link to mkdocs documentation" from
README.md and replace it with a real documentation link or a neutral placeholder
that won't be published (e.g., "Documentation: https://docs.example.com" or
"Documentation: link to be added"); ensure the same README referenced by
pyproject.toml (line 12) no longer contains the TODO string so package metadata
renders cleanly. Locate the README.md line that contains the TODO and update the
markdown to either the final MkDocs URL or a non-TODO placeholder; if the URL is
not yet available, use a clear placeholder like "Documentation: link to be
added" instead of "TODO".

---

Nitpick comments:
In @.mypy.ini:
- Around line 8-10: Add the mypy option warn_unused_configs = True to the
[mypy-rationai.qc.blur.piqe] section so mypy will warn if the module pattern is
misspelled or unused; update the section named [mypy-rationai.qc.blur.piqe] to
include warn_unused_configs = True alongside the existing ignore_errors = True.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e51252a5-5e4f-4b1b-97e2-120b7411afa7

📥 Commits

Reviewing files that changed from the base of the PR and between 9f3ec66 and 50df6d9.

⛔ Files ignored due to path filters (2)
  • pdm.lock is excluded by !**/*.lock
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (9)
  • .github/workflows/mkdocs-build.yml
  • .github/workflows/python-lint.yml
  • .gitlab-ci.yml
  • .markdownlint.yaml
  • .mypy.ini
  • .pre-commit-config.yaml
  • .ruff.toml
  • README.md
  • pyproject.toml
💤 Files with no reviewable changes (1)
  • .gitlab-ci.yml

Comment thread .github/workflows/mkdocs-build.yml Outdated
Comment thread .github/workflows/python-lint.yml Outdated
Comment on lines +3 to +6
push:
branches: ["main"]
pull_request:
branches: ["main"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

These triggers miss the repo's current master branch.

This PR targets master, but the workflow only listens to main, so linting won't run for the current PR flow or post-merge pushes until the branch rename is complete.

Suggested change
  push:
-    branches: ["main"]
+    branches: ["main", "master"]
  pull_request:
-    branches: ["main"]
+    branches: ["main", "master"]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
push:
branches: ["main"]
pull_request:
branches: ["main"]
push:
branches: ["main", "master"]
pull_request:
branches: ["main", "master"]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/python-lint.yml around lines 3 - 6, The workflow triggers
only target branch name "main" so pushes and pull requests against the
repository's current "master" branch won't run; update the workflow triggers in
the python-lint.yml (the push and pull_request branch arrays) to include
"master" alongside "main" so the lint job will run for both branches (i.e., add
"master" to the branches lists referenced in the push and pull_request
triggers).

Comment thread .pre-commit-config.yaml
Comment on lines 17 to 22
hooks:
# Run the linter.
- id: ruff
entry: pdm lint --force-exclude
args: [--fix]
# Run the formatter.
- id: ruff-format

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT

python -m pip install --quiet "ruff==0.14.10"

cat >"$tmp/.ruff.toml" <<'EOF'
extend-exclude = ["excluded.py"]
EOF

cat >"$tmp/excluded.py" <<'EOF'
import os
EOF

cd "$tmp"

echo "ruff check without --force-exclude"
python -m ruff check --config .ruff.toml excluded.py || true

echo
echo "ruff check with --force-exclude"
python -m ruff check --force-exclude --config .ruff.toml excluded.py || true

echo
echo "ruff format without --force-exclude"
python -m ruff format --check --config .ruff.toml excluded.py || true

echo
echo "ruff format with --force-exclude"
python -m ruff format --check --force-exclude --config .ruff.toml excluded.py || true

Repository: RationAI/quality-control

Length of output: 752


🏁 Script executed:

git ls-files | grep -E "(\.ruff\.toml|\.pre-commit-config\.yaml|piqe\.py)" | head -20

Repository: RationAI/quality-control

Length of output: 163


🏁 Script executed:

cat -n .ruff.toml | head -20

Repository: RationAI/quality-control

Length of output: 640


🏁 Script executed:

cat -n .pre-commit-config.yaml | sed -n '15,25p'

Repository: RationAI/quality-control

Length of output: 321


Add --force-exclude to both Ruff hooks to ensure the excluded vendored file is not linted or formatted.

Pre-commit passes staged files explicitly to Ruff, which bypasses extend-exclude patterns in .ruff.toml without the --force-exclude flag. This can cause the excluded piqe.py file to be checked and formatted unexpectedly.

Suggested change
      - id: ruff
        args: [--fix, --force-exclude]
      # Run the formatter.
      - id: ruff-format
+        args: [--force-exclude]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
hooks:
# Run the linter.
- id: ruff
entry: pdm lint --force-exclude
args: [--fix]
# Run the formatter.
- id: ruff-format
hooks:
# Run the linter.
- id: ruff
args: [--fix, --force-exclude]
# Run the formatter.
- id: ruff-format
args: [--force-exclude]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.pre-commit-config.yaml around lines 17 - 22, Update the ruff and
ruff-format pre-commit hooks to pass the --force-exclude flag so excluded
vendored files (e.g., piqe.py) are not linted or formatted; specifically, add
--force-exclude to the args array for the hook with id "ruff" (currently args:
[--fix]) and add --force-exclude to the hook with id "ruff-format" so both hooks
honor .ruff.toml exclude patterns even when pre-commit passes staged files
explicitly.

Comment thread .ruff.toml Outdated
Comment thread README.md
of the complete QC methods to allow for easier debugging and experimenting.

TODO: Add link to mkdocs documentation No newline at end of file
TODO: Add link to mkdocs documentation

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Don't ship a literal TODO in the published README.

README.md is also the project readme in pyproject.toml, Line 12, so this placeholder will show up anywhere the package metadata is rendered.

If you want, I can draft the final docs-link line once the MkDocs URL is settled.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 8, Remove the literal "TODO: Add link to mkdocs
documentation" from README.md and replace it with a real documentation link or a
neutral placeholder that won't be published (e.g., "Documentation:
https://docs.example.com" or "Documentation: link to be added"); ensure the same
README referenced by pyproject.toml (line 12) no longer contains the TODO string
so package metadata renders cleanly. Locate the README.md line that contains the
TODO and update the markdown to either the final MkDocs URL or a non-TODO
placeholder; if the URL is not yet available, use a clear placeholder like
"Documentation: link to be added" instead of "TODO".

@TomasBalak TomasBalak marked this pull request as draft March 9, 2026 20:11
@TomasBalak TomasBalak removed the request for review from matejpekar March 9, 2026 21:03
@TomasBalak TomasBalak closed this Mar 9, 2026
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.

1 participant