Skip to content

Replace GNU Make Codegen with Python - #2241

Open
ni-jfitzger wants to merge 9 commits into
ni:masterfrom
ni-jfitzger:replace-gnu-make-with-python
Open

ni-jfitzger wants to merge 9 commits into
ni:masterfrom
ni-jfitzger:replace-gnu-make-with-python

Conversation

@ni-jfitzger

@ni-jfitzger ni-jfitzger commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator
  • 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?

The GNU Make code used for code generation was a barrier to entry for anyone not familar with GNU Make and, frankly, even for those who are familiar with it. Some of the code was very difficult to read. Variables and recipes were also scattered across the repo, making it more difficult to read.

Using GitHub Copilot, this PR replaces those files and some of their Python code with a consolidated build/codegen.py, which implements the codegen, clean and installers steps.

List issues fixed by this Pull Request below, if any.

What testing has been done?

Ran tox -e clean, tox -e codegen, tox -e installers, tox -e codegen -- -driver nidmm. No difference seen in the generated files.

Ran newly generated unit tests. These don't cover all of codegen.py, but it's more than we had for the MAKEFILE code. Our primary method of catching issues remains ensure_codegen_up_to_date.py, diffs and code review of PRs.

I carefully reviewed all of the new code and had GitHub Copilot scrutinize for any issues that I might have missed.

@codecov-commenter

codecov-commenter commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 58.09129% with 101 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.19%. Comparing base (609c4ee) to head (f7940e2).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
build/codegen.py 58.64% 98 Missing ⚠️
build/helper/metadata_add_all.py 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2241      +/-   ##
==========================================
- Coverage   88.12%   83.19%   -4.93%     
==========================================
  Files          88       89       +1     
  Lines       22830    23071     +241     
==========================================
- Hits        20118    19194     -924     
- Misses       2712     3877    +1165     
Flag Coverage Δ
codegenunittests 25.87% <58.09%> (-58.92%) ⬇️
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.37% <ø> (ø)
nirfsgsystemtests 81.22% <ø> (ø)
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.

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.

Replace GNU Make Code with Python

2 participants