From 96ffcffbca06f06bc0c65a4eda12afc9cc757374 Mon Sep 17 00:00:00 2001 From: Matteo Giantomassi Date: Sat, 11 Jan 2025 23:58:38 +0100 Subject: [PATCH] Try to remove pymatgen/monty pins --- abipy/ml/extxyz_generator.py | 2 +- abipy/ml/tools.py | 8 ++++---- pyproject.toml | 5 +++-- requirements.txt | 5 +++-- setup.py | 5 +++-- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/abipy/ml/extxyz_generator.py b/abipy/ml/extxyz_generator.py index ce7a37fdb..36ece9032 100644 --- a/abipy/ml/extxyz_generator.py +++ b/abipy/ml/extxyz_generator.py @@ -106,7 +106,7 @@ def to_string(self, verbose: int = 0) -> str: def __str__(self) -> str: return self.to_string() - def write(self, xyz_filepath: PathLike, traj_range=None, overwrite: bool = False): + def write(self, xyz_filepath: PathLike, traj_range=None, overwrite: bool = False) -> None: """ Write data to xyz_filepath. diff --git a/abipy/ml/tools.py b/abipy/ml/tools.py index 5fa5bcb4b..ace9946ef 100644 --- a/abipy/ml/tools.py +++ b/abipy/ml/tools.py @@ -1,5 +1,5 @@ """ -Low-level tools used in abipy.ml +Low-level tools used in abipy.ml module """ from __future__ import annotations @@ -31,7 +31,7 @@ def get_energy_step(step: dict) -> float: def get_structures_labels_from_file(filepath: str) -> tuple[list[Structure], dict]: """ - Read energies, forces, stresses and magmoms from an external file. + Read energies, forces, stresses and magmoms from an external file. Return list of structures and dict with results. """ basename = os.path.basename(str(filepath)) @@ -80,7 +80,7 @@ def get_structures_labels_from_file(filepath: str) -> tuple[list[Structure], dic def get_structures_labels_from_files(filepaths) -> tuple[list[Structure], dict]: """ - Read energies, forces, stresses and magmoms from an external file. + Read energies, forces, stresses and magmoms from an external file. Return list of structures and dict with results. """ for i, path in enumerate(list_strings(filepaths)): @@ -96,4 +96,4 @@ def get_structures_labels_from_files(filepaths) -> tuple[list[Structure], dict]: #for s in structures: print(s) #for k, v in labels.items(): print(k, v) - return structures, labels \ No newline at end of file + return structures, labels diff --git a/pyproject.toml b/pyproject.toml index 8290ce142..7fc2761d7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,9 +60,10 @@ dependencies = [ "phonopy<=2.31.2", "plotly", "pydispatcher>=2.0.5", - "pymatgen", #"pymatgen==v2024.10.29", - "monty==v2024.10.21", + #"monty==v2024.10.21", + "pymatgen", + "monty", "pyyaml>=3.11", "scipy", "seaborn", diff --git a/requirements.txt b/requirements.txt index 30913579c..255428848 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,9 +11,10 @@ pandas numpy<2.0.0 sympy spglib -pymatgen #pymatgen==v2024.10.29 -monty==v2024.10.21 +#monty==v2024.10.21 +pymatgen +monty netCDF4 matplotlib seaborn diff --git a/setup.py b/setup.py index fb4fdcaab..c937bfac8 100755 --- a/setup.py +++ b/setup.py @@ -156,9 +156,10 @@ def cleanup(): "numpy<2.0.0", "scipy", "spglib", - "pymatgen", #"pymatgen==v2024.10.29", - "monty==v2024.10.21", + #"monty==v2024.10.21", + "pymatgen", + "monty", "netCDF4", "matplotlib", "seaborn",