Skip to content

rest-api: co-locate test + requirements under unit-tests/wrappers/rest-api/ - #14956

Merged
Nir-Az merged 5 commits into
realsenseai:developmentfrom
Nir-Az:rest-api-reqs
Apr 23, 2026
Merged

Nir-Az merged 5 commits into
realsenseai:developmentfrom
Nir-Az:rest-api-reqs

Conversation

@Nir-Az

@Nir-Az Nir-Az commented Apr 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Split the REST API testing block out of unit-tests/requirements.txt (it pulled in aiortc/av, which needs system ffmpeg dev libs and broke pip install on stock GHA runners and on a fresh dev machine).
  • Created unit-tests/wrappers/rest-api/requirements.txt holding only the REST test extras (pytest-asyncio, typeguard, jinja2, pyyaml, lark, httpx); the REST runtime deps stay in wrappers/rest-api/requirements.txt.
  • Moved test-rest-api-wrapper.py from unit-tests/live/wrappers/ to unit-tests/wrappers/rest-api/ (next to its requirements) and switched the internal subprocess path from a CWD-relative "./wrappers/..." to repo.root-based, so the test works regardless of invocation directory.
  • Switched the Infra_Tests GHA step to pip3 install -r unit-tests/requirements.txt so the workflow stays aligned with the pinned plugin set.
  • Updated wrappers/rest-api/README.md Testing section to point at the new test-requirements path.

Test plan

  • unit-tests/infra-tests/ — 80/80 local pass
  • run-unit-tests.py --list-tests --debug discovers the moved test as test-wrappers-rest-api-rest-api-wrapper (correctly skipped on Windows per #test:donotrun:!linux)
  • CI Infra_Tests green after aiortc block is gone
  • REST machine CI still picks up test-wrappers-rest-api-rest-api-wrapper
    Goes with librealsense-deploy/pull/96

Nir-Az added 3 commits April 20, 2026 12:32
…t.txt and drop the block from unit-tests/requirements.txt
…switch Infra_Tests GHA to install from unit-tests/requirements.txt
Copilot AI review requested due to automatic review settings April 20, 2026 10:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors how the REST API wrapper tests are packaged and installed by separating REST-specific test dependencies from the global unit-tests/requirements.txt, and co-locating the REST API wrapper test + its extra requirements under unit-tests/wrappers/rest-api/ to avoid pulling heavy/system-dependent deps into unrelated CI jobs.

Changes:

  • Split REST API wrapper test extras into unit-tests/wrappers/rest-api/requirements.txt and removed the old REST testing block from unit-tests/requirements.txt.
  • Moved the REST API wrapper test to unit-tests/wrappers/rest-api/ and updated it to run the target pytest file via a repo.root-based path.
  • Updated the Infra_Tests CI job to install from unit-tests/requirements.txt, and updated the wrapper README’s testing instructions accordingly.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
wrappers/rest-api/README.md Updates testing instructions to install runtime + REST test extras via the new test requirements file.
unit-tests/wrappers/rest-api/test-rest-api-wrapper.py Adjusts pytest invocation to use an absolute path rooted at repo.root for cwd-independent execution.
unit-tests/wrappers/rest-api/requirements.txt Adds a dedicated requirements file for REST API wrapper test-only extras.
unit-tests/requirements.txt Removes REST API testing deps from the global unit-test requirements to avoid installing heavy deps in unrelated contexts.
.github/workflows/buildsCI.yaml Makes Infra_Tests install pinned unit-test requirements via -r unit-tests/requirements.txt.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread wrappers/rest-api/README.md Resolved
@Nir-Az
Nir-Az requested a review from AviaAv April 20, 2026 11:59

@AviaAv AviaAv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@Nir-Az
Nir-Az merged commit 92e2c8f into realsenseai:development Apr 23, 2026
30 checks passed
@Nir-Az
Nir-Az deleted the rest-api-reqs branch May 24, 2026 07:03
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.

3 participants