Skip to content

chore: Sync with rhiza#295

Merged
tschm merged 1 commit intomainfrom
rhiza/20904134037
Jan 12, 2026
Merged

chore: Sync with rhiza#295
tschm merged 1 commit intomainfrom
rhiza/20904134037

Conversation

@tschm
Copy link
Copy Markdown
Member

@tschm tschm commented Jan 12, 2026

This pull request synchronizes the repository with its template.

Changes were generated automatically using rhiza.

Summary by CodeRabbit

  • Chores

    • Improved Python version detection for Docker builds.
    • Reorganized script folder structure for enhanced customization support.
    • Added new development tool dependencies.
  • Documentation

    • Added guide for customizing API documentation and minibook templates.

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 12, 2026

📝 Walkthrough

Walkthrough

The pull request refactors build infrastructure and tooling configuration by extracting Python version handling to GitHub Actions, relocating customization folder paths, consolidating Makefile targets across .rhiza/, updating copilot binary resolution to prefer PATH lookup, and adding documentation on customization procedures.

Changes

Cohort / File(s) Summary
GitHub Actions & Python Version Management
.github/workflows/rhiza_docker.yml, Makefile
Extracts Python version from .python-version file (default 3.12) and passes it as build argument to Docker Buildx. Moves PYTHON_VERSION export logic from main Makefile to centralized workflow step.
Environment & Configuration
.rhiza/.env
Updates CUSTOM_SCRIPTS_FOLDER path from .rhiza/scripts/customisations to .rhiza/customisations/scripts.
Build Tooling & Makefiles
.rhiza/Makefile.rhiza, .rhiza/agentic/Makefile.agentic
Introduces RHIZA_LOGO constant and print-logo target in .rhiza/Makefile.rhiza. Refactors copilot binary resolution in .rhiza/agentic/Makefile.agentic to prefer PATH lookup via command -v with fallback to $(INSTALL_DIR)/copilot.
Dependencies
.rhiza/requirements/tools.txt
Adds typer==0.21.1 development tool dependency.
Documentation
book/README.md
Adds "Documentation Customization" section describing API documentation (pdoc) and minibook template customization procedures.
Tests
tests/test_rhiza/test_makefile.py
Updates CUSTOM_SCRIPTS_FOLDER test expectations to reflect new path .rhiza/customisations/scripts. Refactors test setup to deterministically create .rhiza/.env instead of conditionally copying.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 Paths reorganized with care,
Python versions float through the air!
Makefiles consolidated bright,
Build tools configured just right ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'chore: Sync with rhiza' is generic and vague, using non-descriptive language that doesn't convey meaningful information about the specific changes in the changeset. Consider using a more descriptive title that highlights the main changes, such as 'chore: Reorganize scripts paths and add Python version build arg' or 'chore: Refactor documentation, makefiles, and dependencies per rhiza template'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

Copy link
Copy Markdown
Contributor

@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

🤖 Fix all issues with AI agents
In @.rhiza/agentic/Makefile.agentic:
- Around line 24-28: The Makefile uses an undefined color variable `${SUCCESS}`
in the install check printf, causing missing color output; either define SUCCESS
as the intended color alias (e.g., SUCCESS := ${GREEN}) near the other color
vars or replace `${SUCCESS}` with the existing `${GREEN}` in the printf call
inside the copilot install conditional to restore the expected green message
formatting.
🧹 Nitpick comments (1)
.github/workflows/rhiza_docker.yml (1)

54-65: Quote $GITHUB_OUTPUT for shell safety.

While $GITHUB_OUTPUT is typically a safe path set by GitHub Actions, quoting it protects against edge cases with spaces or special characters.

Suggested fix
       run: |
         if [ -f .python-version ]; then
           PYTHON_VERSION=$(cat .python-version | tr -d '[:space:]')
-          echo "version=$PYTHON_VERSION" >> $GITHUB_OUTPUT
+          echo "version=$PYTHON_VERSION" >> "$GITHUB_OUTPUT"
           echo "Using Python version: $PYTHON_VERSION"
         else
-          echo "version=3.12" >> $GITHUB_OUTPUT
+          echo "version=3.12" >> "$GITHUB_OUTPUT"
           echo "::warning::.python-version not found, using default 3.12"
         fi
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 47f4983 and c08d896.

📒 Files selected for processing (8)
  • .github/workflows/rhiza_docker.yml
  • .rhiza/.env
  • .rhiza/Makefile.rhiza
  • .rhiza/agentic/Makefile.agentic
  • .rhiza/requirements/tools.txt
  • Makefile
  • book/README.md
  • tests/test_rhiza/test_makefile.py
🧰 Additional context used
🧬 Code graph analysis (1)
tests/test_rhiza/test_makefile.py (2)
tests/test_rhiza/test_makefile_gh.py (1)
  • run_make (55-71)
tests/test_rhiza/conftest.py (1)
  • logger (147-153)
🪛 dotenv-linter (4.0.0)
.rhiza/.env

[warning] 4-4: [UnorderedKey] The CUSTOM_SCRIPTS_FOLDER key should go before the MARIMO_FOLDER key

(UnorderedKey)

🔇 Additional comments (11)
book/README.md (1)

24-45: Well-structured documentation addition with clear instructions.

The documentation accurately describes pdoc's customizable HTML templates feature, and the instructions for both API documentation and minibook customization are clear and actionable.

However, please verify that the anchor fragment in the link on line 37 is correct. The URL https://pdoc.dev/docs/pdoc.html#templates should be tested to ensure it navigates to the correct section in the pdoc documentation.

🔗 Verify the documentation link

Please test the following link to confirm it works correctly:

Based on the pdoc documentation, the correct anchor might be "#edit-pdocs-html-template" instead of "#templates". Verify the link in a browser and update if necessary.

.rhiza/Makefile.rhiza (1)

4-22: LGTM!

The RHIZA_LOGO definition and print-logo target are correctly structured. The define/endef block properly handles the multi-line ASCII art, and the export ensures the variable is available to subshells. The $$RHIZA_LOGO escaping is correct for Make to pass the shell variable.

Makefile (3)

43-45: LGTM!

The Python version extraction logic correctly reads from .python-version with a sensible default of 3.12. Using ?= allows environment override, and export ensures consistency across sub-makes and recipes.


57-57: LGTM!

The optional include of docker/Makefile.docker using -include gracefully handles cases where the file may not exist.


136-137: LGTM!

Adding .benchmarks to the clean target is appropriate alongside .pytest_cache for removing test artifacts.

.github/workflows/rhiza_docker.yml (1)

67-78: LGTM!

The Docker Buildx step correctly passes the Python version as a build argument, maintaining consistency with the Makefile's single-source-of-truth approach for Python version management.

.rhiza/agentic/Makefile.agentic (1)

7-7: LGTM!

The PATH-first resolution for COPILOT_BIN is a good practice, allowing users with copilot already in their PATH to use it directly while maintaining backward compatibility with the INSTALL_DIR fallback.

.rhiza/requirements/tools.txt (1)

4-4: Version typer==0.21.1 is valid and secure.

The pinned version exists on PyPI (released Jan 6, 2026) and has no known security vulnerabilities.

.rhiza/.env (1)

1-14: LGTM!

The path reorganization from .rhiza/scripts/customisations to .rhiza/customisations/scripts is a sensible structural change that groups customization-related content under a dedicated folder. The change is consistent with the updated test expectations.

Regarding the static analysis hint about alphabetical key ordering: the current logical grouping of path-related variables together is reasonable and can be kept as-is.

tests/test_rhiza/test_makefile.py (2)

48-52: LGTM - Good improvement for test determinism.

Creating a minimal, deterministic .rhiza/.env in the test fixture ensures tests don't depend on varying local configurations. The hardcoded values match the actual .rhiza/.env file, maintaining consistency.


191-195: LGTM!

The docstring and assertion are correctly updated to reflect the new CUSTOM_SCRIPTS_FOLDER path, and they're consistent with both the fixture setup (line 51) and the actual .rhiza/.env configuration.

Comment on lines +24 to 28
@if command -v copilot >/dev/null 2>&1; then \
printf "${GREEN}[INFO] copilot already installed in PATH, skipping install.${RESET}\n"; \
elif [ -x "${INSTALL_DIR}/copilot" ]; then \
printf "${SUCCESS}[INFO] copilot already installed in ${INSTALL_DIR}, skipping install.${RESET}\n"; \
else \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Undefined SUCCESS color variable.

Line 27 uses ${SUCCESS} but the main Makefile only defines GREEN, BLUE, RED, YELLOW, and RESET. This will result in an empty string (no color output) rather than the intended green color.

Suggested fix
 	elif [ -x "${INSTALL_DIR}/copilot" ]; then \
-	  printf "${SUCCESS}[INFO] copilot already installed in ${INSTALL_DIR}, skipping install.${RESET}\n"; \
+	  printf "${GREEN}[INFO] copilot already installed in ${INSTALL_DIR}, skipping install.${RESET}\n"; \
📝 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
@if command -v copilot >/dev/null 2>&1; then \
printf "${GREEN}[INFO] copilot already installed in PATH, skipping install.${RESET}\n"; \
elif [ -x "${INSTALL_DIR}/copilot" ]; then \
printf "${SUCCESS}[INFO] copilot already installed in ${INSTALL_DIR}, skipping install.${RESET}\n"; \
else \
@if command -v copilot >/dev/null 2>&1; then \
printf "${GREEN}[INFO] copilot already installed in PATH, skipping install.${RESET}\n"; \
elif [ -x "${INSTALL_DIR}/copilot" ]; then \
printf "${GREEN}[INFO] copilot already installed in ${INSTALL_DIR}, skipping install.${RESET}\n"; \
else \
🤖 Prompt for AI Agents
In @.rhiza/agentic/Makefile.agentic around lines 24 - 28, The Makefile uses an
undefined color variable `${SUCCESS}` in the install check printf, causing
missing color output; either define SUCCESS as the intended color alias (e.g.,
SUCCESS := ${GREEN}) near the other color vars or replace `${SUCCESS}` with the
existing `${GREEN}` in the printf call inside the copilot install conditional to
restore the expected green message formatting.

@tschm tschm merged commit 2c66177 into main Jan 12, 2026
17 checks passed
@tschm tschm deleted the rhiza/20904134037 branch January 12, 2026 01:45
This was referenced Jan 26, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Feb 11, 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