Skip to content

Commit 362bf54

Browse files
authored
Fix CI failure: bump netcdf4, replace Namespace with standard dict for io.abinit.pseudos (materialsproject#4223)
1 parent b28b4c2 commit 362bf54

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pyproject.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ Issues = "https://github.com/materialsproject/pymatgen/issues"
8787
Pypi = "https://pypi.org/project/pymatgen"
8888

8989
[project.optional-dependencies]
90-
# PR4128: netcdf4 1.7.[0/1] yanked, 1.7.1.post[1/2]/1.7.2 cause CI error
91-
abinit = ["netcdf4>=1.6.5,!=1.7.1.post1,!=1.7.1.post2,!=1.7.2"]
90+
abinit = ["netcdf4>=1.7.2"]
9291
ase = ["ase>=3.23.0"]
9392
ci = ["pytest-cov>=4", "pytest-split>=0.8", "pytest>=8"]
9493
docs = ["invoke", "sphinx", "sphinx_markdown_builder", "sphinx_rtd_theme"]

src/pymatgen/io/abinit/pseudos.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from xml.etree import ElementTree as ET
2020

2121
import numpy as np
22-
from monty.collections import AttrDict, Namespace
22+
from monty.collections import AttrDict
2323
from monty.functools import lazy_property
2424
from monty.itertools import iterator_from_slice
2525
from monty.json import MontyDecoder, MSONable
@@ -601,7 +601,9 @@ def _dict_from_lines(lines, key_nums, sep=None) -> dict:
601601
if len(lines) != len(key_nums):
602602
raise ValueError(f"{lines = }\n{key_nums = }")
603603

604-
kwargs = Namespace()
604+
# TODO: PR 4223: kwargs was using `monty.collections.Namespace`,
605+
# revert to original implementation if needed
606+
kwargs: dict = {}
605607

606608
for idx, nk in enumerate(key_nums):
607609
if nk == 0:

0 commit comments

Comments
 (0)