Skip to content

Fix default values for TEMPLATE items#2635

Merged
jmthomas merged 5 commits intomainfrom
template_default
Dec 16, 2025
Merged

Fix default values for TEMPLATE items#2635
jmthomas merged 5 commits intomainfrom
template_default

Conversation

@jmthomas
Copy link
Copy Markdown
Member

@jmthomas jmthomas commented Dec 15, 2025

Without this change the HYBRIDTLM packet won't display any values for JSON.ITEM5 or CBOR.ITEM5. Also the default values for IITEM5 in both the JSONCMD and CBORCMD are empty.

@jmthomas jmthomas requested a review from ryanmelt December 15, 2025 20:36
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 15, 2025

Codecov Report

❌ Patch coverage is 40.62500% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.11%. Comparing base (5f6b1d6) to head (c2d2fc5).
⚠️ Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
openc3/lib/openc3/packets/packet.rb 40.62% 19 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2635      +/-   ##
==========================================
+ Coverage   79.07%   79.11%   +0.03%     
==========================================
  Files         661      662       +1     
  Lines       51990    52140     +150     
  Branches      732      732              
==========================================
+ Hits        41111    41250     +139     
- Misses      10799    10810      +11     
  Partials       80       80              
Flag Coverage Δ
python 80.96% <ø> (-0.08%) ⬇️
ruby-api 84.48% <ø> (ø)
ruby-backend 82.17% <40.62%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

def write(self, string):
# Can't use isoformat because it appends "+00:00" instead of "Z"
self._report.append(datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%S.%fZ") + ": " + string)
# Get time_zone setting to determine timestamp format
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pointless because the timezone is always UTC on the backend. Is this what is being done in ruby?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we're just using the backend UTC time but I think it would be better to use the user's setting. For most stuff that's all in the frontend but here we have to check because it's a backend process formatting the file.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The backend doesn't know what the local timezone is, so it can't do anything different.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh right ... it's just 'local' ... ok will revert ... this was claude's attempt at doing something lol

Comment thread openc3/openc3.gemspec
@@ -75,7 +75,6 @@ spec = Gem::Specification.new do |s|
s.files = Dir.glob("{bin,data,ext,lib,spec,tasks,templates,test}/**/*", File::FNM_DOTMATCH) + %w(Gemfile Guardfile LICENSE.txt Rakefile README.md)

# Runtime Dependencies
s.add_runtime_dependency 'bundler', '~> 2.3'
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This snuck in here but I'm going to remove it in a dependencies update as well. It is broken now that Bundler is 4.0.

@jmthomas jmthomas merged commit 772cbc1 into main Dec 16, 2025
27 of 28 checks passed
@jmthomas jmthomas deleted the template_default branch December 16, 2025 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants