Take a solid's row into the elastic simulation and the detailed building model, a ground's into the outdoor models, and complete a catalogue file in your editor with its JSON Schema (#891)
* Take a solid's row into the elastic simulation and the detailed building model, a ground's into the outdoor models, and write the JSON Schema of a catalogue file
The elastic FDTD takes a solid's catalogue row wherever it takes a Material: scholte_speed and ElasticFDTD2D.from_regions read its bulk longitudinal speed, its transverse speed and its density through printed(), never its plate or bar speed, and refuse a cell the page does not print in the page's terms.
GroundSurface.medium turns a ground row into the porous half-space ground_effect, barrier_insertion_loss and atmospheric_parabolic_equation take, through the Delany and Bazley or the Miki model. A row Cox and D'Antonio mark as fitted with one model goes into that model only.
HomogeneousElement.from_solid builds the ISO 12354 element a layer of a solid's row makes, with m' = rho t and fc = c0^2 / (1.8 cL t) from the row's density and plate speed, and never picks one of the row's loss factors: the internal loss factor is the caller's to give.
io.catalogue_schema writes the JSON Schema (2020-12) of a catalogue document for the row classes it is given, and the site publishes the one of every published row class as schemas/phonometry-catalogue-1.json, held current by CI. A document may name it in a top-level $schema, which the reader takes and never reads.
* A dollar sign inside inline code opens no maths in the markdown check
The unclosed-maths rule counted every unescaped $ on a line, so the $schema key of a JSON document written as inline code in a table cell read as maths cut off by the next row. CommonMark reads a code span before any maths could open in it, so the rule now leaves code spans out of the count, and still finds maths that wraps onto a block marker, on a line with a code span or without one.
* The catalogues guide hands a solid, a ground and a wall of your own to their models, and completes a catalogue file in your editor
The guide on catalogues of your own shows a solid's row read from a data sheet going into the elastic simulation by its bulk speeds, a ground fitted to a site going into the outdoor models through medium(), with the refusal of a resistivity fitted with another model, and a block's density and plate speed building an ISO 12354 element with the internal loss factor you give. A new section writes the JSON Schema of a catalogue file with io.catalogue_schema, points a document at it with $schema, and sets an editor to the one the site publishes; the document's keys now list $schema. The elastic waves, ground effect and detailed prediction guides each take a row from a catalogue in their own terms, the published catalogues page draws its ground example through medium() and links the schema, and the Files overview and the guide indexes name it, in English, in Spanish and in the docs mirror.
* The catalogue schema describes a row class by the first line of its docstring, or by its name when it has none
* The JSON Schema writer is held to its place in io's public names
* The elastic FDTD reads a row's fields through the dataclasses module, which no local name of the module shadows
* A wetted sand of Cox Table 6.7 goes into neither outdoor ground model, as the text beside the table says
GroundSurface.medium took the eight rows of the two sands Cox and D'Antonio print at four water contents into the Delany and Bazley and the Miki models, because no footnote marks their fit. The text of Sect. 6.6.3 (PDF page 272, printed p. 215) says their parameters are those of the two-parameter model of Attenborough, so a row the text ties to that model is now refused by both, naming the page, as a row the footnotes mark with another model already was. The notes of the eight rows say so on the catalogues page, in both languages, and the docstring no longer says Cox names the fit on every row.
* The schema never marks a catalogue file the reader reads, a null in an optional key included
The reader took a null for basis, $schema and phonometry_version, and a $schema or a version of any length, all of which the schema refuses. It now refuses a null there as it does under every other key, and holds the two texts to the length of any other text. The schema holds the standards a row's own provenance names to the fields of its class, as it already held the document's. Each refused case is now checked against the place and the first words of the reader's refusal, so a case refused for another reason than its name fails; the one that was, a negative thickness written beside the same cell in another unit, now gives the negative thickness alone. A CSV file's header that names the schema is read as one that does not.
* The oracles of a solid's row in the building and elastic models cite the page each number is printed on
The detailed-model test took 600 kg/m3 for autoclaved aerated concrete from ISO 12354-1 Table B.3, which prints 400 to 800; it now reads the three materials off the Annex L element block (PDF page 84, printed p. 78), which prints the density and velocity of each, and says Annex L takes 600 from that range. The elastic test writes the modulus, Poisson ratio and density Bies Table C.1 prints for mild steel (PDF page 747, printed p. 718) as literals and holds the row's bulk and transverse speeds to their closed forms, rather than reading them back from the row under test. The elastic FDTD's docstrings say a row class is refused when it lacks any of the three cells, not only all of them.
* The catalogues guide cites ISO 12354-1 and JSON Schema 2020-12, and says why an outdoor ground raises a fit-range warning
The guide's references now carry ISO 12354-1:2017, whose Formula (B.2), Table B.3 and Annex L the wall section rests on, and the two JSON Schema 2020-12 drafts the schema is written in. After the ground example it says the call raises a PorousAbsorberWarning because an outdoor ground lies below the fit range of both models, and links to where the ground guide explains it. The catalogues page says the schema covers every row class the library publishes, not only the ones its tables use. The Spanish pages name the elastic FDTD rather than a solver object and call the bulk speed that of an extended solid, as the solids guides do.
* The catalogue schema takes the table's credit a document or a CSV header gives at its top, as one text that is not blank
* The Annex L test holds the element's constants on the left, as the rest of the file does
* The catalogue schema's patterns read as the reader does under every validator
The schema said a filled text with \S, which Python's re matches against
U+FEFF and ECMA-262 does not: a name or a credit that is only U+FEFF was read
by the reader and accepted by Python's jsonschema, and refused by an
editor's validator. The reader tells a blank text by str.strip, so the
schema moves to it: every class shorthand of a pattern the schema takes
from the reader is spelled out as the characters it matches under that
pattern's own flags, the white space str.strip strips for a filled text and
the ASCII letters and digits for a key, a column of your own and a reserved
name. Python's re and ECMA-262, with the u flag and without it, now read
each pattern alike, over every character of the basic plane.
* The catalogue schema's patterns that hold a whole text end where it ends, under Python's re and ECMA-262 alike
The seven patterns of the schema that hold a whole text were anchored with
a closing $, which Python's re and ECMA-262 read apart: jsonschema searches
with re.search, whose $ also matches before a line feed that ends the
text, so Python's validator accepted "k\n" as a row's key, "x-a\n" as a
column of your own, "mine\n" as a catalogue's name, and a day, a date or a
digest followed by a line feed, all of which the reader and an editor's
JavaScript validator refuse. Each of the seven now ends with (?![\s\S]),
which no character follows in either engine, with the u flag or without
it. The other two, the test of a text that is not blank and the reserved
form of a name, match a part of the text and are not anchored at its end,
as a test now holds. A validator built on RE2 compiles no lookahead, and so
none of the seven, which the comments and the entry now say instead of
claiming every validator. The comparison of Python and ECMA-262 covers every
pattern the schema holds, over texts that end in a line feed after a whole
key, day and digest, and the six texts are refused by both the schema and
the reader. The catalogues guide says a file the reader reads is never
marked by an editor whose validator reads regular expressions as JavaScript
or Python does, rather than by any editor.
* A catalogue is read as its reader reads the file before a byte of it is written, so nothing the reader refuses is written
write_catalogue held a document to none of the reader's limits: more than
50 000 rows, a JSON file or a CSV file past 16 MiB, a CSV header past
64 KiB, or a text longer than the reader takes (2 000 characters, 20 000
for an about or a note, from a row built in Python or an about passed in)
was written, and with overwrite=True replaced a good file with one that
read_catalogue then refused. The JSON writer now reads the text it is
about to write as parse_catalogue reads one, its UTF-8 bytes held to the
file's limit first, and the CSV writer reads the sheet and its header as
read_catalogue reads the two files, each held to its own limit first, so
whatever the reader refuses, for its size, its rows, the length of a text
or anything else, is refused before anything is written or replaced, in
the reader's own words and naming the file. The reader looks its size
limits up when it runs, and the CSV reader reads the bytes of the two files
through one function the writer shares. The calibration sidecar writer
already refused a sidecar past the 1 MiB its reader takes, before it
touched the file.
For each writer, a file of exactly the most rows, the most bytes of the
file and of a CSV header, and the longest text and prose the reader takes
is written and read back, and one more row, one more byte or one more
character is refused over it, the good file left byte for byte and nothing
beside it; the limits of rows and bytes are lowered for the test. Each of
the nine fails on the code before this change.
* A code span in the markdown check closes only on a run of backticks as long as its opener, and the size refusals share the name of a catalogue file
CommonMark closes a code span only on a whole run of backticks of the opener's length. The check took one tick of a longer run as the closer, so a dollar sign after an unmatched backtick was read as code and an unclosed maths delimiter went unreported; each run is now read whole. The three size refusals name the file with one constant.
The three solids of the solver come off a page, and a clip render that never worked (#828)
* The three solids of the solver come off a page, and a clip render that never worked
STEEL, ALUMINIUM and CONCRETE called themselves nominal and cited nothing.
Each is now one row of Bies 5e Table C.1: the density is what the page
prints, which is what it already was, and the two bulk speeds follow from
the modulus and the Poisson ratio printed beside it through the closed
forms the same table prints at its end. The numbers move by between half a
per cent and two, and `test_each_material_is_the_row_it_cites` recomputes
all six from the catalogue on every run so they cannot drift again.
The figure and clip scenes that carried their own copy of steel and
aluminium now read the constants, which was the real hazard: a second
steel in a scene file is free to walk away from the published one and
nothing says so. Two oracles moved with the inputs and were recomputed
from a second transcription rather than from the code, the Scholte root
for water over aluminium and the thickness resonance of the immersed
plate.
Re-rendering the five affected clips found that the branch which renders
the four variants of a field clip in forked children has never worked: it
passed the `dark` flag positionally to a function that takes it
keyword-only, so every child raised inside multiprocessing and the parent
reported four exit codes and no reason. The sequential branch was right,
which is why nothing had noticed. Both are now covered.
* A test that borrows the process has to give it back, and a moved digit is a stale translation
Two things the last commit left behind, both caught by CI and neither by
the suite here, which is what the two of them have in common.
`_render_anim_variant` sets the language and the theme and never puts them
back. That is right for the generator, which gives each variant a process
or ends the run, and wrong for a test that calls it in-process: the
Spanish labels and the dark stylesheet were still in place for whatever
the worker picked up next, and what noticed was a figure check measuring
ink against a background that had turned black. An autouse fixture
restores both.
And the reflection coefficient of the probe-traces figure moved from 0,938
to 0,939 with the steel, so the exact key in the Spanish table stopped
matching and the figure shipped its English label. That is the failure the
language gate exists for, and it is the one that found it.
The same argument for the geometry that had two units on one name (#755)
* The same argument for the geometry that had two units on one name
#752 put the unit in the name where a pressure, a temperature or a
humidity could be read two ways. Measured over the imported API, four
geometric quantities were in the same state, and one of them was two
different dimensions.
diameter was metres in twenty public parameters and millimetres in one,
cnossos_rail.wheel_transfer, where CNOSSOS-EU Table G-3b tabulates 920,
840 and 680. angles was degrees in ten and radians in four while angle
was radians in eleven, so the plural and the singular of one word
disagreed. period was a lattice pitch in metres in the slit and
metadiffuser panels and a repetition time in seconds in the synchronous
average. gradient was a road slope in per cent in CNOSSOS-EU and a
vertical sound-speed gradient in s^-1 in refraction and sound speed.
They become diameter_m and diameter_mm, angle_rad, angles_rad and
angles_deg, period_m and period_s, road_slope_percent and gradient_per_s.
periods, a count of repetitions sitting beside a period that is a length,
becomes repetitions; the two places where it really means evaluation
periods keep the word and are in the guard's exemptions with the reason.
GaussianPulse.width is a half-width in seconds and the perfectly matched
layer of the same module measures its own width in cells. It says
half_width_s now.
No value changes: the conformance report is the same 995 checks with the
same numbers. The guard grows a second tuple, matched against the whole
name, and says in its own comment that the seventy-five compound names
are a second pass rather than an exemption: WestonRegimeBoundaries has
critical_angle in radians one screen above a function that takes it in
degrees. Against main the guard reports 71; here none.
* Re-render the three clips the renamed scenes drew
Make a refusal test pin the refusal it is named for (2 of 3) (#638)
* Make a refusal test pin the refusal it is named for (2 of 3)
* Give the three absolute-zero guards the tests they never had
Correcting a comma decimal in seven error messages dropped new-code coverage
to 57.1 percent, and the arithmetic says what the gate was pointing at: four
of the seven guards were already exercised and three were not, and four over
seven is that number exactly.
The three are refused now through their public entry points, and each was
shown to pin its guard by deleting the guard in a scratch tree and watching
the test fail. What the unguarded code returns for a temperature below
absolute zero is worth recording: an air density of minus thirteen kilograms
per cubic metre, a speed of sound of NaN out of a square root of a negative
number, and a sound power level of NaN out of a logarithm of a negative
ratio. None of the three refused anything on its own.
None of the tests pins the number. -273.15 and 0.5 are the library's, and
pinning the very value that was just corrected would be the defect this
branch exists to close, wearing the other face.
A fourth test is here that moves no coverage at all. The Poisson ratio guard
was already reached, but only ever from above: the existing test probes 0.5
and nothing had tried the other half of -1 < nu < 0.5. Both bounds turn out
to be closed, and below the lower one the unguarded frame modulus is exactly
zero, which divides.
The same argument for the geometry that had two units on one name (#755)
* The same argument for the geometry that had two units on one name
#752 put the unit in the name where a pressure, a temperature or a
humidity could be read two ways. Measured over the imported API, four
geometric quantities were in the same state, and one of them was two
different dimensions.
diameter was metres in twenty public parameters and millimetres in one,
cnossos_rail.wheel_transfer, where CNOSSOS-EU Table G-3b tabulates 920,
840 and 680. angles was degrees in ten and radians in four while angle
was radians in eleven, so the plural and the singular of one word
disagreed. period was a lattice pitch in metres in the slit and
metadiffuser panels and a repetition time in seconds in the synchronous
average. gradient was a road slope in per cent in CNOSSOS-EU and a
vertical sound-speed gradient in s^-1 in refraction and sound speed.
They become diameter_m and diameter_mm, angle_rad, angles_rad and
angles_deg, period_m and period_s, road_slope_percent and gradient_per_s.
periods, a count of repetitions sitting beside a period that is a length,
becomes repetitions; the two places where it really means evaluation
periods keep the word and are in the guard's exemptions with the reason.
GaussianPulse.width is a half-width in seconds and the perfectly matched
layer of the same module measures its own width in cells. It says
half_width_s now.
No value changes: the conformance report is the same 995 checks with the
same numbers. The guard grows a second tuple, matched against the whole
name, and says in its own comment that the seventy-five compound names
are a second pass rather than an exemption: WestonRegimeBoundaries has
critical_angle in radians one screen above a function that takes it in
degrees. Against main the guard reports 71; here none.
* Re-render the three clips the renamed scenes drew