Skip to content

Commit

Permalink
Merge pull request #997 from kbuma/fix-numpy2-opendatastore
Browse files Browse the repository at this point in the history
clarify state of open data stores
  • Loading branch information
rkingsbury authored Sep 29, 2024
2 parents 38797c9 + 0f47d27 commit 64265b4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/maggma/stores/open_data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import gzip
import logging
import re
from collections.abc import Generator
from datetime import datetime
Expand Down Expand Up @@ -53,6 +54,11 @@ def __init__(
self._data = None
self.key = key
self.last_updated_field = last_updated_field
self.logger = logging.getLogger(type(self).__name__)
self.logger.addHandler(logging.NullHandler())
self.logger.warning(
"Use all open data stores with caution as they are deprecated and may be incompatible with numpy 2.0+."
)

@property
def index_data(self):
Expand Down
3 changes: 3 additions & 0 deletions tests/stores/test_open_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@ def test_read_doc_from_s3():
assert (df["task_id"] == "mp-2").any()


@pytest.mark.xfail(
reason="Known issue, the store is in a deprecated state, and in particular may be incompatible with numpy 2.0+"
)
def test_update(s3store):
assert len(s3store.index_data) == 2
s3store.update(
Expand Down

0 comments on commit 64265b4

Please sign in to comment.