Skip to content

Commit 9b2c4e6

Browse files
authored
Merge branch 'main' into auto-dependency-upgrades
2 parents 33e595b + 5fd5603 commit 9b2c4e6

File tree

4 files changed

+36
-28
lines changed

4 files changed

+36
-28
lines changed

docs/CHANGELOG.md

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
# Changelog
22

3-
## [Unreleased](https://github.com/materialsproject/maggma/tree/HEAD)
3+
## [v0.71.3](https://github.com/materialsproject/maggma/tree/v0.71.3) (2025-02-06)
44

5-
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.71.2...HEAD)
5+
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.71.2...v0.71.3)
6+
7+
**Implemented enhancements:**
8+
9+
- zopen: add explicit encoding to read\_json; explicit mode [\#1030](https://github.com/materialsproject/maggma/pull/1030) ([rkingsbury](https://github.com/rkingsbury))
610

711
**Fixed bugs:**
812

913
- \[Bug\]: monty's zopen expects keyword `mode` to be set [\#1024](https://github.com/materialsproject/maggma/issues/1024)
1014

15+
**Merged pull requests:**
16+
17+
- Remove python 3.8 classifier from pyproject.toml [\#1029](https://github.com/materialsproject/maggma/pull/1029) ([Andrew-S-Rosen](https://github.com/Andrew-S-Rosen))
18+
1119
## [v0.71.2](https://github.com/materialsproject/maggma/tree/v0.71.2) (2025-01-21)
1220

1321
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.71.1...v0.71.2)
@@ -472,19 +480,19 @@
472480

473481
## [v0.53.0](https://github.com/materialsproject/maggma/tree/v0.53.0) (2023-08-02)
474482

475-
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.52.1...v0.53.0)
483+
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.52.2...v0.53.0)
476484

477485
**Merged pull requests:**
478486

479487
- allow \>5GB and turn on multi-part uploads for AWS [\#829](https://github.com/materialsproject/maggma/pull/829) ([kbuma](https://github.com/kbuma))
480488

481-
## [v0.52.1](https://github.com/materialsproject/maggma/tree/v0.52.1) (2023-08-02)
489+
## [v0.52.2](https://github.com/materialsproject/maggma/tree/v0.52.2) (2023-08-02)
482490

483-
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.52.2...v0.52.1)
491+
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.52.1...v0.52.2)
484492

485-
## [v0.52.2](https://github.com/materialsproject/maggma/tree/v0.52.2) (2023-08-02)
493+
## [v0.52.1](https://github.com/materialsproject/maggma/tree/v0.52.1) (2023-08-02)
486494

487-
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.52.0...v0.52.2)
495+
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.52.0...v0.52.1)
488496

489497
**Merged pull requests:**
490498

@@ -672,19 +680,19 @@
672680

673681
## [v0.51.4](https://github.com/materialsproject/maggma/tree/v0.51.4) (2023-06-02)
674682

675-
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.51.2...v0.51.4)
683+
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.51.3...v0.51.4)
676684

677685
**Merged pull requests:**
678686

679687
- modify JSONStore file creation [\#792](https://github.com/materialsproject/maggma/pull/792) ([gpetretto](https://github.com/gpetretto))
680688

681-
## [v0.51.2](https://github.com/materialsproject/maggma/tree/v0.51.2) (2023-05-29)
689+
## [v0.51.3](https://github.com/materialsproject/maggma/tree/v0.51.3) (2023-05-29)
682690

683-
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.51.3...v0.51.2)
691+
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.51.2...v0.51.3)
684692

685-
## [v0.51.3](https://github.com/materialsproject/maggma/tree/v0.51.3) (2023-05-29)
693+
## [v0.51.2](https://github.com/materialsproject/maggma/tree/v0.51.2) (2023-05-29)
686694

687-
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.51.1...v0.51.3)
695+
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.51.1...v0.51.2)
688696

689697
**Merged pull requests:**
690698

@@ -821,19 +829,19 @@
821829

822830
## [v0.49.9](https://github.com/materialsproject/maggma/tree/v0.49.9) (2022-11-01)
823831

824-
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.49.7...v0.49.9)
832+
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.49.8...v0.49.9)
825833

826834
**Merged pull requests:**
827835

828836
- Parse datetime with dateutil [\#741](https://github.com/materialsproject/maggma/pull/741) ([munrojm](https://github.com/munrojm))
829837

830-
## [v0.49.7](https://github.com/materialsproject/maggma/tree/v0.49.7) (2022-10-25)
838+
## [v0.49.8](https://github.com/materialsproject/maggma/tree/v0.49.8) (2022-10-25)
831839

832-
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.49.8...v0.49.7)
840+
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.49.7...v0.49.8)
833841

834-
## [v0.49.8](https://github.com/materialsproject/maggma/tree/v0.49.8) (2022-10-25)
842+
## [v0.49.7](https://github.com/materialsproject/maggma/tree/v0.49.7) (2022-10-25)
835843

836-
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.49.6...v0.49.8)
844+
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.49.6...v0.49.7)
837845

838846
**Merged pull requests:**
839847

@@ -1042,23 +1050,23 @@
10421050

10431051
## [v0.44.1](https://github.com/materialsproject/maggma/tree/v0.44.1) (2022-03-08)
10441052

1045-
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.42.0...v0.44.1)
1053+
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.43.0...v0.44.1)
10461054

10471055
**Merged pull requests:**
10481056

10491057
- added localhost test for MongoURIStore [\#595](https://github.com/materialsproject/maggma/pull/595) ([jmmshn](https://github.com/jmmshn))
10501058

1051-
## [v0.42.0](https://github.com/materialsproject/maggma/tree/v0.42.0) (2022-03-07)
1052-
1053-
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.43.0...v0.42.0)
1054-
10551059
## [v0.43.0](https://github.com/materialsproject/maggma/tree/v0.43.0) (2022-03-07)
10561060

10571061
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.44.0...v0.43.0)
10581062

10591063
## [v0.44.0](https://github.com/materialsproject/maggma/tree/v0.44.0) (2022-03-07)
10601064

1061-
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.41.1...v0.44.0)
1065+
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.42.0...v0.44.0)
1066+
1067+
## [v0.42.0](https://github.com/materialsproject/maggma/tree/v0.42.0) (2022-03-07)
1068+
1069+
[Full Changelog](https://github.com/materialsproject/maggma/compare/v0.41.1...v0.42.0)
10621070

10631071
**Merged pull requests:**
10641072

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies = [
2727
"ruamel.yaml>=0.17",
2828
"pydantic>=2.0",
2929
"pydantic-settings>=2.0.3",
30-
"pymongo>=4.2.0",
30+
"pymongo>=4.2.0,<4.11",
3131
"monty>=2024.5.24",
3232
"mongomock>=3.10.0",
3333
"pydash>=4.1.0",

src/maggma/stores/file_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ def query( # type: ignore
442442
# TODO - could add more logic for detecting different file types
443443
# and more nuanced exception handling
444444
try:
445-
with zopen(d["path"], "rt", encoding=self.encoding) as f:
445+
with zopen(d["path"], mode="rt", encoding=self.encoding) as f:
446446
data = f.read()
447447
except Exception as e:
448448
data = f"Unable to read: {e}"

src/maggma/stores/mongolike.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ def connect(self, force_reset: bool = False):
684684

685685
# create the .json file if it does not exist
686686
if not self.read_only and not Path(self.paths[0]).exists():
687-
with zopen(self.paths[0], "wt", encoding=self.encoding) as f:
687+
with zopen(self.paths[0], mode="wt", encoding=self.encoding) as f:
688688
data: list[dict] = []
689689
bytesdata = orjson.dumps(data)
690690
f.write(bytesdata.decode("utf-8"))
@@ -711,7 +711,7 @@ def read_json_file(self, path) -> list:
711711
Args:
712712
path: Path to the JSON file to be read
713713
"""
714-
with zopen(path, "rt") as f:
714+
with zopen(path, mode="rt", encoding=self.encoding) as f:
715715
data = f.read()
716716
data = data.decode() if isinstance(data, bytes) else data
717717
objects = bson.json_util.loads(data) if "$oid" in data else orjson.loads(data)
@@ -761,7 +761,7 @@ def update_json_file(self):
761761
"""
762762
Updates the json file when a write-like operation is performed.
763763
"""
764-
with zopen(self.paths[0], "wt", encoding=self.encoding) as f:
764+
with zopen(self.paths[0], mode="wt", encoding=self.encoding) as f:
765765
data = list(self.query())
766766
for d in data:
767767
d.pop("_id")

0 commit comments

Comments
 (0)