v0.21.0
Changelog
v0.21.0 (2023-02-20)
This minor release contains new client functionality and improved support for ASE.
New features:
-
Ability to specify async callback functions that are called after every client response.
This can be used for e.g., iteratively saving to file or a database. For example:from optimade.client import OptimadeClient DATABASE = pymongo.MongoClient().database.collection def save_callback(url, results) -> None: for structure in results["data"]: DATABASE.insert_one(structure) client = OptimadeClient(callbacks=[save_callback]) client.get()
-
Ability to create OPTIMADE structure objects from ASE atoms:
from optimade.adapters import Structure from ase import Atoms co = Atoms('CO', positions=[(0, 0, 0), (0, 0, 1.1)]) structure = Structure.from_ase_atoms(co)
-
Added ability to mute the client progress bars with
--silent
/silent=True
and increased default response timeouts to better reflect those required for practical queries.
Implemented enhancements:
- Add customisable callback functions to client #1515
- Add ability to specify callbacks to run after each client request #1519 (ml-evs)
- Increase client timeouts and tweak
response_fields
behaviour #1514 (ml-evs) - Add ASE ingester and generalize other ingestion utilities #1509 (ml-evs)
Closed issues:
- Increase default client timeouts #1513
- Provide basic support for older pymatgen versions in adapters #1490
Merged pull requests:
- Replace several linters and fixers (flake8, isort etc.) with ruff #1526 (ml-evs)
- Add
--silent
option to suppress client output until results #1518 (ml-evs) - Update tests and client to properly test async mode #1517 (ml-evs)
- Refresh docs style and associated tweaks #1516 (ml-evs)
* This Changelog was automatically generated by github_changelog_generator