spine_version¶

Report which copy of entropy-spine is running, and from where.

A stale copy elsewhere on sys.path is imported first and runs silently in place of the one you think you installed, and the results are wrong with no warning. It is a real failure mode, not a hypothetical, and this makes it one call to check.

Syntax¶

from entropy_spine import spine_version
help(spine_version)
Help on function spine_version in module entropy_spine.interface.version:

spine_version(*, report: 'bool' = True) -> 'dict'
    spine_version: report which copy of entropy-spine is running, and
    from where.

        spine_version()                prints
        v = spine_version(report=False)   returns the record, prints nothing

    The reason this exists: a stale copy elsewhere on ``sys.path`` is imported
    first and runs silently in place of the one you think you installed, and the
    results are wrong with no warning. It is a real failure mode, not a
    hypothetical, and this function makes it one call to check.

On a clean path¶

spine_version();
entropy-spine 0.1.0
  package  .../python/src/entropy_spine
  python   3.13.14
  numpy    2.5.0
  path     clean, no shadowing copies

As a record¶

With report=False it returns the same information and prints nothing, which is what to record alongside results.

v = spine_version(report=False)
sorted(v.keys())
['duplicates', 'numpy', 'package', 'python', 'version']

See also¶

spine. Record the version alongside results, so the copy that produced them stays identifiable.