Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GridFSURIStore and increase testing #1037

Merged
merged 1 commit into from
Mar 9, 2025

Conversation

gpetretto
Copy link
Contributor

While testing GridFSURIStore I discovered that there are several potential sources of errors due to the fact that it uses methods of the baseclass (GridFSStore), even if some attributes are not defined. Also there are no safeguard for accessing the _files_store attribute in case the store is not connected.

This PR addresses these issues and modifies the gridfs tests so that all the tests are executed on both the GridFSStore and GridFSURIStore. This should hopefully reduce the chances of regression.

Also I noted that the ssh_tunnel is not taken into account in either of the "URI" stores. I kept the argument in the __init__ to maintain the same API as the base classes, but it explicitly raises if passed.

Copy link

codecov bot commented Mar 9, 2025

Codecov Report

Attention: Patch coverage is 79.16667% with 5 lines in your changes missing coverage. Please review.

Project coverage is 88.84%. Comparing base (2632269) to head (7415557).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/maggma/stores/gridfs.py 80.95% 4 Missing ⚠️
src/maggma/stores/mongolike.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1037      +/-   ##
==========================================
- Coverage   88.91%   88.84%   -0.07%     
==========================================
  Files          46       46              
  Lines        3997     4017      +20     
==========================================
+ Hits         3554     3569      +15     
- Misses        443      448       +5     

☔ View full report in Codecov by Sentry.
📢 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.

@rkingsbury rkingsbury merged commit 568ccdf into materialsproject:main Mar 9, 2025
8 of 10 checks passed
@rkingsbury
Copy link
Collaborator

Thanks @gpetretto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants