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

mongoclient_kwargs #575

Merged
merged 2 commits into from Mar 5, 2022
Merged

Conversation

jmmshn
Copy link
Contributor

@jmmshn jmmshn commented Mar 4, 2022

Allows additional kwargs to be passed to MongoClient in different stores that contain MongoClient inits.

@codecov
Copy link

codecov bot commented Mar 4, 2022

Codecov Report

Merging #575 (515c74f) into main (c33381e) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #575      +/-   ##
==========================================
+ Coverage   89.11%   89.13%   +0.01%     
==========================================
  Files          40       40              
  Lines        2794     2797       +3     
==========================================
+ Hits         2490     2493       +3     
  Misses        304      304              
Impacted Files Coverage Δ
src/maggma/stores/compound_stores.py 81.66% <100.00%> (+0.10%) ⬆️
src/maggma/stores/gridfs.py 94.38% <100.00%> (+0.03%) ⬆️
src/maggma/stores/mongolike.py 86.84% <100.00%> (+0.03%) ⬆️

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 23d6c73...515c74f. Read the comment docs.

@@ -564,7 +567,7 @@ def connect(self, force_reset: bool = False):
Connect to the source data
"""
if self._coll is None or force_reset: # pragma: no cover
conn = MongoClient(self.uri)
conn = MongoClient(self.uri, self.mongodb_client_kwargs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs **self.mongoclient_kwargs, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops! fixed

@munrojm munrojm merged commit dcf3273 into materialsproject:main Mar 5, 2022
@jmmshn jmmshn mentioned this pull request Mar 5, 2022
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