Repository navigation
A file in an extends chain may tag its parent's region without restating its kind - #3
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>
A child that only adds boundary_tags to the region its model states was refused: "required key(s) 'kind' not found". _partial, which relaxes the schema for the files of a chain, descended into mappings and lists of mappings but not into an alternative, and the domain is Str() | Map(...), so its mapping kept `kind` required in every file. Both sides of an alternative are now relaxed; the composed domain is still checked against its kind by ymf.domain.validate_domain_block, as before. Blast radius, walked over YMF_SCHEMA: three alternatives hold a mapping (unknowns[], strong_form.domain, coefficients.*), and _partial reaches only the domain (it does not descend a Seq of alternatives or a MapPattern). So this changes one site. | suite | before | after | |-------------------------------|-----------------------------------|------------------------| | every extra (petsc-dev) | 604 passed, 2 skipped, 1 xfailed | 605 passed, 2 skipped | | ymf[spec] alone | 430 passed, 19 skipped, 1 xfailed | 431 passed, 19 skipped | | ymf[symbolic] alone | 531 passed, 14 skipped, 1 xfailed | 532 passed, 14 skipped | The xfail(strict=True) on test_a_child_may_tag_the_region_its_parent_states comes off. 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.
Stacked on #2. This PR's own commit is the last one,
A file in an extends chain may tag…. The two commits before it belong to #2, so merge #2 first.A child file that only adds
boundary_tagsto the region its model states was refused with "required key(s) 'kind' not found"._partialrelaxes the schema for the files of anextendschain. It descended into mappings and lists of mappings, but not into an alternative. The domain isStr() | Map(...), so its mapping keptkindrequired in every file. Both sides of an alternative are now relaxed. The composed domain is still checked against its kind byymf.domain.validate_domain_block.What else this touches. Walking
YMF_SCHEMAfinds three alternatives that hold a mapping:unknowns[],strong_form.domainandcoefficients.*._partialreaches only the domain, because it does not descend into a list of alternatives or a pattern map. So only one place in the schema changes.ymf[spec]aloneymf[symbolic]aloneThe strict xfail that #2 put on
test_a_child_may_tag_the_region_its_parent_statescomes off. All runs were local on macOS arm64. CI has not run on the fork yet.🤖 Generated with Claude Code