Skip to content

Commit

Permalink
issue warning about state of open data stores and xfail tests that do…
Browse files Browse the repository at this point in the history
… not work with numpy 2.x
  • Loading branch information
kbuma committed Sep 19, 2024
1 parent 38797c9 commit 2949b82
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. The stores are in a a deprecated, and in particular 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 2949b82

Please sign in to comment.