A condition with a default is written by name (#756)
* A condition with a default is written by name
#752 put the unit in the name of every public pressure, temperature and
humidity. This is the other half of that rule: the name is now on the
line the caller reads, because the argument cannot be passed as a bare
number any more.
The shape it removes is three numbers in a row.
air_attenuation(freqs, 20.0, 50.0, 101.325) is a temperature, a relative
humidity and a pressure in an order nobody remembers, and swapping the
last two is a call that still runs and still returns an array.
Nine functions take a bare star after the arguments the call is about.
Where one already separated some of its arguments the star moves up
rather than a second appearing, so the parameters in between join the
keyword-only half. Six dataclasses follow: the three that are nothing
but conditions are kw_only, and the three that carry a required field
take KW_ONLY after it. ReportMetadata joins them for its own reason, 34
optional fields and a comment saying new ones were appended at the end
to keep the positional order stable, which is not an API anyone can use
correctly.
The guard grows the second half of the rule and is exempt only where a
signature has to keep its positional form: metrology.sensitivity, whose
positional shape belongs to the Signal overload contract. Against main
it reports 35 conditions that can still be passed as a bare number.
No value changes: the same 995 conformance checks with the same numbers.
* Regenerate the API reference for the ReportMetadata signature
A flag is written by name everywhere, and the clip gate learns which changes cannot move a frame (#760)
#759 closed the flags a caller could reach. This closes the rest, so ruff's
FBT family is selected outright instead of documented as absent: 202
signatures take the star, and the 296 calls that passed a bare True name the
parameter.
Every one of the 156 call sites the change forced was named rather than left
positional. Two of them no static gate sees: _cached_weighting_sos and
_cached_weighting_filter are lru_cache'd, so mypy reads the call through
_lru_cache_wrapper and checks nothing, and only the suite found them.
The one place a keyword-only parameter is not a rewrite: Callable[[...], R]
cannot say that a parameter is keyword-only. ColumnsBuilder in
_report/_insulation_fiche.py and a new LeftCellBuilder in
_report/ansi_s12_2.py become protocols, which say what the alias could not.
FBT003 came down to ax.grid(True, alpha=0.3) in 295 of its 296 sites.
matplotlib declares that parameter visible, so the sites say visible=True and
a test pins the name, because a matplotlib release that moved it would
otherwise surface as a wall of unrelated red. The one that was left is
np.bool_(True) in a test, a cast rather than a flag; it is np.True_ now.
The clips are not re-rendered, and none of them needed to be.
animation_fingerprint already normalises away what cannot move a frame, the
docstrings, the import order, the TYPE_CHECKING blocks, with the reason on
each. Where the keyword-only star sits is the same kind of thing: it decides
how a caller may write the call, not what the function computes. With that
normalisation the 43 fingerprints are identical either side of the signature
sweep, measured, not assumed. The manifest is re-stamped because the
fingerprint itself changed, and the stamp records the same clips it always
described.
scripts/check_public_flags.py goes: ruff now says the same thing on every
definition, and a guard that cannot fire is noise.
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.
A condition with a default is written by name (#756)
* A condition with a default is written by name
#752 put the unit in the name of every public pressure, temperature and
humidity. This is the other half of that rule: the name is now on the
line the caller reads, because the argument cannot be passed as a bare
number any more.
The shape it removes is three numbers in a row.
air_attenuation(freqs, 20.0, 50.0, 101.325) is a temperature, a relative
humidity and a pressure in an order nobody remembers, and swapping the
last two is a call that still runs and still returns an array.
Nine functions take a bare star after the arguments the call is about.
Where one already separated some of its arguments the star moves up
rather than a second appearing, so the parameters in between join the
keyword-only half. Six dataclasses follow: the three that are nothing
but conditions are kw_only, and the three that carry a required field
take KW_ONLY after it. ReportMetadata joins them for its own reason, 34
optional fields and a comment saying new ones were appended at the end
to keep the positional order stable, which is not an API anyone can use
correctly.
The guard grows the second half of the rule and is exempt only where a
signature has to keep its positional form: metrology.sensitivity, whose
positional shape belongs to the Signal overload contract. Against main
it reports 35 conditions that can still be passed as a bare number.
No value changes: the same 995 conformance checks with the same numbers.
* Regenerate the API reference for the ReportMetadata signature
Verdicts on a printed limit that read the decimal value, not its last bits (#914)
A quantity computed from decimal readings (a difference, a mean, a ratio, a spread) and judged against a limit a standard prints in decimal is now settled to nine decimal places before it meets that limit, and a half is rounded on the settled value, so 32,3 - 26,3 dB and 32,2 - 26,2 dB are the same 6 dB margin on every machine. One private helper does this for the whole library, and the six local copies of the same nine-decimal rule now go through it. The settled value only decides the verdict; every result keeps the value it computed. Two results change shape at a degenerate input: room.open_plan_metrics returns NaN for a distance when the STI does not fall with distance, and a hammer and floor that are critically damped in decimal get the critically damped pulse instead of NaN.
A condition with a default is written by name (#756)
* A condition with a default is written by name
#752 put the unit in the name of every public pressure, temperature and
humidity. This is the other half of that rule: the name is now on the
line the caller reads, because the argument cannot be passed as a bare
number any more.
The shape it removes is three numbers in a row.
air_attenuation(freqs, 20.0, 50.0, 101.325) is a temperature, a relative
humidity and a pressure in an order nobody remembers, and swapping the
last two is a call that still runs and still returns an array.
Nine functions take a bare star after the arguments the call is about.
Where one already separated some of its arguments the star moves up
rather than a second appearing, so the parameters in between join the
keyword-only half. Six dataclasses follow: the three that are nothing
but conditions are kw_only, and the three that carry a required field
take KW_ONLY after it. ReportMetadata joins them for its own reason, 34
optional fields and a comment saying new ones were appended at the end
to keep the positional order stable, which is not an API anyone can use
correctly.
The guard grows the second half of the rule and is exempt only where a
signature has to keep its positional form: metrology.sensitivity, whose
positional shape belongs to the Signal overload contract. Against main
it reports 35 conditions that can still be passed as a bare number.
No value changes: the same 995 conformance checks with the same numbers.
* Regenerate the API reference for the ReportMetadata signature
A condition with a default is written by name (#756)
* A condition with a default is written by name
#752 put the unit in the name of every public pressure, temperature and
humidity. This is the other half of that rule: the name is now on the
line the caller reads, because the argument cannot be passed as a bare
number any more.
The shape it removes is three numbers in a row.
air_attenuation(freqs, 20.0, 50.0, 101.325) is a temperature, a relative
humidity and a pressure in an order nobody remembers, and swapping the
last two is a call that still runs and still returns an array.
Nine functions take a bare star after the arguments the call is about.
Where one already separated some of its arguments the star moves up
rather than a second appearing, so the parameters in between join the
keyword-only half. Six dataclasses follow: the three that are nothing
but conditions are kw_only, and the three that carry a required field
take KW_ONLY after it. ReportMetadata joins them for its own reason, 34
optional fields and a comment saying new ones were appended at the end
to keep the positional order stable, which is not an API anyone can use
correctly.
The guard grows the second half of the rule and is exempt only where a
signature has to keep its positional form: metrology.sensitivity, whose
positional shape belongs to the Signal overload contract. Against main
it reports 35 conditions that can still be passed as a bare number.
No value changes: the same 995 conformance checks with the same numbers.
* Regenerate the API reference for the ReportMetadata signature
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
Check an outdoor sound program against its certified results, and find the quantiles of its level differences, by ISO 17534-1 (#904)
A noise map comes from a program, often run in a faster configuration than its method describes, and ISO 17534-1:2015 says how that program shows it implements the method and what the shortcut costs. The new module phonometry.environment.propagation.software_quality fills the TRC form of Annex B against the limits of each certified result, reads the 0,1- and 0,9-quantiles of the level differences of Annex C by Table C.1 and Formulas (C.1) and (C.2), places the sample points of C.2 and C.3, and gives the precision of a method across programs from a round robin, each result with its .plot(). A guide in English and Spanish runs the TRC form on the library's own ISO 9613-2 chain with test case T03 of ISO/TR 17534-3, and the errata registry gains Table 69 of that report.