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

MongograntStore: make optional dependency, prepare for removal #950

Merged
merged 9 commits into from
May 27, 2024

Conversation

rkingsbury
Copy link
Collaborator

Summary

As discussed in #928

  • Move mongogrant to the optional dependency group [mongogrant]
  • Add a requires decorator to MongograntStore
  • Mark MongograntStore for deprecation
  • Remove from docs

@rkingsbury rkingsbury self-assigned this May 14, 2024
@rkingsbury rkingsbury added enhancement dependencies Pull requests that update a dependency file breaking includes breaking changes labels May 14, 2024
Copy link

codecov bot commented May 14, 2024

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 81.25%. Comparing base (1fc0e33) to head (dba6cbe).
Report is 11 commits behind head on main.

Current head dba6cbe differs from pull request most recent head 4b62290

Please upload reports for the commit 4b62290 to get more accurate results.

Files Patch % Lines
src/maggma/stores/advanced_stores.py 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #950      +/-   ##
==========================================
- Coverage   81.33%   81.25%   -0.09%     
==========================================
  Files          46       46              
  Lines        3971     3974       +3     
==========================================
- Hits         3230     3229       -1     
- Misses        741      745       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rkingsbury
Copy link
Collaborator Author

Does this look OK to you @munrojm ? I agree with your comment that we should probably remove MongograntStore eventually. This will pave the way.

@rkingsbury
Copy link
Collaborator Author

@munrojm I think this is good to go. In my local testing both warnings behave as expected. I'll probably merge later today unless you have objections.

>>> from maggma.stores import MongograntStore
>>> mgs=MongograntStore()
<stdin>:1: FutureWarning: MongograntStore is deprecated; use MongoStore in maggma.stores.mongolike instead.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ryan/miniconda3/envs/skagit2/lib/python3.10/site-packages/monty/dev.py", line 132, in new_init
    original_init(self, *args, **kwargs)
  File "/home/ryan/miniconda3/envs/skagit2/lib/python3.10/site-packages/monty/dev.py", line 199, in decorated
    raise self.err_cls(self.message)
RuntimeError: mongogrant is required to use MongoGrantStore. Please run `pip install maggma[mongogrant]
>>>

@rkingsbury rkingsbury merged commit f88951d into materialsproject:main May 27, 2024
7 checks passed
@rkingsbury rkingsbury deleted the mgrant branch May 27, 2024 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking includes breaking changes dependencies Pull requests that update a dependency file enhancement release:minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant