Skip to content

Codegen fix to use enum's python_name instead of name - #2218

Merged
vnktshr21 merged 4 commits into
ni:masterfrom
mohit-emerson:codegen_fix_rfsa
Oct 9, 2026
Merged

vnktshr21 merged 4 commits into
ni:masterfrom
mohit-emerson:codegen_fix_rfsa

Conversation

@mohit-emerson

@mohit-emerson mohit-emerson commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor
  • This contribution adheres to CONTRIBUTING.md.
  • [ ] I've updated CHANGELOG.md if applicable.
  • [ ] I've added tests applicable for this pull request

What does this Pull Request accomplish?

  • This change is needed because in RFSA we need to retain Iq for ReferenceTriggerIqPowerEdgeSlope, IqInPortTerminalConfiguration enum names instead of IQ to maintain backward compatibility.
  • Codegen was using metadata entry name for enums to generate not their python_name.
  • Fixed fixup_enum_names() to run for all enums regardless of codegen_method, not just private ones.
  • Fixed enums.rst.mako and format_type_for_rst_documentation() to resolve the enum's python_name instead of name.

What testing has been done?

  • PR Validations
  • None unexpected change produced in any driver.

@codecov-commenter

codecov-commenter commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.12%. Comparing base (7f9eadb) to head (2d59eee).

Files with missing lines Patch % Lines
build/helper/metadata_add_all.py 33.33% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2218      +/-   ##
==========================================
- Coverage   88.13%   88.12%   -0.02%     
==========================================
  Files          88       88              
  Lines       22828    22832       +4     
==========================================
+ Hits        20119    20120       +1     
- Misses       2709     2712       +3     
Flag Coverage Δ
codegenunittests 84.78% <42.85%> (-0.21%) ⬇️
nidcpowersystemtests 94.40% <ø> (+0.04%) ⬆️
nidcpowerunittests 89.53% <ø> (ø)
nidigitalsystemtests 92.04% <ø> (ø)
nidigitalunittests 68.43% <ø> (ø)
nidmmsystemtests 92.33% <ø> (ø)
nifakeunittests 86.08% <ø> (ø)
nifgensystemtests 94.34% <ø> (ø)
nimodinstsystemtests 73.85% <ø> (ø)
nimodinstunittests 94.20% <ø> (ø)
nirfsasystemtests 82.71% <ø> (ø)
nirfsaunittests 63.40% <100.00%> (ø)
nirfsgsystemtests 81.18% <ø> (ø)
niscopesystemtests 89.99% <ø> (ø)
niscopeunittests 43.20% <ø> (ø)
nisesystemtests 91.50% <ø> (ø)
niswitchsystemtests 81.66% <ø> (ø)
nitclksystemtests 94.87% <ø> (ø)
nitclkunittests 98.26% <ø> (ø)

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

☔ View full report in Codecov by Harness.
📢 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.

@mohit-emerson
mohit-emerson marked this pull request as ready for review October 9, 2026 07:37
@vnktshr21
vnktshr21 merged commit 10c53f1 into ni:master Oct 9, 2026
49 checks passed
@ni-jfitzger

Copy link
Copy Markdown
Collaborator

Interesting. This brings to mind #2073, but I see this is focused on the enum class names, whereas that's focused on value names.

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.

4 participants