Closed DiamondJoseph closed 2 months ago
Attention: Patch coverage is 88.88889%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 93.62%. Comparing base (
578c57f
) to head (d4f059f
). Report is 1 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
src/bluesky_stomp/models.py | 88.88% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Required for https://github.com/DiamondLightSource/blueapi/issues/636
Current parsing of blueapi config passes a blueapi BasicAuthentication with fields username, passcode as an instance of bluesky-stomp BasicAuthentication with fields username, password. I am not certain that we would be able to pass the former as an instance of the latter even if their arguments agreed, as they are different Pydantic models. By moving the parsing of environment variables into this class, we can simply make use of this library's BasicAuthentication as part of the config of blueapi and not duplicate the logic.
We additionally noticed logging of passwords, so making the password field a Secret[str] was a sensible move. Note that type checking does not like passing a str as a Secret[str]: https://github.com/pydantic/pydantic/issues/9557