Repository navigation
Tests skip without an extra; one-extra CI legs; tests for three gaps - #2
Merged
Merged
Conversation
The extras were tested only all-or-nothing: the core smoke test, then every extra at once. Installing one extra alone shows what that hid: | install | before | after | |------------------|-------------------------------------|------------------------| | ymf[spec] | 427 passed, 20 skipped | 428 passed, 19 skipped | | ymf[units] | 7 collection errors (run aborted) | 331 passed, 48 skipped | | | then 18 failed under them | | | ymf[symbolic] | 1 failed (run from tests/) | 525 passed, 14 skipped | | every extra | 596 passed, 2 skipped | 596 passed, 2 skipped | - Seven files imported ymf.schema (strictyaml) above their importorskip, or had none: test_compose, test_domain, test_examples, test_references, test_removal, test_schema, test_values. The guard now comes first. - Fifteen tests needed strictyaml or sympy and did not say so: the closure tests (one guard in their spec helper), the old-private-name alias test, the notebook round trip, three units tests. The Fourier number is in the spec notation, so without ymf[symbolic] it is asserted absent, not skipped. - Two tests opened examples/ relative to the working directory, so they passed only from the repo root; they use their own path like the rest. - A one-extra job, linux-64 / py3.12, for spec, units and symbolic: install the sdist with that extra alone, import its modules, run the suite. No module changed. Measured on macOS arm64 with python 3.13 venvs holding one extra each, and the petsc-dev env for every extra. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sify
The cleanup inventory listed four gaps to guard before any code moves; the
previous commit is the first (one-extra CI legs). These are the other three.
- units without ymf[symbolic] (test_units, 2 tests). problem-specification
promises that a bare ymf[units] install still sees the coefficients that
are already numbers. Nothing tested it. The tests hide sympy and
ymf.symbolic, so the fallback is checked in every environment, and the
units-only leg runs them for real: numbers and quoted numbers resolve,
expression and notation formulas are left out, and a neumann condition
is reported "not checked ... ymf[symbolic]" under missing_units="error"
rather than failed.
- a domain composed across files (test_domain, 3 tests). Changing the kind
in a child is refused, naming the parent's keys; replacing the region
through remove: works and is logged. Adding boundary_tags in a child to
the parent's region is refused today ("required key(s) 'kind' not
found"): _partial does not relax a Str() | Map() validator. That test is
xfail(strict=True) until the fix, a separate PR.
- classify on a coupled system (test_symbolic, 4 tests): cross-diffusion is
keyed by the other unknown, a flux that depends on another unknown is
advection, |grad phi|^2 is Hamiltonian, hamiltonian_gradients moves grad p
out of the flux, and an undeclared name is refused. The two-phase model
family builds on this step.
| install | before (previous commit) | after |
|---------------|--------------------------|------------------------------------|
| every extra | 596 passed, 2 skipped | 604 passed, 2 skipped, 1 xfailed |
| ymf[spec] | 428 passed, 19 skipped | 430 passed, 19 skipped, 1 xfailed |
| ymf[units] | 331 passed, 48 skipped | 333 passed, 48 skipped |
| ymf[symbolic] | 525 passed, 14 skipped | 531 passed, 14 skipped, 1 xfailed |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 2 of the ymf cleanup (C42 step 0). It adds the guards the inventory asked for before any code moves. No module changed. This PR is independent of #1.
Commit 1 (
1030bb6): tests skip, not error, without an extra, plus a CI job with one extra per leg. Until now the extras were tested only all or nothing. Installing one extra alone shows what that hid:ymf[spec]ymf[units]ymf[symbolic]tests/)ymf.schemaabove theirimportorskip("strictyaml"), or had no such guard.strictyamlorsympywithout saying so. The new Fourier assertion branches on sympy: withoutymf[symbolic]the notation formula is asserted absent.examples/relative to the working directory, so they passed only from the repo root.one-extra: linux-64 / py3.12, installs the sdist withspec,unitsorsymbolicalone, imports that extra's modules, and runs the suite.Commit 2 (
3ac4e63): tests for the other three gaps.remove:works and is logged. Found: a child that adds onlyboundary_tagsto its parent's region is refused with "required key(s) 'kind' not found"._partialdoes not relax aStr() | Map()validator. That test isxfail(strict=True). The four-line fix is ready and keeps 596/596 passing, and it comes as its own PR after this one.classifyon a coupled system (4 tests). Cross-diffusion is keyed by the other unknown. A flux that depends on another unknown counts as advection. A squared gradient goes in the Hamiltonian.hamiltonian_gradientsmoves the pressure gradient out of the flux. An undeclared name is refused.ymf[spec]ymf[units]ymf[symbolic]All runs were local on macOS arm64. The single-extra runs used Python 3.13 venvs with one extra each, and the full run used the petsc-dev env. The new CI job has not run yet, because Actions on this fork has not started a workflow.
🤖 Generated with Claude Code