Repository navigation
rest-api: co-locate test + requirements under unit-tests/wrappers/rest-api/ - #14956
Merged
Merged
Conversation
…t.txt and drop the block from unit-tests/requirements.txt
…-api/requirements.txt
…switch Infra_Tests GHA to install from unit-tests/requirements.txt
Contributor
There was a problem hiding this comment.
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.txtand removed the old REST testing block fromunit-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 arepo.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.
…o it is unambiguous regardless of CWD
…m_machine markers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
unit-tests/requirements.txt(it pulled inaiortc/av, which needs system ffmpeg dev libs and brokepip installon stock GHA runners and on a fresh dev machine).unit-tests/wrappers/rest-api/requirements.txtholding only the REST test extras (pytest-asyncio, typeguard, jinja2, pyyaml, lark, httpx); the REST runtime deps stay inwrappers/rest-api/requirements.txt.test-rest-api-wrapper.pyfromunit-tests/live/wrappers/tounit-tests/wrappers/rest-api/(next to its requirements) and switched the internal subprocess path from a CWD-relative"./wrappers/..."torepo.root-based, so the test works regardless of invocation directory.Infra_TestsGHA step topip3 install -r unit-tests/requirements.txtso the workflow stays aligned with the pinned plugin set.wrappers/rest-api/README.mdTesting section to point at the new test-requirements path.Test plan
unit-tests/infra-tests/— 80/80 local passrun-unit-tests.py --list-tests --debugdiscovers the moved test astest-wrappers-rest-api-rest-api-wrapper(correctly skipped on Windows per#test:donotrun:!linux)aiortcblock is gonetest-wrappers-rest-api-rest-api-wrapperGoes with librealsense-deploy/pull/96