Skip to content

chore: drop .rhiza/requirements and move the make layer to rhiza v1.3.3 - #93

Closed
tschm wants to merge 3 commits into
alihaskar:masterfrom
tschm:rhiza_v1.3.3_bootstrap
Closed

chore: drop .rhiza/requirements and move the make layer to rhiza v1.3.3#93
tschm wants to merge 3 commits into
alihaskar:masterfrom
tschm:rhiza_v1.3.3_bootstrap

Conversation

@tschm

@tschm tschm commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Removes .rhiza/requirements/ and brings the rhiza v1.3.3 make layer that replaces it.

.rhiza/requirements/*.txt was a second dependency manifest sitting beside pyproject.toml: make install pip-installed every file in it into the project venv up front. In v1.3.3 the directory is gone and each target provisions what it needs on the fly — uv run --with pytest --with pytest-timeout … — so the venv holds the project's own dependencies and nothing else.

Why the make layer comes with it

Removing the lists on their own does not work:

  • the v1.3.3 bootstrap.mk no longer defines install. It moves to the new python.mk, which also takes over test, typecheck, security, license and docs-coverage from the old test.mk/quality.mk — so mixing old and new files gives duplicate target definitions;
  • the old .rhiza/tests suite asserts against the old layout: it copies make.d files into a temp dir and inspects make -sn test. It fails as soon as test moves to python.mk. The v1.3.3 suite in chore: update .rhiza/tests to the rhiza v1.3.3 layout, and make it pass #92 replaces it, which is why this branch is stacked there.

Two things that fall out of it

make license now passes. The old tests.txt pulled in pygal, which is LGPLv3+, and the license gate fails on LGPL. The pinned list was itself the violation:

fail-on license GNU Lesser General Public License v3 or later (LGPLv3+)
    was found for package pygal:3.1.3

typecheck needed pinning. v1.3.3 changes its default from ty to both, which adds mypy --strict. That reports 43 errors in src/ — missing generic parameters, Any returns, no pandas stubs — none introduced here and all pre-dating the upgrade. custom-env.mk pins TYPECHECKER ?= ty, holding the gate exactly where master has it rather than turning a template bump into a source rewrite. make typecheck TYPECHECKER=mypy still runs it on demand, and the pin is one line to drop once the source is strict-clean.

Verification

Run against a venv pruned to the locked set, so it matches a fresh CI checkout rather than a developer machine carrying leftovers:

Target Result
make install ok
make test 172 passed, 100% coverage
make rhiza-test 37 passed, 3 skipped
make docs-coverage 100%
make security ok (bandit)
make deps no dependency issues
make typecheck ok (ty)
make license ok

Not run here: make fmt, which rewrites files, and the optional benchmark/stress/mutation tiers.

Stacking

Based on #92 (the .rhiza/tests layout), so this PR shows that branch's commits until it merges. Merge #92 first. The remaining pieces of the same template sync — workflow pins, root tooling config, the lockfile — are in tschm#27 in my fork and are not needed for anything here.

tschm and others added 3 commits August 18, 2026 00:11
v1.3.3 replaces the nested .rhiza/tests/{api,integration,shell,stress,
structure,sync,utils} tree with five flat modules. test_docstrings.py moves
unchanged; test_pyproject.py and test_readme_validation.py move and are
rewritten; test_readme.py and test_release_tags.py are new. The rest of the
old tree goes, along with test_utils.py, whose helpers the flat modules no
longer import.

Isolated from #27 on request so the test-suite churn — 445 insertions
against 2627 deletions — is reviewable on its own.

Note that it does not stand up alone: quality.mk's rhiza-test provisions
this layout's dependencies (pytest-timeout, python-dotenv, packaging),
python.mk reads .rhiza/tests/test_pyproject.py, and pytest.ini supplies the
pythonpath these modules import through. All three land in #27, which is
stacked on this branch. Expect CI to be red here until both have merged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
test_no_license_classifier: PyPI deprecated the `License ::` trove
classifiers in favour of the license field, so the MIT one is dropped.
`license = {text = "MIT"}` still carries it — the built wheel reports
License: MIT with no license classifiers.

test_a_discoverable_config_exists: the bumpversion config lived in
.rhiza/.cfg.toml, which bump-my-version never searches. It searches
.bumpversion.toml, .bumpversion.cfg, setup.cfg and pyproject.toml, and on
finding none does not fail — it falls back to `git describe` and treats the
newest reachable tag as the current version, so a release can be cut at a
number already published. A [tool.bumpversion] table now lives in
pyproject.toml.

The table is deliberately three settings and no current_version:
bump-my-version rewrites PEP 621 [project].version natively, and commit/tag
stay false because the release flow makes its own commit and tag. The stale
.rhiza/.cfg.toml is removed in the stacked PR, where the rest of the paths
v1.3.3 dropped are removed; until then it is inert, since nothing
auto-discovers that path.

.rhiza/tests now reports 37 passed, 3 skipped.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
.rhiza/requirements/*.txt was a second dependency manifest: `make install`
pip-installed every file in it into the project venv up front. v1.3.3 drops
the directory and has each target provision what it needs on the fly instead
(`uv run --with pytest --with pytest-timeout …`), so the venv holds the
project's own dependencies and nothing else.

Removing the lists alone would not work, which is why the make layer comes
with them:

- the v1.3.3 bootstrap.mk no longer defines `install` at all — that moves to
  the new python.mk, which also takes over test, typecheck, security,
  license and docs-coverage from the old test.mk and quality.mk, so mixing
  old and new files gives duplicate target definitions;
- the old .rhiza/tests suite asserts against the old layout (it copies
  make.d files into a temp dir and inspects `make -sn test`), so it fails the
  moment `test` moves to python.mk. The v1.3.3 suite this branch is stacked
  on replaces it.

Two knock-on effects worth naming:

- `make license` now passes. The old tests.txt pulled in pygal, which is
  LGPLv3+, and the license gate fails on LGPL — the pinned list was itself
  the violation.
- v1.3.3 changes the `typecheck` default from ty to `both`, adding
  `mypy --strict`. That reports 43 errors in src/ that pre-date this branch,
  so custom-env.mk pins TYPECHECKER to ty, holding the gate exactly where
  master has it rather than turning a template bump into a source rewrite.
  `make typecheck TYPECHECKER=mypy` still runs it.

Verified against a venv pruned to the locked set, so it matches a fresh CI
checkout: install, test (172 passed, 100% coverage), rhiza-test (37 passed,
3 skipped), docs-coverage (100%), security, deps, typecheck and license all
pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 18, 2026 03:18
tschm added a commit to tschm/pycharting that referenced this pull request Aug 18, 2026
The remainder of the v0.18.8 -> v1.3.3 sync: the rhiza_*.yml callers repinned
from @v0.19.9 to @v1.3.3, three new workflows (fuzzing, mutation, scorecard),
root tooling config, docs, shell completions, cliff.toml and the lock.

The rest of the same sync is split out and already reviewable on its own —
the .rhiza/tests layout (alihaskar#92 upstream), the make layer and the
.rhiza/requirements removal (alihaskar#93 upstream), and the GitHub repo metadata
(alihaskar#91 upstream). What is left here is what those three do not need.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
tschm added a commit to tschm/pycharting that referenced this pull request Aug 18, 2026
.github/workflows/rhiza_sync.yml, .rhiza/.cfg.toml, .rhiza/.rhiza-version and
.rhiza/utils/. The other paths v1.3.3 dropped go with the branches that make
them obsolete: .rhiza/requirements and make.d/releasing.mk in alihaskar#93 upstream,
the old .rhiza/tests tree in alihaskar#92.

.rhiza/.cfg.toml held the bumpversion config that alihaskar#92 moved into
pyproject.toml, where bump-my-version actually looks for it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@tschm tschm closed this Aug 18, 2026

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

This PR syncs the repository to the rhiza v1.3.3 “make layer” model by removing the legacy .rhiza/requirements/ manifests and updating the .rhiza/make.d/ and .rhiza/tests/ layout accordingly, while also adding a discoverable bump-my-version configuration in pyproject.toml.

Changes:

  • Remove .rhiza/requirements/*.txt and shift tooling provisioning to per-target uv run --with … usage.
  • Add/reshape rhiza make fragments (notably introducing .rhiza/make.d/python.mk) and update core make behavior.
  • Replace the legacy .rhiza/tests/** structure with the v1.3.3 flat test modules and updated shared fixtures.

Reviewed changes

Copilot reviewed 44 out of 45 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pyproject.toml Removes deprecated license classifier; adds [tool.bumpversion] config so bump-my-version is discoverable.
Makefile Updates repo-owned overrides (notably MKDOCS_EXTRA_PACKAGES) while delegating to .rhiza/rhiza.mk.
.rhiza/tests/utils/test_git_repo_fixture.py Removes legacy fixture validation tests tied to old suite structure.
.rhiza/tests/test_utils.py Removes legacy shared helpers used by the old nested test suite.
.rhiza/tests/test_release_tags.py Adds core test asserting newest tag reachability from a branch.
.rhiza/tests/test_readme.py Adds language-neutral README checks (exists + bash fences parse).
.rhiza/tests/test_readme_validation.py Refocuses on executable Python fences; removes bash/readme-existence checks moved to test_readme.py.
.rhiza/tests/test_pyproject.py Updates pyproject validation, including bumpversion discoverability and license-classifier deprecation checks.
.rhiza/tests/test_docstrings.py Adds doctest discovery/execution across modules under the source folder.
.rhiza/tests/sync/conftest.py Removes old sync-test environment scaffolding (old layout).
.rhiza/tests/structure/test_requirements.py Removes checks that enforced the now-deleted .rhiza/requirements/ layout.
.rhiza/tests/structure/test_project_layout.py Removes old root layout assertions from the previous test suite structure.
.rhiza/tests/stress/README.md Removes old stress-suite documentation (old layout).
.rhiza/tests/stress/conftest.py Removes old stress-suite CLI options/fixtures (old layout).
.rhiza/tests/stress/init.py Removes old stress test module marker package.
.rhiza/tests/shell/test_scripts.sh Removes old shell-script test harness from the suite.
.rhiza/tests/README.md Updates suite documentation to describe the v1.3.3 flat modules and ownership.
.rhiza/tests/integration/test_virtual_env_unexport.py Removes legacy integration test tied to previous make/test plumbing.
.rhiza/tests/integration/test_test_mk.py Removes legacy integration test for old test.mk behavior.
.rhiza/tests/integration/test_docs_targets.py Removes legacy integration tests around MKDOCS_EXTRA_PACKAGES behavior (old layer).
.rhiza/tests/integration/test_book_targets.py Removes legacy integration tests for book targets (old layer).
.rhiza/tests/conftest.py Simplifies shared fixtures to root/logger/latest-tag; removes mock git repo fixture setup.
.rhiza/tests/api/test_makefile_targets.py Removes legacy makefile API dry-run tests (old layout/targets).
.rhiza/tests/api/test_makefile_api.py Removes legacy makefile API tests for wrapper/extension behavior (old layout).
.rhiza/tests/api/test_make_variable_overrides.py Removes legacy tests asserting old variable override mechanics.
.rhiza/tests/api/test_github_targets.py Removes legacy GitHub target tests (replaced by new make layer structure).
.rhiza/tests/api/conftest.py Removes old temporary makefile test environment fixture (old suite structure).
.rhiza/rhiza.mk Updates core rhiza make behavior (POSIX shell guard on Windows, defaults, help/ci-os-matrix adjustments).
.rhiza/requirements/tools.txt Deletes legacy tool requirements manifest.
.rhiza/requirements/tests.txt Deletes legacy test requirements manifest.
.rhiza/requirements/README.md Deletes legacy requirements documentation.
.rhiza/requirements/marimo.txt Deletes legacy marimo requirements manifest.
.rhiza/requirements/docs.txt Deletes legacy docs requirements manifest.
.rhiza/make.d/test.mk Reduces tests bundle to optional extras (benchmark/hypothesis/stress/mutation) and switches to uv run --with ….
.rhiza/make.d/releasing.mk Removes old release/bump make targets layer file.
.rhiza/make.d/quality.mk Reframes quality targets around prek/todos/semgrep + rhiza-test runner.
.rhiza/make.d/python.mk Adds Python language layer: install, all, test, typecheck, security, docs-coverage, license, deps.
.rhiza/make.d/marimo.mk Contributes marimo folder to deptry scan and adds a license ignore accumulator entry.
.rhiza/make.d/github.mk Adds GitHub helper targets built around the gh CLI.
.rhiza/make.d/doctor.mk Updates doctor target to a double-colon rule and tweaks reporting output.
.rhiza/make.d/custom-env.mk Pins TYPECHECKER ?= ty to preserve current typecheck strictness under v1.3.3 defaults.
.rhiza/make.d/completions.mk Adds installer target for shell completions.
.rhiza/make.d/bootstrap.mk Keeps language-neutral bootstrap (install-uv, hooks, clean) and removes the old Python install recipe.
.rhiza/make.d/book.mk Updates marimo notebook export to provision marimo via uv run --with.
.rhiza/.env Documents default env var behavior and sets project overrides (folders + CI OS matrix).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .rhiza/make.d/python.mk
Comment on lines +82 to +103
# Install the dependencies from pyproject.toml (if it exists).
# --inexact leaves packages uv did not manage in place instead of pruning them each
# run, so repeated 'make' targets don't churn the environment. Per-target tooling
# (pytest, interrogate, mutmut, ...) is provisioned on the fly via `uv run --with`
# in the individual targets, so there is no separate dependency-install step here.
@if [ -f "pyproject.toml" ]; then \
if [ -f "uv.lock" ]; then \
if ! ${UV_BIN} lock --check >/dev/null 2>&1; then \
printf "${YELLOW}[WARN] uv.lock is out of sync with pyproject.toml${RESET}\n"; \
printf "${YELLOW} Run 'uv sync' to update your lock file and environment${RESET}\n"; \
printf "${YELLOW} Or run 'uv lock' to update only the lock file${RESET}\n"; \
exit 1; \
fi; \
printf "${BLUE}[INFO] Installing dependencies from lock file${RESET}\n"; \
${UV_BIN} sync $(UV_SYNC_ARGS) --inexact --frozen || { printf "${RED}[ERROR] Failed to install dependencies${RESET}\n"; exit 1; }; \
else \
printf "${YELLOW}[WARN] uv.lock not found. Generating lock file and installing dependencies...${RESET}\n"; \
${UV_BIN} sync $(UV_SYNC_ARGS) --inexact || { printf "${RED}[ERROR] Failed to install dependencies${RESET}\n"; exit 1; }; \
fi; \
else \
printf "${YELLOW}[WARN] No pyproject.toml found, skipping install${RESET}\n"; \
fi
Comment thread .rhiza/tests/README.md
Comment on lines +73 to +74
`.rhiza/tests` is on `pythonpath` (see `pytest.ini`), so intra-suite imports resolve
without any `sys.path` manipulation.
Comment thread .rhiza/make.d/quality.mk
@printf "${BLUE}[INFO] Running suppression audit...${RESET}\n"
@${UV_BIN} run python .rhiza/utils/suppression_audit.py

semgrep: install ## run Semgrep static analysis
tschm added a commit to tschm/pycharting that referenced this pull request Aug 18, 2026
The tail of the v0.18.8 -> v1.3.3 sync: the rhiza_*.yml callers repinned from
@v0.19.9 to @v1.3.3, three new workflows (fuzzing, mutation, scorecard), the
pre-commit and bandit configs, the ruff rule set, TESTS.md and the lock.

Everything separable has been separated and sent upstream: repo metadata
(alihaskar#91), the .rhiza/tests layout (alihaskar#92), the make layer and the
.rhiza/requirements removal (alihaskar#93), the packaging test and pytest.ini (alihaskar#94),
and the inert config and data files (alihaskar#95). What is left needs the v1.3.3 make
layer underneath it, or in ruff.toml's case needs source changes first.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
tschm added a commit to tschm/pycharting that referenced this pull request Aug 18, 2026
.github/workflows/rhiza_sync.yml, .rhiza/.cfg.toml, .rhiza/.rhiza-version and
.rhiza/utils/. The other paths v1.3.3 dropped go with the branches that make
them obsolete: .rhiza/requirements and make.d/releasing.mk in alihaskar#93, the old
.rhiza/tests tree in alihaskar#92.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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