nost-tools 2.0.2__py3-none-any.whl → 2.0.4__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.

Potentially problematic release.


This version of nost-tools might be problematic. Click here for more details.

nost_tools/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "2.0.2"
1
+ __version__ = "2.0.4"
2
2
 
3
3
  from .application import Application
4
4
  from .application_utils import ConnectionConfig, ModeStatusObserver, TimeStatusPublisher
@@ -86,11 +86,14 @@ class ManagedApplication(Application):
86
86
  self.manager_app_name = manager_app_name
87
87
  else:
88
88
  self.config = config
89
- parameters = getattr(
90
- self.config.rc.simulation_configuration.execution_parameters,
91
- "managed_application",
92
- None,
89
+ parameters = (
90
+ self.config.rc.simulation_configuration.execution_parameters.managed_applications
93
91
  )
92
+
93
+ try:
94
+ parameters = parameters[self.app_name]
95
+ except KeyError:
96
+ parameters = parameters["default"]
94
97
  self.set_offset = parameters.set_offset
95
98
  self.time_status_step = parameters.time_status_step
96
99
  self.time_status_init = parameters.time_status_init
nost_tools/manager.py CHANGED
@@ -98,7 +98,21 @@ class Manager(Application):
98
98
  auto_delete=True,
99
99
  )
100
100
 
101
- def execute_test_plan(
101
+ def execute_test_plan(self, *args, **kwargs) -> None:
102
+ """
103
+ Starts the test plan execution in a background thread.
104
+
105
+ Args:
106
+ *args: Positional arguments to be passed to the test plan execution.
107
+ **kwargs: Keyword arguments to be passed to the test plan execution.
108
+ """
109
+ thread = threading.Thread(
110
+ target=self._execute_test_plan_impl, args=args, kwargs=kwargs, daemon=True
111
+ )
112
+ logger.debug("Running test plan in background thread.")
113
+ thread.start()
114
+
115
+ def _execute_test_plan_impl(
102
116
  self,
103
117
  sim_start_time: datetime = None,
104
118
  sim_stop_time: datetime = None,
@@ -163,9 +177,6 @@ class Manager(Application):
163
177
  self.time_status_step = parameters.time_status_step
164
178
  self.time_status_init = parameters.time_status_init
165
179
  self.command_lead = parameters.command_lead
166
- # self.required_apps = (
167
- # self.config.rc.simulation_configuration.execution_parameters.required_apps
168
- # )
169
180
  self.required_apps = [
170
181
  app for app in parameters.required_apps if app != self.app_name
171
182
  ]
nost_tools/schemas.py CHANGED
@@ -397,8 +397,9 @@ class LoggerApplicationConfig(BaseModel):
397
397
  class ExecConfig(BaseModel):
398
398
  general: GeneralConfig
399
399
  manager: Optional[ManagerConfig] = Field(None, description="Manager configuration.")
400
- managed_application: Optional[ManagedApplicationConfig] = Field(
401
- None, description="Managed application configuration."
400
+ managed_applications: Optional[Dict[str, ManagedApplicationConfig]] = Field(
401
+ default_factory=lambda: {"default": ManagedApplicationConfig()},
402
+ description="Dictionary of managed application configurations, keyed by application name.",
402
403
  )
403
404
  logger_application: Optional[LoggerApplicationConfig] = Field(
404
405
  None, description="Logger application configuration."
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nost_tools
3
- Version: 2.0.2
3
+ Version: 2.0.4
4
4
  Summary: Tools for Novel Observing Strategies Testbed (NOS-T) Applications
5
5
  Author-email: "Paul T. Grogan" <paul.grogan@asu.edu>, "Emmanuel M. Gonzalez" <emmanuelgonzalez@asu.edu>
6
- License: BSD License
6
+ License-Expression: BSD-3-Clause
7
7
  Classifier: Programming Language :: Python :: 3
8
8
  Classifier: Operating System :: OS Independent
9
9
  Classifier: Development Status :: 4 - Beta
@@ -1,18 +1,18 @@
1
- nost_tools/__init__.py,sha256=y9dH4r4TAovdcdkArBdlDS7LKF_W2iNFJxPEZmiFpxM,873
1
+ nost_tools/__init__.py,sha256=sG0Uwgsr3_fZsBiCWJ_Ff_kdhYNX3Xec6asi3T0yrck,873
2
2
  nost_tools/application.py,sha256=1mFCw6b5BCAlaof-ijzjFYCvVB-WCn9llpHHijxeIik,37027
3
3
  nost_tools/application_utils.py,sha256=_R39D26FYxgaO4uyTON24KXc4UQ4zAEDBZfEkHbEw64,9386
4
4
  nost_tools/configuration.py,sha256=ikNpZi8aofhZzJRbJf4x46afbAnp8r5C7Yr50Rnn1Nc,11639
5
5
  nost_tools/entity.py,sha256=AwbZMP3_H4RQuyU4voyQwYFkETxG0mfD-0BMHxrRFf8,2064
6
6
  nost_tools/errors.py,sha256=0JcDlMEkZAya3-5c0rRozLuxp8qF58StG4JgRsaxfKU,344
7
7
  nost_tools/logger_application.py,sha256=rxPBfyA7Zym5b_EsoSJvT9JWNIVWZX1a-4czFwCqaQ4,7217
8
- nost_tools/managed_application.py,sha256=uzWmOevHXo2kr_1cMhSdJU7g9_EVgo2s4_VuxQcGaWs,11409
9
- nost_tools/manager.py,sha256=15MkZE6FucMbHt0mitYc5Hg__QjKIfCQe4W0ojER2C8,19914
8
+ nost_tools/managed_application.py,sha256=jjS-URl4D_-VwKNYnqwYg_myFugKgMd_Gy1aAxxw0SU,11514
9
+ nost_tools/manager.py,sha256=0282l6h2KSP2-OfFjI8tRaXJAvnZDzwqC_7dPzFK7U0,20304
10
10
  nost_tools/observer.py,sha256=w66jZQ11Fr7XSCcvcc2f5ISce2n8Ba7cXqheSTuyrmw,5519
11
11
  nost_tools/publisher.py,sha256=omU8tb0AXnA6RfhYSh0vnXbJtrRo4ukx1J5ANl4bDLQ,5291
12
- nost_tools/schemas.py,sha256=7Vj0a_-R78EHgQKwQP0YQz9leTBliFg5UYBFwdD5Pkg,15210
12
+ nost_tools/schemas.py,sha256=m6Np7DGrBIgtswpnrTqSowTb_niC4NY59BTQFBYfkZc,15332
13
13
  nost_tools/simulator.py,sha256=ALnGDmnA_ga-1Lq-bVWi2vcrspgjS4vtuDE0jWsI7fE,20191
14
- nost_tools-2.0.2.dist-info/licenses/LICENSE,sha256=aAMU-mTHTKpWkBsg9QhkhCQpEm3Gri7J_fVuJov8s3s,1539
15
- nost_tools-2.0.2.dist-info/METADATA,sha256=PJCwxRDVyxWfil_gdP6OP6SnGOG7q5KxodHMJS7JnBQ,4244
16
- nost_tools-2.0.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
17
- nost_tools-2.0.2.dist-info/top_level.txt,sha256=LNChUgrv2-wiym12O0r61kY83COjTpTiJ2Ly1Ca58A8,11
18
- nost_tools-2.0.2.dist-info/RECORD,,
14
+ nost_tools-2.0.4.dist-info/licenses/LICENSE,sha256=aAMU-mTHTKpWkBsg9QhkhCQpEm3Gri7J_fVuJov8s3s,1539
15
+ nost_tools-2.0.4.dist-info/METADATA,sha256=diDeXkc0h1cthwamEVkSxIjjQv08EUjoV1dQ-6xiUkU,4256
16
+ nost_tools-2.0.4.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
17
+ nost_tools-2.0.4.dist-info/top_level.txt,sha256=LNChUgrv2-wiym12O0r61kY83COjTpTiJ2Ly1Ca58A8,11
18
+ nost_tools-2.0.4.dist-info/RECORD,,