openc3 7.2.1 → 7.3.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.
- checksums.yaml +4 -4
- data/bin/openc3cli +97 -6
- data/bin/pipinstall +5 -4
- data/bin/pipuninstall +5 -1
- data/bin/uvinstall +149 -0
- data/data/config/item_modifiers.yaml +2 -1
- data/data/config/microservice.yaml +5 -1
- data/data/config/screen.yaml +2 -1
- data/data/config/target.yaml +21 -0
- data/data/config/tool.yaml +3 -1
- data/data/config/widgets.yaml +16 -3
- data/data/xtce_schemas/SpaceSystem_20180204.xsd +5918 -0
- data/data/xtce_schemas/xml.xsd +116 -0
- data/ext/openc3/ext/telemetry/telemetry.c +1 -1
- data/lib/openc3/accessors/template_accessor.rb +2 -2
- data/lib/openc3/api/interface_api.rb +2 -2
- data/lib/openc3/api/limits_api.rb +27 -13
- data/lib/openc3/api/router_api.rb +3 -3
- data/lib/openc3/api/tlm_api.rb +1 -1
- data/lib/openc3/interfaces/http_client_interface.rb +1 -1
- data/lib/openc3/io/json_drb.rb +24 -8
- data/lib/openc3/io/json_rpc.rb +0 -2
- data/lib/openc3/logs/log_writer.rb +43 -7
- data/lib/openc3/logs/packet_log_writer.rb +1 -2
- data/lib/openc3/microservices/interface_microservice.rb +1 -1
- data/lib/openc3/migrations/20260731000000_system_health_json.rb +41 -0
- data/lib/openc3/models/cvt_model.rb +5 -5
- data/lib/openc3/models/gem_model.rb +1 -1
- data/lib/openc3/models/interface_model.rb +1 -1
- data/lib/openc3/models/microservice_model.rb +21 -0
- data/lib/openc3/models/plugin_model.rb +204 -50
- data/lib/openc3/models/python_package_model.rb +207 -11
- data/lib/openc3/models/scope_model.rb +34 -30
- data/lib/openc3/models/target_model.rb +180 -6
- data/lib/openc3/models/tool_model.rb +33 -20
- data/lib/openc3/operators/microservice_operator.rb +33 -4
- data/lib/openc3/packets/commands.rb +4 -4
- data/lib/openc3/packets/limits.rb +15 -7
- data/lib/openc3/packets/packet.rb +1 -1
- data/lib/openc3/packets/parsers/state_parser.rb +1 -1
- data/lib/openc3/packets/parsers/xtce_converter.rb +183 -103
- data/lib/openc3/packets/parsers/xtce_parser.rb +71 -23
- data/lib/openc3/packets/structure.rb +2 -2
- data/lib/openc3/packets/telemetry.rb +3 -3
- data/lib/openc3/script/commands.rb +1 -1
- data/lib/openc3/script/extract.rb +20 -25
- data/lib/openc3/script/web_socket_api.rb +44 -4
- data/lib/openc3/topics/command_decom_topic.rb +16 -1
- data/lib/openc3/topics/limits_event_topic.rb +1 -1
- data/lib/openc3/utilities/aws_bucket.rb +10 -2
- data/lib/openc3/utilities/csv.rb +5 -5
- data/lib/openc3/utilities/local_mode.rb +4 -1
- data/lib/openc3/utilities/ruby_lex_utils.rb +5 -1
- data/lib/openc3/utilities/running_script.rb +145 -90
- data/lib/openc3/utilities/script.rb +46 -10
- data/lib/openc3/version.rb +6 -6
- data/templates/plugin/plugin.gemspec +1 -1
- data/templates/tool_angular/package.json +2 -2
- data/templates/tool_react/package.json +1 -1
- data/templates/tool_svelte/package.json +1 -1
- data/templates/tool_vue/package.json +3 -3
- data/templates/widget/package.json +2 -2
- metadata +5 -3
- data/templates/tool_vue/.nycrc +0 -3
- data/templates/widget/.nycrc +0 -3
|
@@ -25,33 +25,69 @@ require 'openc3/tools/test_runner/test'
|
|
|
25
25
|
OpenC3.require_file 'openc3/utilities/store'
|
|
26
26
|
|
|
27
27
|
class Script < OpenC3::TargetFile
|
|
28
|
+
# Script lifecycle states and the transitions allowed from each state
|
|
29
|
+
LIFECYCLE_STATES = %w(development review approved)
|
|
30
|
+
LIFECYCLE_TRANSITIONS = {
|
|
31
|
+
'development' => %w(review approved),
|
|
32
|
+
'review' => %w(development approved),
|
|
33
|
+
'approved' => %w(review development),
|
|
34
|
+
}
|
|
35
|
+
|
|
28
36
|
def self.all(scope, target = nil)
|
|
29
37
|
super(scope, nil, target: target) # No path matchers
|
|
30
38
|
end
|
|
31
39
|
|
|
40
|
+
# Split off the '*' that indicates a file is modified on the server
|
|
41
|
+
def self.strip_modified(name)
|
|
42
|
+
name.split('*')[0]
|
|
43
|
+
end
|
|
44
|
+
private_class_method :strip_modified
|
|
45
|
+
|
|
32
46
|
def self.lock(scope, name, username)
|
|
33
|
-
|
|
34
|
-
OpenC3::Store.hset("#{scope}__script-locks", name, username)
|
|
47
|
+
OpenC3::Store.hset("#{scope}__script-locks", strip_modified(name), username)
|
|
35
48
|
end
|
|
36
49
|
|
|
37
50
|
def self.unlock(scope, name)
|
|
38
|
-
|
|
39
|
-
OpenC3::Store.hdel("#{scope}__script-locks", name)
|
|
51
|
+
OpenC3::Store.hdel("#{scope}__script-locks", strip_modified(name))
|
|
40
52
|
end
|
|
41
53
|
|
|
42
54
|
def self.locked?(scope, name)
|
|
43
|
-
|
|
44
|
-
locked_by = OpenC3::Store.hget("#{scope}__script-locks", name)
|
|
55
|
+
locked_by = OpenC3::Store.hget("#{scope}__script-locks", strip_modified(name))
|
|
45
56
|
locked_by ||= false
|
|
46
57
|
locked_by
|
|
47
58
|
end
|
|
48
59
|
|
|
49
60
|
def self.get_breakpoints(scope, name)
|
|
50
|
-
breakpoints = OpenC3::Store.hget("#{scope}__script-breakpoints", name
|
|
61
|
+
breakpoints = OpenC3::Store.hget("#{scope}__script-breakpoints", strip_modified(name))
|
|
51
62
|
return JSON.parse(breakpoints, allow_nan: true, create_additions: true) if breakpoints
|
|
52
63
|
[]
|
|
53
64
|
end
|
|
54
65
|
|
|
66
|
+
def self.temp_file?(name)
|
|
67
|
+
strip_modified(name).start_with?("#{TEMP_FOLDER}/")
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def self.lifecycle_enabled?
|
|
71
|
+
defined?(::VersionStore) && ::VersionStore.enabled?
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def self.lifecycle(scope, name)
|
|
75
|
+
return { 'state' => 'development', 'history' => [] } if temp_file?(name)
|
|
76
|
+
return { 'state' => 'development', 'history' => [] } unless lifecycle_enabled?
|
|
77
|
+
::VersionStore.lifecycle(scope: scope, name: strip_modified(name))
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# current: the caller-known current state; pass it to avoid a redundant git
|
|
81
|
+
# read when the controller has already fetched it for transition validation.
|
|
82
|
+
def self.set_lifecycle(scope, name, state, username, comment, current: nil)
|
|
83
|
+
raise "Cannot set lifecycle on temporary files" if temp_file?(name)
|
|
84
|
+
raise "Script lifecycle requires the version history store" unless lifecycle_enabled?
|
|
85
|
+
name = strip_modified(name)
|
|
86
|
+
current ||= lifecycle(scope, name)['state']
|
|
87
|
+
::VersionStore.set_lifecycle(scope: scope, name: name, from: current, to: state,
|
|
88
|
+
username: username, comment: comment)
|
|
89
|
+
end
|
|
90
|
+
|
|
55
91
|
def self.process_suite(name, contents, new_process: true, username: nil, scope:)
|
|
56
92
|
python = false
|
|
57
93
|
python = true if File.extname(name) == '.py'
|
|
@@ -189,7 +225,6 @@ class Script < OpenC3::TargetFile
|
|
|
189
225
|
def self.delete_temp(scope)
|
|
190
226
|
files = super(scope)
|
|
191
227
|
files.each do |name|
|
|
192
|
-
# Remove any breakpoints associated with the temp files
|
|
193
228
|
OpenC3::Store.hdel("#{scope}__script-breakpoints", "#{TEMP_FOLDER}/#{File.basename(name)}")
|
|
194
229
|
end
|
|
195
230
|
end
|
|
@@ -208,13 +243,14 @@ class Script < OpenC3::TargetFile
|
|
|
208
243
|
user_full_name = nil,
|
|
209
244
|
username = nil,
|
|
210
245
|
line_no = nil,
|
|
211
|
-
end_line_no = nil
|
|
246
|
+
end_line_no = nil,
|
|
247
|
+
python_venv = nil
|
|
212
248
|
)
|
|
213
249
|
# Verify the script exists before spawning a run. Without this check a run
|
|
214
250
|
# is started and the missing file only surfaces as a runtime error inside
|
|
215
251
|
# the spawned process. Returning nil lets the caller return a 404.
|
|
216
252
|
return nil unless Script.body(scope, name)
|
|
217
|
-
RunningScript.spawn(scope, name, suite_runner, disconnect, environment, user_full_name, username, line_no, end_line_no)
|
|
253
|
+
RunningScript.spawn(scope, name, suite_runner, disconnect, environment, user_full_name, username, line_no, end_line_no, python_venv)
|
|
218
254
|
end
|
|
219
255
|
|
|
220
256
|
def self.instrumented(filename, text)
|
data/lib/openc3/version.rb
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# encoding: ascii-8bit
|
|
2
2
|
|
|
3
|
-
OPENC3_VERSION = '7.
|
|
3
|
+
OPENC3_VERSION = '7.3.0'
|
|
4
4
|
module OpenC3
|
|
5
5
|
module Version
|
|
6
6
|
MAJOR = '7'
|
|
7
|
-
MINOR = '
|
|
8
|
-
PATCH = '
|
|
7
|
+
MINOR = '3'
|
|
8
|
+
PATCH = '0'
|
|
9
9
|
OTHER = ''
|
|
10
|
-
BUILD = '
|
|
10
|
+
BUILD = 'ec6ac203728234fada5e3a2ecab59fba8a94b935'
|
|
11
11
|
end
|
|
12
|
-
VERSION = '7.
|
|
13
|
-
GEM_VERSION = '7.
|
|
12
|
+
VERSION = '7.3.0'
|
|
13
|
+
GEM_VERSION = '7.3.0'
|
|
14
14
|
end
|
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
|
|
|
23
23
|
s.files = Dir.glob("{targets,lib,public,tools,microservices}/**/*") + %w(Rakefile README.md LICENSE.md plugin.txt)
|
|
24
24
|
|
|
25
25
|
s.metadata = {
|
|
26
|
-
# These fields are used when you submit your plugin to
|
|
26
|
+
# These fields are used when you submit your plugin to the OpenC3 Store at store.openc3.com
|
|
27
27
|
# See this help page for more detail: https://store.openc3.com/help/guidelines
|
|
28
28
|
"source_code_uri" => "https://github.com/your-github/plugin-repo",
|
|
29
29
|
"openc3_store_title" => "<%= plugin_orig %>",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%= tool_name %>",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"ng": "ng",
|
|
6
6
|
"start": "ng serve",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@angular/platform-browser-dynamic": "^18.2.6",
|
|
24
24
|
"@angular/router": "^18.2.6",
|
|
25
25
|
"@astrouxds/astro-web-components": "^7.24.0",
|
|
26
|
-
"@openc3/js-common": "7.
|
|
26
|
+
"@openc3/js-common": "7.3.0",
|
|
27
27
|
"rxjs": "~7.8.0",
|
|
28
28
|
"single-spa": "^5.9.5",
|
|
29
29
|
"single-spa-angular": "^9.2.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%= tool_name %>",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@astrouxds/astro-web-components": "^7.24.0",
|
|
14
|
-
"@openc3/js-common": "7.
|
|
15
|
-
"@openc3/vue-common": "7.
|
|
14
|
+
"@openc3/js-common": "7.3.0",
|
|
15
|
+
"@openc3/vue-common": "7.3.0",
|
|
16
16
|
"axios": "^1.7.7",
|
|
17
17
|
"date-fns": "^4.1.0",
|
|
18
18
|
"lodash": "^4.17.21",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%= widget_name %>",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@astrouxds/astro-web-components": "^7.24.0",
|
|
11
|
-
"@openc3/vue-common": "7.
|
|
11
|
+
"@openc3/vue-common": "7.3.0",
|
|
12
12
|
"vuetify": "^3.7.1"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: openc3
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.
|
|
4
|
+
version: 7.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan Melton
|
|
@@ -900,6 +900,7 @@ files:
|
|
|
900
900
|
- bin/openc3cli
|
|
901
901
|
- bin/pipinstall
|
|
902
902
|
- bin/pipuninstall
|
|
903
|
+
- bin/uvinstall
|
|
903
904
|
- data/config/_array_params.yaml
|
|
904
905
|
- data/config/_canvas_values.yaml
|
|
905
906
|
- data/config/_graph_params.yaml
|
|
@@ -932,6 +933,8 @@ files:
|
|
|
932
933
|
- data/config/tool.yaml
|
|
933
934
|
- data/config/unknown.yaml
|
|
934
935
|
- data/config/widgets.yaml
|
|
936
|
+
- data/xtce_schemas/SpaceSystem_20180204.xsd
|
|
937
|
+
- data/xtce_schemas/xml.xsd
|
|
935
938
|
- ext/openc3/ext/array/array.c
|
|
936
939
|
- ext/openc3/ext/array/extconf.rb
|
|
937
940
|
- ext/openc3/ext/buffered_file/buffered_file.c
|
|
@@ -1107,6 +1110,7 @@ files:
|
|
|
1107
1110
|
- lib/openc3/migrations/20260203000000_remove_store_id.rb
|
|
1108
1111
|
- lib/openc3/migrations/20260204000000_remove_decom_reducer.rb
|
|
1109
1112
|
- lib/openc3/migrations/20260701000000_updated_at_to_int.rb
|
|
1113
|
+
- lib/openc3/migrations/20260731000000_system_health_json.rb
|
|
1110
1114
|
- lib/openc3/models/activity_model.rb
|
|
1111
1115
|
- lib/openc3/models/auth_model.rb
|
|
1112
1116
|
- lib/openc3/models/cvt_model.rb
|
|
@@ -1364,7 +1368,6 @@ files:
|
|
|
1364
1368
|
- templates/tool_svelte/src/tool_name.js
|
|
1365
1369
|
- templates/tool_vue/.env.standalone
|
|
1366
1370
|
- templates/tool_vue/.gitignore
|
|
1367
|
-
- templates/tool_vue/.nycrc
|
|
1368
1371
|
- templates/tool_vue/.prettierrc.cjs
|
|
1369
1372
|
- templates/tool_vue/eslint.config.mjs
|
|
1370
1373
|
- templates/tool_vue/jsconfig.json
|
|
@@ -1374,7 +1377,6 @@ files:
|
|
|
1374
1377
|
- templates/tool_vue/src/router.js
|
|
1375
1378
|
- templates/tool_vue/src/tools/tool_name/tool_name.vue
|
|
1376
1379
|
- templates/tool_vue/vite.config.js
|
|
1377
|
-
- templates/widget/.nycrc
|
|
1378
1380
|
- templates/widget/.prettierrc.cjs
|
|
1379
1381
|
- templates/widget/LICENSE.md
|
|
1380
1382
|
- templates/widget/Rakefile
|
data/templates/tool_vue/.nycrc
DELETED
data/templates/widget/.nycrc
DELETED