|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Functions | |
| tuple[tuple[str, str|None],...] | _stack_versions () |
| dict[str, str|None] | stack_versions () |
| dict[str, str|None] | _collect () |
| str|None | _version_of (str import_name, str dist_name) |
Variables | |
| dict | _PHYSICS_STACK |
Which versions of the physics stack produced a result. Correlations and equations of state are not frozen. CoolProp revises a fluid's EOS between releases; ``fluids`` corrects a fitting coefficient. When a number that was right last month is wrong today and nothing in this repo changed, the stack version is the first thing you want and the last thing anyone records. So every run stamps this. It costs one dict and it is the difference between "the model drifted" and "CoolProp 7.3 revised the nitrogen EOS". A missing package reports ``None`` rather than raising: this is diagnostic plumbing, and it must never be the reason an import fails.
|
protected |
Definition at line 56 of file _environment.py.
References _version_of().
Referenced by _stack_versions().
|
protected |
The uncached scan, memoised. See :func:`stack_versions`.
Definition at line 34 of file _environment.py.
References _collect().
Referenced by stack_versions().
|
protected |
Version of one dependency, or ``None`` if it is not installed. Prefers the installed distribution's metadata over the module's own ``__version__``: the metadata is what pip resolved, and a module attribute can lag it. Falls back to the attribute for packages that ship no metadata, and imports only as a last resort so this stays cheap on a warm interpreter.
Definition at line 71 of file _environment.py.
Referenced by _collect().
| dict[str, str | None] feedtwin._environment.stack_versions | ( | ) |
Versions of feedtwin and every dependency that can move a number. Cached for the life of the process. Reading distribution metadata means parsing an email-format file per package, which took about 4 ms -- half the cost of a small steady solve, on every solve, for an answer that cannot change while the interpreter is running. A fresh dict is returned each call so a caller cannot mutate the cache. Returns a mapping of package name to version string, with ``None`` for anything not installed. ``python`` and ``platform`` are included because a LAPACK or libm difference across platforms is a real, if rare, source of divergence in a Newton solve.
Definition at line 39 of file _environment.py.
References _stack_versions().
|
protected |
Definition at line 24 of file _environment.py.