Skip to content

Rhiza v0 18 8#26

Open
tschm wants to merge 2 commits into
alihaskar:masterfrom
tschm:rhiza_v0_18_8
Open

Rhiza v0 18 8#26
tschm wants to merge 2 commits into
alihaskar:masterfrom
tschm:rhiza_v0_18_8

Conversation

@tschm

@tschm tschm commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

run 'make sync'

  1. This will read .rhiza/template.yml
  2. It will sync with the template repo declared in that file
  3. It will update .rhiza and a few files at root level. It will not (yet) touch .github, src and tests

tschm and others added 2 commits June 8, 2026 13:25
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 8, 2026 09:33

Copilot AI 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.

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.mk will hard-fail make on first run or in any environment where .rhiza/rhiza.mk hasn’t been materialized yet (e.g., partial checkouts, shallow template consumers, or before a sync step). Consider reverting to -include .rhiza/rhiza.mk plus 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 compute UVX_BIN via command -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_fragment sequence (and optionally accept any prefix ending in uvx).
    .rhiza/tests/conftest.py:1
  • git checkout -b master can fail if the clone already has an unborn master branch (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 master or git switch -C master).
    ruff.toml:1
  • Ruff is configured for py311, but the repo includes a .python-version set 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. Align target-version with 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.

Comment thread .rhiza/make.d/quality.mk
Comment on lines +13 to +24
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
Comment thread .rhiza/make.d/book.mk
@@ -0,0 +1,58 @@
## book.mk - Book-building targets (MkDocs-based)

ROOT := $(shell git rev-parse --show-toplevel)
@tschm

tschm commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

@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):

  • make docs-coverage
  • make test
  • make fmt
  • make typecheck
  • make all

or just

  • make

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
@tschm

tschm commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

@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):

  • make docs-coverage
  • make test
  • make fmt
  • make typecheck
  • make all

or just

  • make

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

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.

2 participants