Remove need for 'ISPYB_CREDENTIALS' environment variable#588
Merged
Remove need for 'ISPYB_CREDENTIALS' environment variable#588
Conversation
…r an ISPYB_CREDENTIALS environment variable
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #588 +/- ##
==========================================
+ Coverage 30.15% 30.17% +0.01%
==========================================
Files 80 80
Lines 10514 10517 +3
Branches 1405 1406 +1
==========================================
+ Hits 3171 3174 +3
+ Misses 7238 7237 -1
- Partials 105 106 +1 🚀 New features to boost your workflow:
|
…tion file fixture to return file path as part of the fixture
…e with values inserted
… MariaDB to read them correctly
…e from CI workflow
d-j-hatton
reviewed
May 7, 2025
… for an example visit; populated the ISPyB database in the fixture instead of in the test
… database is pre-populated
…ixture, and made the insertions idempotent
…ures as SQLModel sessions
…; seed ISPyB database with ExperimentType information as well
d-j-hatton
approved these changes
May 9, 2025
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 #587 .
ispyb.sqlalchemy.url()takescredentialsas an argument, through which the config file can be passed directly to the function instead of relying on theISPYB_CREDENTIALSenvironment variable. This eliminates the last traces of our repo's need to explicitly defineISPYB_CREDENTIALS.Additionally, elements of the CI workflow and test code related to the Murfey and ISPyB databases have also been modified.
ISPYB_CREDENTIALShas also been dropped successfully from the test workflow, and fixtures have been put in place to allow for the creation of databases that will be reset to a desired initial state at the end of every test. This means that the database does not have to be shut down and rebooted with every database-related test, which should help with our testing times as we continue to improve Murfey's test coverage.NOTE: Within our code base, it looks like ISPyB spawns SQLAlchemy
Sessionobjects, whereas the Murfey database spawns SQLModel ones. As such, SQLModel's functions might not work when querying the ISPyB database. The database session fixtures for the ISPyB and Murfey test databases have been written to reflect this.