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.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/bin/openc3cli +97 -6
  3. data/bin/pipinstall +5 -4
  4. data/bin/pipuninstall +5 -1
  5. data/bin/uvinstall +149 -0
  6. data/data/config/item_modifiers.yaml +2 -1
  7. data/data/config/microservice.yaml +5 -1
  8. data/data/config/screen.yaml +2 -1
  9. data/data/config/target.yaml +21 -0
  10. data/data/config/tool.yaml +3 -1
  11. data/data/config/widgets.yaml +16 -3
  12. data/data/xtce_schemas/SpaceSystem_20180204.xsd +5918 -0
  13. data/data/xtce_schemas/xml.xsd +116 -0
  14. data/ext/openc3/ext/telemetry/telemetry.c +1 -1
  15. data/lib/openc3/accessors/template_accessor.rb +2 -2
  16. data/lib/openc3/api/interface_api.rb +2 -2
  17. data/lib/openc3/api/limits_api.rb +27 -13
  18. data/lib/openc3/api/router_api.rb +3 -3
  19. data/lib/openc3/api/tlm_api.rb +1 -1
  20. data/lib/openc3/interfaces/http_client_interface.rb +1 -1
  21. data/lib/openc3/io/json_drb.rb +24 -8
  22. data/lib/openc3/io/json_rpc.rb +0 -2
  23. data/lib/openc3/logs/log_writer.rb +43 -7
  24. data/lib/openc3/logs/packet_log_writer.rb +1 -2
  25. data/lib/openc3/microservices/interface_microservice.rb +1 -1
  26. data/lib/openc3/migrations/20260731000000_system_health_json.rb +41 -0
  27. data/lib/openc3/models/cvt_model.rb +5 -5
  28. data/lib/openc3/models/gem_model.rb +1 -1
  29. data/lib/openc3/models/interface_model.rb +1 -1
  30. data/lib/openc3/models/microservice_model.rb +21 -0
  31. data/lib/openc3/models/plugin_model.rb +204 -50
  32. data/lib/openc3/models/python_package_model.rb +207 -11
  33. data/lib/openc3/models/scope_model.rb +34 -30
  34. data/lib/openc3/models/target_model.rb +180 -6
  35. data/lib/openc3/models/tool_model.rb +33 -20
  36. data/lib/openc3/operators/microservice_operator.rb +33 -4
  37. data/lib/openc3/packets/commands.rb +4 -4
  38. data/lib/openc3/packets/limits.rb +15 -7
  39. data/lib/openc3/packets/packet.rb +1 -1
  40. data/lib/openc3/packets/parsers/state_parser.rb +1 -1
  41. data/lib/openc3/packets/parsers/xtce_converter.rb +183 -103
  42. data/lib/openc3/packets/parsers/xtce_parser.rb +71 -23
  43. data/lib/openc3/packets/structure.rb +2 -2
  44. data/lib/openc3/packets/telemetry.rb +3 -3
  45. data/lib/openc3/script/commands.rb +1 -1
  46. data/lib/openc3/script/extract.rb +20 -25
  47. data/lib/openc3/script/web_socket_api.rb +44 -4
  48. data/lib/openc3/topics/command_decom_topic.rb +16 -1
  49. data/lib/openc3/topics/limits_event_topic.rb +1 -1
  50. data/lib/openc3/utilities/aws_bucket.rb +10 -2
  51. data/lib/openc3/utilities/csv.rb +5 -5
  52. data/lib/openc3/utilities/local_mode.rb +4 -1
  53. data/lib/openc3/utilities/ruby_lex_utils.rb +5 -1
  54. data/lib/openc3/utilities/running_script.rb +145 -90
  55. data/lib/openc3/utilities/script.rb +46 -10
  56. data/lib/openc3/version.rb +6 -6
  57. data/templates/plugin/plugin.gemspec +1 -1
  58. data/templates/tool_angular/package.json +2 -2
  59. data/templates/tool_react/package.json +1 -1
  60. data/templates/tool_svelte/package.json +1 -1
  61. data/templates/tool_vue/package.json +3 -3
  62. data/templates/widget/package.json +2 -2
  63. metadata +5 -3
  64. data/templates/tool_vue/.nycrc +0 -3
  65. 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
- name = name.split('*')[0] # Split '*' that indicates modified
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
- name = name.split('*')[0] # Split '*' that indicates modified
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
- name = name.split('*')[0] # Split '*' that indicates modified
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.split('*')[0]) # Split '*' that indicates modified
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)
@@ -1,14 +1,14 @@
1
1
  # encoding: ascii-8bit
2
2
 
3
- OPENC3_VERSION = '7.2.1'
3
+ OPENC3_VERSION = '7.3.0'
4
4
  module OpenC3
5
5
  module Version
6
6
  MAJOR = '7'
7
- MINOR = '2'
8
- PATCH = '1'
7
+ MINOR = '3'
8
+ PATCH = '0'
9
9
  OTHER = ''
10
- BUILD = 'c0b096796e3070340b34bc4368c21f3972ede7a4'
10
+ BUILD = 'ec6ac203728234fada5e3a2ecab59fba8a94b935'
11
11
  end
12
- VERSION = '7.2.1'
13
- GEM_VERSION = '7.2.1'
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 our App Store at store.openc3.com
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.2.1",
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.2.1",
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",
@@ -16,7 +16,7 @@
16
16
  "@emotion/react": "^11.13.3",
17
17
  "@emotion/styled": "^11.11.0",
18
18
  "@mui/material": "^6.1.1",
19
- "@openc3/js-common": "7.2.1",
19
+ "@openc3/js-common": "7.3.0",
20
20
  "react": "^18.2.0",
21
21
  "react-dom": "^18.2.0",
22
22
  "single-spa-react": "^5.1.4"
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "@astrouxds/astro-web-components": "^7.24.0",
15
- "@openc3/js-common": "7.2.1",
15
+ "@openc3/js-common": "7.3.0",
16
16
  "@smui/button": "^7.0.0",
17
17
  "@smui/common": "^7.0.0",
18
18
  "@smui/card": "^7.0.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "<%= tool_name %>",
3
- "version": "7.2.1",
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.2.1",
15
- "@openc3/vue-common": "7.2.1",
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.2.1",
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.2.1",
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.2.1
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
@@ -1,3 +0,0 @@
1
- {
2
- "extension": [".js", ".vue"]
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "extension": [".js", ".vue"]
3
- }