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

Clarify docstring for MontyDB and add missing self.database property #806

Merged
merged 5 commits into from Jun 14, 2023
Merged

Clarify docstring for MontyDB and add missing self.database property #806

merged 5 commits into from Jun 14, 2023

Conversation

Andrew-S-Rosen
Copy link
Member

@Andrew-S-Rosen Andrew-S-Rosen commented Jun 13, 2023

Closes #796 in terms of clarifying the docstring.

I also added the missing self.database property because otherwise when you do MontyStore().name you get the following back:

----> 1 store.name

File ~/software/miniconda/envs/quacc/lib/python3.9/site-packages/maggma/stores/mongolike.py:956, in MontyStore.name(self)
    953 @property
    954 def name(self) -> str:
    955     """Return a string representing this data source."""
--> 956     return f"monty://{self.database_path}/{self.database}/{self.collection_name}"

AttributeError: 'MontyStore' object has no attribute 'database'

@codecov
Copy link

codecov bot commented Jun 13, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.03 🎉

Comparison is base (cd7b6e0) 88.20% compared to head (7190fdd) 88.23%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #806      +/-   ##
==========================================
+ Coverage   88.20%   88.23%   +0.03%     
==========================================
  Files          44       44              
  Lines        3587     3588       +1     
==========================================
+ Hits         3164     3166       +2     
+ Misses        423      422       -1     
Impacted Files Coverage Δ
src/maggma/cli/multiprocessing.py 94.73% <100.00%> (ø)
src/maggma/cli/serial.py 79.31% <100.00%> (ø)
src/maggma/stores/aws.py 91.74% <100.00%> (ø)
src/maggma/stores/mongolike.py 88.54% <100.00%> (+0.29%) ⬆️
src/maggma/utils.py 95.72% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Andrew-S-Rosen Andrew-S-Rosen changed the title Clarify docstring for MontyDB Clarify docstring for MontyDB and add missing self.database property Jun 13, 2023
@Andrew-S-Rosen Andrew-S-Rosen changed the title Clarify docstring for MontyDB and add missing self.database property [WIP] Clarify docstring for MontyDB and add missing self.database property Jun 13, 2023
@Andrew-S-Rosen Andrew-S-Rosen changed the title [WIP] Clarify docstring for MontyDB and add missing self.database property Clarify docstring for MontyDB and add missing self.database property Jun 14, 2023
@Andrew-S-Rosen
Copy link
Member Author

@rkingsbury: this is ready to merge once the tests pass. See the linked issue for an explanation. The tl;dr is that this feature isn't available in montydb.

@rkingsbury rkingsbury merged commit dbcd487 into materialsproject:main Jun 14, 2023
10 of 11 checks passed
@rkingsbury
Copy link
Collaborator

Thanks for investigating @arosen93! The python 3.11 test failure is unrelated and will be addressed separately.

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

Successfully merging this pull request may close these issues.

MontyStore cannot be used with a pre-existing local DB
2 participants