Add system test#1574
Draft
ZohebShaikh wants to merge 14 commits into
Draft
Conversation
Update policy for new tiled version We are currently on [v0.2.4](https://github.com/bluesky/tiled/blob/main/CHANGELOG.md#v024-2026-02-18)
Ensure that the tiled auth configuration is valid and fail fast instead of when the first data is written.
This was originally to make serialization behave correctly when the task was passed to requests. As we are using pydantic to dump the model to JSON before passing it, we can add the custom serialization there to get the device-to-string conversion that we need.
Running `uv add debugpy` in the container modifies pyproject.toml and uv.lock so `git describe` reports local changes in the repo and appends a `dev0+g<commit>.d<date>` suffix to the version used for the blueapi in the container Using `uv pip install debugpy` makes it available in the environment without modifying any tracked files. This has to be run after the `uv sync` to stop it being removed again.
Remove DeviceSource and DodalSource and patch up tests --------- Co-authored-by: oliwenmandiamond <136330507+oliwenmandiamond@users.noreply.github.com>
The builtin fastapi support for middleware only supports http/rest requests. To enable the same middleware for websockets, a new implementation of the starlette middleware is required and it makes sense to use the same implementation for both protocols. For rest requests, there should not be any change in behaviour from this change.
As we have a 4 core GitHub action run we can utilise it more efficiently by running all our unit test in parallel. Currently it take the following amount of time to run unit test - python3.11: 2m vs now 59s - python3.12: 2m 1s vs now 1m 28s - python3.13: 1m 44s vs now 1m 12s It is consistently less in the future it will be a nice addition to run system test in parallel as well. It will require some more work so will do it in another PR.
Currently the following configs are not checked for equality
$ just repl will now launch a repl (using ptpython) with an initialized BlueapiClient named `bc` using the config from the system tests (the same used by `just serve` to run the server).
The default application still included dodal plans as a default. With the change to remove this dependency from the default application this would cause the server to error when trying to fetch plans. This replaces those defaults with an empty list.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## add_depedency_injection #1574 +/- ##
===========================================================
+ Coverage 95.89% 95.95% +0.06%
===========================================================
Files 44 44
Lines 3338 3315 -23
===========================================================
- Hits 3201 3181 -20
+ Misses 137 134 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Fixes #ISSUE
Instructions to reviewer on how to test:
Checks for reviewer