Skip to content

ci: check public API compatibility in pull requests - #1033

Open
shrishsk wants to merge 2 commits into
ni:masterfrom
shrishsk:users/kshrish/914-api-compatibility-checks
Open

shrishsk wants to merge 2 commits into
ni:masterfrom
shrishsk:users/kshrish/914-api-compatibility-checks

Conversation

@shrishsk

@shrishsk shrishsk commented Oct 17, 2026 •

Copy link
Copy Markdown
  • This contribution adheres to CONTRIBUTING.md.
  • I've updated CHANGELOG.md if applicable. No client-facing behavior changes.
  • I've added tests applicable for this pull request. No permanent unit or system tests added for this CI configuration change; validated locally using temporary breaking-change probes.

What does this Pull Request accomplish?

Adds automated public API compatibility checks to the PR workflow using Griffe.

  • Compares 29 API entry points against the PR's base commit, including all 25 modules referenced by the API documentation.
  • Covers documented classes in private implementation modules, including collections and watchdog classes.
  • Reports potential breaking changes through GitHub annotations and fails the job.
  • Documents how contributors can reproduce compatibility checks locally.

The job uses read-only permissions, pinned actions, and Griffe 2.3.2. It requires no NI-DAQmx driver or package runtime dependencies.

Fixes #914.

Why should this Pull Request be merged?

Detects potential API-breaking changes before merging, rather than relying solely on internal tests after merge.

Checking documented implementation modules explicitly closes a verified coverage gap: checking nidaqmx.system alone did not detect removal of a documented collection property.

What testing has been done?

  • Confirmed that all 25 documented modules are included in the 29-entry-point check.
  • Ran the workflow's exact Bash command locally against unchanged APIs; it passed.
  • Temporarily removed DeviceCollection.device_names; the expanded workflow command emitted a GitHub annotation and exited with code 1.
  • poetry run ni-python-styleguide lint passed.
  • poetry run mypy passed across 272 source files.
  • npx cspell "**" --no-progress passed across 429 files.
  • Workflow YAML and Bash syntax validation passed.
  • Zizmor reported no medium-or-higher findings; an existing low-severity warning is unrelated to this change.

Temporary validation scripts, task configuration, and API modifications were removed. Hardware-dependent regression tests were not run.

Signed-off-by: Shrish Kulkarni <shrish.kulkarni@ni.com>
@shrishsk
shrishsk marked this pull request as draft October 17, 2026 12:32
Signed-off-by: Shrish Kulkarni <shrish.kulkarni@ni.com>
@shrishsk
shrishsk marked this pull request as ready for review October 17, 2026 14:10

This branch has not been deployed

No deployments
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.

Add automated API compatibility checks to GitHub PR workflow

1 participant