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 issue with close and MongoStore and update _collection attribute #523

Merged
merged 8 commits into from
Dec 9, 2021

Conversation

munrojm
Copy link
Member

@munrojm munrojm commented Dec 8, 2021

This PR fixes an issue where collection was not getting set back to None when closing the MongoDB connection. This is required to support changes in pymongo==4.0.

Also, collection as store property is replaced with _collection to provide better error handling surrounding connection issues.

@munrojm munrojm changed the title Fix issue with close and MongoStore Fix issue with close and MongoStore and update _collection attribute Dec 8, 2021
@codecov
Copy link

codecov bot commented Dec 8, 2021

Codecov Report

Merging #523 (d0e4b9e) into main (0f384dc) will increase coverage by 0.02%.
The diff coverage is 91.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #523      +/-   ##
==========================================
+ Coverage   88.97%   88.99%   +0.02%     
==========================================
  Files          40       40              
  Lines        2738     2735       -3     
==========================================
- Hits         2436     2434       -2     
+ Misses        302      301       -1     
Impacted Files Coverage Δ
src/maggma/stores/aws.py 87.95% <66.66%> (-0.13%) ⬇️
src/maggma/stores/advanced_stores.py 78.72% <80.00%> (ø)
src/maggma/stores/compound_stores.py 81.56% <90.00%> (-0.11%) ⬇️
src/maggma/stores/gridfs.py 94.25% <90.00%> (ø)
src/maggma/core/store.py 86.13% <100.00%> (-0.14%) ⬇️
src/maggma/stores/mongolike.py 86.64% <100.00%> (+0.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update baff06b...d0e4b9e. Read the comment docs.

@lgtm-com
Copy link

lgtm-com bot commented Dec 9, 2021

This pull request introduces 4 alerts when merging 01d9ce4 into baff06b - view on LGTM.com

new alerts:

  • 4 for Unused import

@munrojm munrojm merged commit 00de931 into main Dec 9, 2021
@munrojm munrojm deleted the more_pymonogo_updates branch December 9, 2021 00:32
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.

1 participant