Fixed Murfey's Auto-Update Function and Improved Pytest Functionality#625
Merged
Fixed Murfey's Auto-Update Function and Improved Pytest Functionality#625
Conversation
…lient.tui.main', since its contents are related to the initialisation of the TUI app Removed unused key 'default_destination' from 'MurfeyInstanceEnvironment' setup, along with commented out keys
…ent' setup in 'MultigridController'
…ate checker is run through to completion before the components needed to update the server are imported and initialised, thereby avoiding the files associated with the process from becoming locked
…as a dependency under the 'standard' FastAPI package in 0.116.0, currently uses 'httpx'<0.28.0, which causes a clash with 'bump-my-version', which uses 'httpx'>=0.28.0; updates the 'murfey.client' entry point to point to where the function to initiliase the TUI app has been migrated to
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #625 +/- ##
==========================================
+ Coverage 32.30% 32.95% +0.65%
==========================================
Files 92 90 -2
Lines 11119 11118 -1
Branches 1465 1465
==========================================
+ Hits 3592 3664 +72
+ Misses 7402 7324 -78
- Partials 125 130 +5 🚀 New features to boost your workflow:
|
… up properly; this allows us to run Pytest locally again even without test databases configured
…nimise repetition and enable ease of use in test suite; added comment for when an 'exit()' is not needed
…e the client is correct, needs upgrading, or needs downgrading
…enuinely raise errors if they fail in the GitHub Actions runners
stephen-riggs
approved these changes
Jul 10, 2025
Contributor
stephen-riggs
left a comment
There was a problem hiding this comment.
Looks fine to me. As discussed before, we need to be careful that the tests always do run on github, but I think the method you have here is fine.
I tried running the tests on my machine and found they crash if you have murfey_dls_extras installed, but otherwise all seemed good.
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.
Resolves issue #624 .
The upgrade to Pydantic v2 has caused our current method of getting Murfey to check for updates on the client side to fail, as the files become locked and cannot be overwritten as part of the install.
Avoiding importing Murfey components that use Pydantic appears to resolve the issue, so the
murfey.clientmodules have been refactored so that Pydantic-related components are not loaded when starting the TUI or instrument server until after the update check.Additionally, this PR also adds tests for the client update and instrument server initialisation functions, and adds functionality to Pytest to skip database-related tests if it is being run outside of GitHub, allowing us to run it locally even if we don't have the database components set up.