Skip to content

version

sleap.version

Current version of SLEAP package.

This is used to set sleap.version, and it is also read by setup.py to set the version for the package (i.e., the version on PyPI).

The version should be manually updated before creating a new release, and then the release should be created with a tag matching the version number set here. For example, if you set the version to X.Y.Z, then the tag should be "vX.Y.Z".

Must be a semver string, "aN" should be appended for alpha releases.

Functions:

Name Description
versions

Print versions of SLEAP and other libraries.

versions()

Print versions of SLEAP and other libraries.

Source code in sleap/version.py
17
18
19
20
21
22
23
24
25
26
27
28
29
def versions():
    """Print versions of SLEAP and other libraries."""
    import numpy as np
    import platform

    vers = {}
    vers["SLEAP"] = __version__
    vers["Numpy"] = np.__version__
    vers["Python"] = platform.python_version()
    vers["OS"] = platform.platform()

    msg = "\n".join([f"{k}: {v}" for k, v in vers.items()])
    print(msg)