orthonym.metrics.producer_trail#
Note
Internal API. Names and behaviour may change between releases.
Which code built the name: a per-call record kept outside the provenance variables.
Orthonym.name_tiered opens a record for the call (open_trail); the producers’
call sites report the string a producer returned (noted) and the steps that
rewrite a string pass the label on (carried); the row reads the entry of the
name that ships (lookup). The record is bound to the string, so a candidate that
is rejected leaves an entry for a string that never ships and nothing needs rolling
back. It is not a provenance variable: it never calls _touch, is not a key of
get_provenance and is not restored by restore_provenance, so the replay
memo, the substituent-fragment memo and the hang budgets cannot see it.
Every function here returns at once when no record is open (name_compound and
the nested namings), never raises, and noted / carried return their argument
unchanged.
- orthonym.metrics.producer_trail.open_trail(smiles)#
Open the record of one
name_tieredcall; pair with:func:close_trail.
- orthonym.metrics.producer_trail.close_trail(token)#
Close the record that:func:open_trail opened; the record that was open before it, if any, is current again.
- orthonym.metrics.producer_trail.suspended()#
No record inside the block (the strict twin, which names for comparison only).
- orthonym.metrics.producer_trail.note(producer, name, mol=None)#
Bind
nametoproducerin the open record.molis the molecule the producer named; a name built for a part of the input (a different heavy-atom count) is not the input’s name and is not recorded.
- orthonym.metrics.producer_trail.noted(producer, value, mol=None)#
Record that
producerreturnedvalue(a name, or an object with.name) for the input; returnvalueitself.
- orthonym.metrics.producer_trail.carried(name_in, name_out)#
A step turned
name_inintoname_out: the label follows. Returnsname_out.
- orthonym.metrics.producer_trail.lookup(name)#
The producer recorded for
namein the open record, orNone.