Conversation
📝 WalkthroughWalkthroughThis pull request establishes comprehensive documentation infrastructure for the RationAI Python SDK. It introduces MkDocs configuration, creates new documentation pages covering quick starts and architecture, adds API reference documentation, updates the README with corrected code examples, and configures a GitHub Actions workflow for documentation builds. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Summary of ChangesHello @matejpekar, 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 significantly enhances the RationAI Python SDK by introducing a robust documentation system using MkDocs. It establishes a dedicated Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive documentation for the RationAI Python SDK, including a quick start guide, an explanation of how it works, and API references. The changes are excellent and greatly improve the project's usability. I've identified a couple of minor issues in the code examples within README.md that are missing necessary imports, and a recurring typo in the mkdocstrings syntax across the new API reference files which would prevent them from rendering correctly. Addressing these points will make the documentation perfect.
| async def bounded_segment(client, path): | ||
| async with semaphore: | ||
| image = load_image(path) | ||
| image = Image.open(path).convert("RGB") |
| async def bounded_request(client, path): | ||
| async with semaphore: | ||
| image = load_image(path) | ||
| image = Image.open(path).convert("RGB") |
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive MkDocs-based documentation for the RationAI Python SDK. The documentation includes user guides, API reference, and configuration for generating versioned documentation with Material for MkDocs theme.
Changes:
- Added docs dependency group with MkDocs, mkdocs-material, mkdocstrings, and related packages
- Created complete documentation structure with quick-start guide, conceptual documentation, and API reference
- Updated CI pipeline to build and deploy documentation (removed unused Pytest stage)
- Minor formatting improvements to README.md code examples
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Added docs dependency group with MkDocs tooling |
| mkdocs.yml | MkDocs configuration with Material theme and mkdocstrings for API docs |
| docs/index.md | Landing page with minimal examples |
| docs/learn/get-started/quick-start.md | Comprehensive quick-start guide with sync/async examples |
| docs/learn/how-it-works.md | Technical documentation explaining SDK internals |
| docs/reference/client.md | API reference for Client and AsyncClient |
| docs/reference/resources/models.md | API reference for Models resources |
| docs/reference/resources/qc.md | API reference for QC resources |
| docs/reference/types/qc.md | API reference for QC types |
| README.md | Fixed code examples and formatting (whitespace cleanup) |
| .gitlab-ci.yml | Removed unused Pytest stage, added MkDocs deployment |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| The SDK retries up to 3 times **only for HTTP 500** responses (using `tenacity`). | ||
|
|
||
| "Paths are evaluated by the server" |
There was a problem hiding this comment.
This appears to be a section heading but isn't formatted as one. It should either be formatted as a heading (e.g., #### Paths are evaluated by the server) or integrated into the paragraph below as regular text without quotes.
| "Paths are evaluated by the server" | |
| #### Paths are evaluated by the server |
|
|
||
| ### Input image requirements | ||
|
|
||
| - The server expects an **uint8 RGB** image. |
There was a problem hiding this comment.
Grammar error: should be "a uint8" not "an uint8" because "uint8" is pronounced starting with a consonant sound ("you-int-eight").
| - The server expects an **uint8 RGB** image. | |
| - The server expects a **uint8 RGB** image. |
| result = client.models.classify_image("model-name", image) | ||
| print(result) |
There was a problem hiding this comment.
Code blocks should use spaces for indentation, not tabs. The rest of the codebase and documentation (including quick-start.md and README.md) consistently uses spaces. Please replace tabs with 4 spaces to maintain consistency.
| xopat_url = client.qc.check_slide( | ||
| wsi_path="/data/slides/slide.svs", | ||
| output_path="/data/qc-output/slide-001", | ||
| ) |
There was a problem hiding this comment.
Code blocks should use spaces for indentation, not tabs. The rest of the codebase and documentation (including quick-start.md and README.md) consistently uses spaces. Please replace tabs with 4 spaces to maintain consistency.
| - PIL: `image.size` → `(width, height)` | ||
| - NumPy: `image.shape[:2]` → `(height, width)` | ||
|
|
||
| So the server response is expected to contain exactly $N \cdot H \cdot W$ float16 values (after decompression), where $N$ is the number of output classes. |
There was a problem hiding this comment.
LaTeX math notation (
| So the server response is expected to contain exactly $N \cdot H \cdot W$ float16 values (after decompression), where $N$ is the number of output classes. | |
| So the server response is expected to contain exactly N * H * W float16 values (after decompression), where `N` is the number of output classes. |
| - `output_path`: where masks should be written | ||
| - configuration flags from `SlideCheckConfig` | ||
|
|
||
| The SDK retries up to 3 times **only for HTTP 500** responses (using `tenacity`). |
There was a problem hiding this comment.
This statement is inconsistent with line 100 which correctly states "up to 3 attempts". With tenacity's stop_after_attempt(3), the SDK will make up to 3 attempts total (1 initial + 2 retries), not retry 3 times (which would be 4 total attempts). Change "retries up to 3 times" to either "attempts up to 3 times" or "retries up to 2 times" to match line 100 and the actual implementation.
| The SDK retries up to 3 times **only for HTTP 500** responses (using `tenacity`). | |
| The SDK makes up to 3 attempts **only for HTTP 500** responses (using `tenacity`). |
Summary by CodeRabbit
Documentation
Chores