refactor: migration and tooling#3
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Code Review
This pull request migrates the project's dependency management and development environment setup from PDM to UV, updates documentation and configuration files accordingly, and adds exclusions for an external PIQE module. While the changes are a great step forward, several issues were identified in the documentation and configuration. Specifically, there is an incorrect module path in .mypy.ini, a Python 3.11 syntax error in the documentation's f-string examples, a variable name mismatch causing a NameError, and outdated parameter descriptions for the folding function. Additionally, the git sources in pyproject.toml should be updated to point to GitHub instead of GitLab.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| explicit_package_bases = True | ||
|
|
||
| # Ignore type errors in the external piqe.py file | ||
| [mypy-rationai.qc.focus.piqe] |
There was a problem hiding this comment.
The module name is incorrectly specified as rationai.qc.focus.piqe instead of rationai.qc.blur.piqe. Since the file is located at rationai/qc/blur/piqe.py, the correct module path is rationai.qc.blur.piqe. Because of this mismatch, mypy will not correctly ignore errors in the intended file.
[mypy-rationai.qc.blur.piqe]
| print(f"Number of flagged pixels: {artifacts["number_of_flagged_pixels"]}") | ||
| print(f"Number of examined pixels: {artifacts["number_of_examined_pixels"]}") |
There was a problem hiding this comment.
In Python 3.11 (which is the target version specified in .ruff.toml), nesting double quotes inside a double-quoted f-string results in a SyntaxError. Please use single quotes for the dictionary keys to ensure compatibility with Python 3.11.
| print(f"Number of flagged pixels: {artifacts["number_of_flagged_pixels"]}") | |
| print(f"Number of examined pixels: {artifacts["number_of_examined_pixels"]}") | |
| print(f"Number of flagged pixels: {artifacts['number_of_flagged_pixels']}") | |
| print(f"Number of examined pixels: {artifacts['number_of_examined_pixels']}") |
|
|
||
|
|
||
| img = np.asarray(Image.open("fold.png").conver("RGB")) # Investigated image | ||
| img = np.asarray(Image.open("fold.png").convert("RGB")) # Investigated image |
There was a problem hiding this comment.
There is a mismatch in the variable name used for the local area image. On line 208, it is defined as local_area_image =img_area = ... (which also lacks a space around the = operator), but on lines 218 and 228, local_area_img is used. This will cause a NameError when running the example. Please update line 208 to define local_area_img directly:
local_area_img = np.asarray(Image.open("fold_area.png").convert("RGB")) # Local area of investigated image| The `level_downsample argument` is the downsample rate between the highest resolution level and the level from which the image was taken. | ||
| `nuclues_diameter_at_base_level` specifies the nucleus diameter at the highest resolution level (it can be easily measured when browsing the WSI). |
There was a problem hiding this comment.
| rationai-masks = { git = "https://gitlab.ics.muni.cz/rationai/digital-pathology/libraries/masks.git" } | ||
| rationai-staining = { git = "https://gitlab.ics.muni.cz/rationai/digital-pathology/libraries/staining.git" } |
There was a problem hiding this comment.
Migrating from GitLab to GitHub (1/6)
Overview
This PR contains the following changes:
Merge Order
Out of the 6 PRs containing the latest features and changes, this one needs to be merged first.