Skip to content

Add system test#1574

Draft
ZohebShaikh wants to merge 14 commits into
add_depedency_injectionfrom
add_system_test
Draft

Add system test#1574
ZohebShaikh wants to merge 14 commits into
add_depedency_injectionfrom
add_system_test

Conversation

@ZohebShaikh

Copy link
Copy Markdown
Contributor

Fixes #ISSUE

Instructions to reviewer on how to test:

  1. Do thing x
  2. Confirm thing y happens

Checks for reviewer

  • Would the PR title make sense to a user on a set of release notes

ZohebShaikh and others added 14 commits June 24, 2026 08:43
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

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.95%. Comparing base (55c9886) to head (c9fd7d2).

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.
📢 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.

3 participants