openc3-cosmos-script-engine-cstol 1.1.0 → 1.2.0

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.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +100 -8
  3. data/lib/cstol_script_engine.py +599 -402
  4. data/pyproject.toml +83 -0
  5. data/uv.lock +1396 -0
  6. metadata +4 -2
data/pyproject.toml ADDED
@@ -0,0 +1,83 @@
1
+ [project]
2
+ name = "openc3-cosmos-script-engine-cstol-python"
3
+ version = "1.2.0"
4
+ description = "CSTOL script engine for OpenC3 COSMOS Script Runner"
5
+ readme = "README.md"
6
+ requires-python = ">=3.11"
7
+ dependencies = []
8
+
9
+ [tool.uv]
10
+ package = false
11
+ default-groups = []
12
+
13
+ [tool.pytest.ini_options]
14
+ testpaths = ["test"]
15
+ python_files = ["test_*.py"]
16
+ python_classes = ["Test*"]
17
+ python_functions = ["test_*"]
18
+ addopts = [
19
+ "-v",
20
+ "--tb=short",
21
+ "--cov=lib",
22
+ "--cov-report=term-missing",
23
+ "--cov-report=html",
24
+ "--cov-fail-under=80",
25
+ ]
26
+
27
+ [tool.coverage.run]
28
+ source = ["lib"]
29
+ omit = ["*/test/*", "*/.venv/*", "*/__pycache__/*"]
30
+
31
+ [tool.coverage.report]
32
+ exclude_lines = [
33
+ "pragma: no cover",
34
+ "def __repr__",
35
+ "if self.debug:",
36
+ "if settings.DEBUG",
37
+ "raise AssertionError",
38
+ "raise NotImplementedError",
39
+ "if 0:",
40
+ "if __name__ == .__main__.:",
41
+ "class .*\\bProtocol\\):",
42
+ "@(abc\\.)?abstractmethod",
43
+ ]
44
+
45
+ [tool.coverage.html]
46
+ directory = "htmlcov"
47
+ skip_covered = false
48
+
49
+ [tool.ruff]
50
+ line-length = 100
51
+ target-version = "py312"
52
+
53
+ [tool.ruff.lint]
54
+ select = ["E", "F", "I", "N", "W", "UP"]
55
+
56
+ [tool.ty.environment]
57
+ python-version = "3.12"
58
+ extra-paths = ["lib"]
59
+
60
+ [tool.ty.rules]
61
+ # openc3.script re-exports its API through star imports (from .telemetry import *,
62
+ # etc.) with no __all__, so ty cannot see tlm, send_raw, connect_interface or
63
+ # disconnect_interface even though they resolve at runtime.
64
+ unresolved-import = "warn"
65
+ # Script Runner replaces openc3.script.start() at runtime with the running_script.py
66
+ # implementation, which accepts bind_variables. The pip package only ships the
67
+ # stub signature start(procedure_name).
68
+ unknown-argument = "warn"
69
+ # parse_timestamp builds a heterogeneous dict of int/float components, so ty widens
70
+ # every lookup to float even where the value is always an int (e.g. year).
71
+ invalid-argument-type = "warn"
72
+ # CstolVariables.special_variables intentionally holds mixed float/str values, which
73
+ # ty widens to `float | str` for every lookup.
74
+ unsupported-operator = "warn"
75
+
76
+ [dependency-groups]
77
+ dev = [
78
+ "ty>=0.0.1a7",
79
+ "pytest>=9.0.1",
80
+ "pytest-cov>=7.0.0",
81
+ "ruff>=0.14.8",
82
+ "openc3", # Only needed for development/testing; provided by COSMOS at runtime
83
+ ]