Rhiza v0 18 8#26
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR appears to sync in the latest Rhiza template updates and establish a standardized developer tooling baseline (Makefile API, lint/format config, docs config, security utilities, and a comprehensive pytest suite).
Changes:
- Added Ruff, pytest, and pre-commit configuration plus MkDocs base configuration/docs.
- Introduced/updated Rhiza Makefile infrastructure under
.rhiza/(split makefiles, utilities, completions, requirements). - Added an extensive
.rhiza/tests/suite covering structure, API, integration, sync, shell, and stress testing.
Reviewed changes
Copilot reviewed 59 out of 62 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ruff.toml | Adds Ruff lint/format configuration and per-path ignores. |
| pytest.ini | Adds pytest defaults (paths, logs, timeout, markers). |
| docs/mkdocs-base.yml | Adds a base MkDocs Material configuration for Rhiza projects. |
| docs/development/MARIMO.md | Adds documentation for running and maintaining Marimo notebooks. |
| Makefile | Switches to always include .rhiza/rhiza.mk and sets template overrides/vars. |
| .rhiza/utils/suppression_audit.py | Adds a utility to audit inline suppressions and optionally validate stale CVE suppressions. |
| .rhiza/utils/pip_audit_policy.py | Adds a tiered pip-audit policy script (fail runtime CVEs, warn tooling CVEs). |
| .rhiza/tests/utils/test_git_repo_fixture.py | Adds tests validating the git_repo fixture behavior. |
| .rhiza/tests/test_utils.py | Adds shared helpers for running make, stripping ANSI, and setting up a git repo. |
| .rhiza/tests/sync/test_readme_validation.py | Adds tests that execute README code blocks and validate bash syntax blocks. |
| .rhiza/tests/sync/test_docstrings.py | Adds doctest discovery/execution across source modules. |
| .rhiza/tests/sync/conftest.py | Adds sync-test environment setup fixture (temp repo, Makefiles, template.yml, etc.). |
| .rhiza/tests/structure/test_requirements.py | Adds structure tests for .rhiza/requirements contents. |
| .rhiza/tests/structure/test_pyproject.py | Adds strong validation of pyproject.toml structure and version/tag alignment. |
| .rhiza/tests/structure/test_project_layout.py | Adds structure tests for expected root files/dirs and CI directory presence. |
| .rhiza/tests/stress/conftest.py | Adds stress-test CLI options and fixtures. |
| .rhiza/tests/stress/init.py | Adds stress test package marker module. |
| .rhiza/tests/stress/README.md | Documents stress test purpose and how to run them. |
| .rhiza/tests/shell/test_scripts.sh | Adds a bash test harness to validate key shell scripts and their syntax. |
| .rhiza/tests/integration/test_virtual_env_unexport.py | Adds integration test for unexport VIRTUAL_ENV behavior in Makefiles. |
| .rhiza/tests/integration/test_test_mk.py | Adds integration test for test.mk behavior when no tests exist. |
| .rhiza/tests/integration/test_docs_targets.py | Adds integration tests for MKDOCS_EXTRA_PACKAGES behavior in book.mk. |
| .rhiza/tests/integration/test_book_targets.py | Adds integration tests for book targets and resilience when book assets are missing. |
| .rhiza/tests/conftest.py | Adds core test fixtures including a sandbox git repo and mocked tool binaries. |
| .rhiza/tests/api/test_makefile_targets.py | Adds API tests asserting Makefile targets and command emissions (mostly dry-run). |
| .rhiza/tests/api/test_makefile_api.py | Adds tests for Makefile API extension/override mechanisms. |
| .rhiza/tests/api/test_make_variable_overrides.py | Adds tests for Makefile variable override behavior. |
| .rhiza/tests/api/test_github_targets.py | Adds GitHub-target dry-run tests (help presence and target invocations). |
| .rhiza/tests/api/conftest.py | Adds shared setup for API tests (copy Makefile/split makefiles, chdir, env). |
| .rhiza/tests/README.md | Documents the test suite layout and usage conventions. |
| .rhiza/template.yml | Bumps template ref to v0.18.8. |
| .rhiza/template.lock | Adds lockfile capturing synced template files + sync metadata. |
| .rhiza/semgrep.yml | Adds Semgrep rules (NumPy security/repro/stability checks). |
| .rhiza/rhiza.mk | Adds core Rhiza Makefile (targets, variables, sync/validate behavior, help). |
| .rhiza/requirements/tools.txt | Adds tool requirements list. |
| .rhiza/requirements/tests.txt | Adds test requirements list. |
| .rhiza/requirements/marimo.txt | Adds Marimo requirements list. |
| .rhiza/requirements/docs.txt | Adds docs requirements list. |
| .rhiza/requirements/README.md | Documents the requirements file purpose and usage. |
| .rhiza/make.d/test.mk | Adds split makefile for test/benchmark/security/docs coverage/stress/etc. |
| .rhiza/make.d/releasing.mk | Adds split makefile for bump/release workflows and hooks. |
| .rhiza/make.d/quality.mk | Adds split makefile for fmt/deptry/security/license/semgrep/suppression audit. |
| .rhiza/make.d/marimo.mk | Adds split makefile for Marimo validate/server targets. |
| .rhiza/make.d/doctor.mk | Adds split makefile for prerequisite diagnostics. |
| .rhiza/make.d/custom-task.mk | Adds example custom task and hook extension. |
| .rhiza/make.d/custom-env.mk | Adds example custom env/variable overrides. |
| .rhiza/make.d/bootstrap.mk | Adds split makefile for uv bootstrap + install/clean targets. |
| .rhiza/make.d/book.mk | Adds split makefile for MkDocs book build/serve and notebook export. |
| .rhiza/completions/rhiza-completion.zsh | Adds zsh completion for Make targets and common variables. |
| .rhiza/completions/rhiza-completion.bash | Adds bash completion for Make targets and common variables. |
| .rhiza/completions/README.md | Documents installing/using shell completion scripts. |
| .rhiza/assets/rhiza-logo.svg | Adds Rhiza SVG logo asset for docs/branding. |
| .rhiza/.rhiza-version | Pins Rhiza toolchain version. |
| .rhiza/.gitignore | Adds Rhiza-specific ignore rules (notably allowing .env). |
| .rhiza/.env | Adds Rhiza environment defaults (MARIMO_FOLDER, SOURCE_FOLDER, OS matrix). |
| .rhiza/.cfg.toml | Adds bumpversion configuration/settings. |
| .python-version | Adds project Python version file. |
| .pre-commit-config.yaml | Adds pre-commit hooks for linting, formatting, security, lockfile, etc. |
| .gitignore | Replaces/expands ignore rules for Python/dev/docs artifacts and project outputs. |
| .github/dependabot.yml | Adds Dependabot configuration for uv + GitHub Actions. |
| .editorconfig | Adds EditorConfig defaults for consistent formatting across file types. |
| .bandit | Adds Bandit basic config (skip B101). |
Comments suppressed due to low confidence (4)
Makefile:1
- Using a non-optional
include .rhiza/rhiza.mkwill hard-failmakeon first run or in any environment where.rhiza/rhiza.mkhasn’t been materialized yet (e.g., partial checkouts, shallow template consumers, or before a sync step). Consider reverting to-include .rhiza/rhiza.mkplus a small bootstrap target/guard (like the previous conditional sync) or emitting a clear error message instructing how to materialize.rhiza/rhiza.mk.
.rhiza/tests/api/test_makefile_targets.py:1 - These assertions assume the dry-run output starts with the literal
uvx, but the Makefiles computeUVX_BINviacommand -v uvx, which commonly expands to an absolute path (e.g.,/usr/bin/uvx). This will make the tests fail even when the Makefile is correct. A more robust assertion is to check for the-p <version>+command_fragmentsequence (and optionally accept any prefix ending inuvx).
.rhiza/tests/conftest.py:1 git checkout -b mastercan fail if the clone already has an unbornmasterbranch (or if git creates it based on remote HEAD). To make the fixture idempotent across git versions/configurations, use a command that overwrites/creates deterministically (e.g.,git checkout -B masterorgit switch -C master).
ruff.toml:1- Ruff is configured for
py311, but the repo includes a.python-versionset to 3.12 and the Makefile defaults/tooling appear to target 3.12+ in places. This mismatch can cause Ruff to flag/ignore syntax incompatibly. Aligntarget-versionwith the project’s actual minimum supported Python (or explicitly document why Ruff is pinned to 3.11).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| deptry: install-uv ## Run deptry | ||
| @if [ -d ${SOURCE_FOLDER} ]; then \ | ||
| $(UVX_BIN) -p ${PYTHON_VERSION} deptry ${SOURCE_FOLDER}; \ | ||
| fi | ||
|
|
||
| @if [ -d ${MARIMO_FOLDER} ]; then \ | ||
| if [ -d ${SOURCE_FOLDER} ]; then \ | ||
| $(UVX_BIN) -p ${PYTHON_VERSION} deptry ${MARIMO_FOLDER} ${SOURCE_FOLDER} --ignore DEP004; \ | ||
| else \ | ||
| $(UVX_BIN) -p ${PYTHON_VERSION} deptry ${MARIMO_FOLDER} --ignore DEP004; \ | ||
| fi \ | ||
| fi |
| @@ -0,0 +1,58 @@ | |||
| ## book.mk - Book-building targets (MkDocs-based) | |||
|
|
|||
| ROOT := $(shell git rev-parse --show-toplevel) | |||
|
@alihaskar once you have merged this into your master branch you have rhiza's Makefile system in place. You can try (from the command line or even better directly from Claude):
or just
No changes in src or tests at this stage at all. To get an idea where this is heading checkout jebel-quant/jquantstats or cvxgrp/cvxcla or tschm/pyhrp |
1 similar comment
|
@alihaskar once you have merged this into your master branch you have rhiza's Makefile system in place. You can try (from the command line or even better directly from Claude):
or just
No changes in src or tests at this stage at all. To get an idea where this is heading checkout jebel-quant/jquantstats or cvxgrp/cvxcla or tschm/pyhrp |
run 'make sync'