Version Considerations
The Seeq SPy module relies upon the Seeq SDK module in order to function. Your notebook, add-on or script code may require a particular version of SPy in order to function properly. Read the following sections to follow best practices for managing version requirements.
Packaging
Seeq R59 and Earlier
For Seeq R59 and earlier, both the Seeq SDK and Seeq SPy Module were distributed in a single PyPI package called seeq. It had a versioning scheme that was an amalgamation of both the Seeq SDK version (which is tied directly to the Seeq Server version it supports) and the SPy version (which is independent of the Seeq Server version). It took the following form:
a.b.c.F.G
For example, seeq
package version
59.1.2.185.2 supports
Seeq Server version R59 and includes SPy version 185.2.
Seeq R60 and Later
For Seeq R60 and later, the Seeq SDK is distributed in the PyPI package seeq and the Seeq SPy Module is distributed in a separate PyPI package called seeq-spy. The seeq package versioning scheme is tied directly to the Seeq Server version it supports and the seeq-spy package version is independent of the Seeq Server version.
The two packages can be upgraded independently. However, when using Data Lab, then the user should only upgrade the SPy package and allow the SDK package to be managed directly by Data Lab.
Upgrading
Due to the change in packaging between R59 and R60, it is strongly
recommended that you use the built in spy.upgrade()
function to
upgrade SPy. It has all the required logic to execute the correct
commands depending on the Seeq Server you are connected to. You just
execute the command below and then restart your Python kernel:
spy.upgrade()
Displaying Version Information
If you’d like to check what version you’re running with, just print out the current session information, like so:
from seeq import spy
spy.session
Not logged in. Seeq SDK Module Version: 66.0.0 @ C:gitcrabsdkpypiseeqsdk Seeq SPy Module Version: 193.0 @ C:gitcrabsdkpypiseeqspy
Checking for a Sufficient Version
If you are writing a reusable notebook or script, or you are writing an
add-on, you may wish to include a version check in your code. Version
checks are notoriously difficult to code correctly, so the spy.utils
module includes some convenience functions to do the hard work for you.
Here are some examples:
from seeq import spy
# Set the compatibility option so that you maximize the chance that SPy will remain compatible with your notebook/script
spy.options.compatibility = 193
# Login so we can check the Seeq Server version
spy.login(url='http://localhost:34216', credentials_file='../credentials.key', force=False)
# Check the SPy version
print(f'SPy is at least 184.3? {spy.utils.is_spy_module_version_at_least(184, 3)}')
print(f'Seeq Server is at least R73.3.1? {spy.utils.is_server_version_at_least(73, 3, 1)}')
Seeq Server Version: R66.0.0-SNAPSHOT
Seeq SDK Module Version: 66.0.0 @ C:\git\crab\sdk\pypi\seeq\sdk
Seeq SPy Module Version: 193.0 @ C:\git\crab\sdk\pypi\seeq\spy
SPy is at least 184.3? True
Seeq Server is at least R73.3.1? False
Function Reference
help(spy.utils.get_spy_module_version_tuple)
help(spy.utils.is_spy_module_version_at_least)
help(spy.utils.get_sdk_module_version_tuple)
help(spy.utils.is_sdk_module_version_at_least)
help(spy.utils.get_server_version_tuple)
help(spy.utils.is_server_version_at_least)