Skip to content

Add CONVERTED_DATA keyword for conversions#2953

Open
jmthomas wants to merge 4 commits intomainfrom
converted_data
Open

Add CONVERTED_DATA keyword for conversions#2953
jmthomas wants to merge 4 commits intomainfrom
converted_data

Conversation

@jmthomas
Copy link
Member

@jmthomas jmthomas commented Mar 7, 2026

closes #2822

If we like this I'll remove the converted_type and converted_bit_size from the various conversions

@jmthomas jmthomas requested a review from ryanmelt March 7, 2026 18:17
@codecov
Copy link

codecov bot commented Mar 7, 2026

Codecov Report

❌ Patch coverage is 26.92308% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.45%. Comparing base (8685121) to head (3a027e3).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
openc3/lib/openc3/packets/packet_config.rb 8.33% 11 Missing ⚠️
openc3/lib/openc3/utilities/python_proxy.rb 27.27% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2953      +/-   ##
==========================================
+ Coverage   77.84%   78.45%   +0.60%     
==========================================
  Files         471      673     +202     
  Lines       34693    55361   +20668     
  Branches      728      728              
==========================================
+ Hits        27008    43435   +16427     
- Misses       7607    11848    +4241     
  Partials       78       78              
Flag Coverage Δ
python 79.68% <ø> (-16.36%) ⬇️
ruby-api 80.89% <ø> (+0.10%) ⬆️
ruby-backend 82.08% <26.92%> (-0.07%) ⬇️

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.

attr_accessor :converted_bit_size
# @return [Integer] The size in bits of the converted array value
attr_reader :converted_array_size
attr_accessor :converted_array_size
Copy link
Member Author

Choose a reason for hiding this comment

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

We're now setting these fields via CONVERTED_DATA so they must be accessor

# Fall back to item's own data_type/bit_size when conversion doesn't specify
if converted_type is None:
converted_type = data_type
converted_bit_size = bit_size
Copy link
Member Author

Choose a reason for hiding this comment

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

This is another key change such that if you don't specify a CONVERTED_DATA field we use the existing type and bit size instead of going with varchar.

summary: Defines the bit size, type, and array size of the converted data for a read conversion
description: This keyword is used in conjunction with DERIVED items to specify the bit size, type, and array size of the converted data.
If this keyword is not used, DERIVED items are stored as strings in the decommutated data.
since: 7.0.0
Copy link
Member Author

Choose a reason for hiding this comment

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

Let's get this into 7.0.0

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 9, 2026

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.

Write conversion keywords

1 participant