Skip to content

Commit

Permalink
Fix CI failure: bump netcdf4, replace Namespace with standard `di…
Browse files Browse the repository at this point in the history
…ct` for `io.abinit.pseudos` (materialsproject#4223)
  • Loading branch information
DanielYang59 authored Dec 11, 2024
1 parent b28b4c2 commit 362bf54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ Issues = "https://github.com/materialsproject/pymatgen/issues"
Pypi = "https://pypi.org/project/pymatgen"

[project.optional-dependencies]
# PR4128: netcdf4 1.7.[0/1] yanked, 1.7.1.post[1/2]/1.7.2 cause CI error
abinit = ["netcdf4>=1.6.5,!=1.7.1.post1,!=1.7.1.post2,!=1.7.2"]
abinit = ["netcdf4>=1.7.2"]
ase = ["ase>=3.23.0"]
ci = ["pytest-cov>=4", "pytest-split>=0.8", "pytest>=8"]
docs = ["invoke", "sphinx", "sphinx_markdown_builder", "sphinx_rtd_theme"]
Expand Down
6 changes: 4 additions & 2 deletions src/pymatgen/io/abinit/pseudos.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from xml.etree import ElementTree as ET

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

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

for idx, nk in enumerate(key_nums):
if nk == 0:
Expand Down

0 comments on commit 362bf54

Please sign in to comment.