Repository navigation
One name per thing: model for the spec, approximation for the tree - #5
Merged
Merged
Conversation
The spec's top-level key has been `model` since a66ea1c, and the archive of a spec stores the realized spec under the key the spec uses. The README, the archive guide and several docstrings still showed `Problem:`; they now say `model:`. `Problem:` and `problem:` still fold to `model:` on read. The functions that build and check the tree a solver writes were named for a domain, which is also the region a problem is posed on. They are now named for an approximation, which is what the archive of a spec already calls the tree (outputs[key].approximation): new_domain -> new_approximation validate_domain -> validate_approximation canonicalize_domain -> canonicalize_approximation select_domain -> select_approximation rebase_domain -> rebase_approximation inline_domain -> inline_approximation domain_arrays -> approximation_arrays The old names are the same function objects, exported as before, so Proteus (which calls all seven positionally) needs no change in lockstep. The solver file's `domain:` key and the parameter names are unchanged: the key is part of ymf_archive_version 2. Tests, before (dead-keys, 7f68da3) -> after: every extra 612 passed, 2 skipped, 1 xfailed -> 615, 2, 1 ymf[spec] alone 438 passed, 19 skipped, 1 xfailed -> 441, 19, 1 ymf[units] alone 333 passed, 48 skipped -> 334, 48 ymf[symbolic] alone 539 passed, 14 skipped, 1 xfailed -> 542, 14, 1 New: the old key still reads as model (two cases), and the old function names are the new functions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 #4 (which carries #1 and #2). Its own commit is 40d0bcc; merge #1, #2 and #4 first.
PR 4 of the ymf cleanup plan (§ 4.3, names). Decision 3 left
approximationorrecordopen. This usesapproximation, the name the archive of a spec already gives the tree (outputs[key].approximation). Say so if you wantrecordinstead: it is one scripted rename.What changes
Problem:→model:in the text. The archive of a spec already writesmodel:: it stores the spec under the key the spec uses, which has beenmodelsince a66ea1c. The README,archive-format.mdand docstrings inclosure,archive,cli,xdmf,compose,schemaandunitsstill saidProblem, and so did three test inputs.Problem:andproblem:still fold tomodel:on read, and a new test pins that.Seven archive-tree functions renamed, so
domainmeans only the region (model.strong_form.domain,ymf.domain):new_domainnew_approximationvalidate_domainvalidate_approximationcanonicalize_domaincanonicalize_approximationselect_domainselect_approximationrebase_domainrebase_approximationinline_domaininline_approximationdomain_arraysapproximation_arraysThe old names are the same function objects. They stay in
ymf.archive.__all__, and the three thatymfexported are still exported there. They issue no warning, for one release.Not changed. The solver file's
domain:key belongs toymf_archive_version: 2, and parameter names stay as they are. The notebooks still sayProblemand move out in the examples PR.Proteus
Proteus calls all seven functions positionally from
Archiver.py,MeshTools.py,cli/ymfrun.pyand several tests, so it needs no change in lockstep. A follow-up proteus PR can switch it to the new names after this merges.Tests
ymf[spec]aloneymf[units]aloneymf[symbolic]aloneThe new tests check that the old key reads as
model(two cases) and that the old function names are the new functions. In the units-only install the composition tests skip, so it gains one test. The xfail is the composed-domain test that #3 fixes.🤖 Generated with Claude Code