sprocket-systems.coda.sdk 1.0.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
coda/__init__.py ADDED
@@ -0,0 +1,34 @@
1
+ # The versions below will be replaced automatically in CI.
2
+ # You do not need to modify any of the versions below.
3
+ __version__ = "1.0.5"
4
+ CODA_APP_SUITE_VERSION = "+coda-1.68.0"
5
+ FINAL_VERSION = __version__ + CODA_APP_SUITE_VERSION
6
+
7
+ import sys
8
+ import shutil
9
+ import subprocess
10
+
11
+ # Find the full path to 'coda'
12
+ coda_path = shutil.which("coda")
13
+
14
+ if coda_path:
15
+ # Run '<path to coda> -v'
16
+ result = subprocess.run(
17
+ [coda_path, "-v"], capture_output=True, text=True, shell=False
18
+ )
19
+ ver = result.stdout.replace("\n", "").replace("coda version ", "")
20
+ # Print output
21
+ if f"+coda-{ver}" not in FINAL_VERSION:
22
+ print(
23
+ "WARNING !!! Mismatched core tools version",
24
+ ver,
25
+ f"for coda python sdk {__version__}",
26
+ file=sys.stderr,
27
+ )
28
+ else:
29
+ split = FINAL_VERSION.split("-")
30
+ ver = split[-1]
31
+ print(
32
+ f"WARNING !!! coda CLI not found in system PATH. Make sure you install coda [v{ver}] if you intend to use the agent.",
33
+ file=sys.stderr,
34
+ )