Releases: Materials-Consortia/optimade-python-tools
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
v0.20.3
Changelog
v0.20.3 (2023-01-09)
This release primarily adds compatibility for the newest FastAPI releases (>=0.87
) by updating our test client to work with both httpx
and requests
.
Merged pull requests:
* This Changelog was automatically generated by github_changelog_generator
v0.20.2
Changelog
v0.20.2 (2022-12-21)
This release adds the ability to include or exclude particular providers from queries with the OptimadeClient
class and optimade-get
CLI, via the provider's registered prefix (#1412)
For example:
# Only query databases served by the example providers
optimade-get --include-providers exmpl,optimade
# Exclude example providers from global list
optimade-get --exclude-providers exmpl,optimade
You can also now exclude particular databases by their URLs:
# Exclude specific example databases
optimade-get --exclude-databases https://example.org/optimade,https://optimade.org/example
The release also includes some server enhancements and fixes:
- Caching of
/info/
and/info/<entry>
endpoint responses (#1433) - A bugfix for the entry mapper classes, which were sharing cache resources globally leading to poor utilization (#1435)
Implemented enhancements:
Fixed bugs:
Closed issues:
- Migrate away from Heroku for demo server #1307
- Add ability to use provider prefixes/custom index base URLs with client #1295
Merged pull requests:
- Add pip caches to CI and tidy old flake8 job #1442 (ml-evs)
- Allow empty strings through chemical formula regexp #1428 (ml-evs)
- Explicitly use Python 3.8 environment for pre-commit in CI #1421 (ml-evs)
- Add ability to (in/ex)clude providers by ID within client #1412 (ml-evs)
* This Changelog was automatically generated by github_changelog_generator
v0.20.1
Changelog
v0.20.1 (2022-12-03)
Fixed bugs:
- Cannot retrieve child database links #1410
- Fix typo that breaks
get_child_databases
retriever #1411 (ml-evs)
* This Changelog was automatically generated by github_changelog_generator
v0.20.0
Changelog
v0.20.0 (2022-11-29)
This release continues the modularisation of the package by moving the server exceptions and warnings out into top-level modules, and removing the core dependency on FastAPI (now a server dependency only). This should allow for easier use of the optimade.models
and optimade.client
modules within other packages.
Aside from that, the package now supports Python 3.11, and our example server is now deployed at Fly.io rather than Heroku.
Implemented enhancements:
- Add support for Python 3.11 #1361
- Improve test diagnostics and fix deprecated Elasticsearch calls #1373 (ml-evs)
- Support Python 3.11 #1362 (ml-evs)
Fixed bugs:
- Elasticsearch pytest oneliner in the docs is no longer working #1377
- Remote swagger validator has changed output format #1370
Closed issues:
- Fully isolate server code from other submodules #1403
- Replace https://gitlab.com/pycqa/flake8 with https://github.com/pycqa/flake8 #1388
- OpenAPI schema should not enforce recommended constraint on
page_number
#1372 - Pydantic models docs are broken on the mkdocs site with new renderer #1353
- Migrate away from Heroku for demo server #1307
- FastAPI should not be a core dependency #1198
Merged pull requests:
- Move exceptions and warnings out of server code and separate deps #1405 (ml-evs)
- Complete migration from Heroku to Fly #1400 (ml-evs)
- Add GH actions for deploying example server to Fly #1396 (ml-evs)
- Support new remote swagger.io validator format #1371 (ml-evs)
- Do not enforce minimum value of
page_number
at model level #1369 (ml-evs) - Enable
mypy
andisort
in pre-commit & CI #1346 (ml-evs) - Remove randomness from structure utils tests #1338 (ml-evs)
- Demote FastAPI to a server dep only #1199 (ml-evs)
* This Changelog was automatically generated by github_changelog_generator
v0.19.4
Changelog
v0.19.4 (2022-09-19)
This is a hotfix release for #1335, a bug regarding chunked responses triggered when using the latest FastAPI version.
Fixed bugs:
- UnboundLocalError -
chunk_size
is not always set in middleware method #1335 - Ensure
chunk_size
is properly set when chunking responses #1336 (ml-evs)
* This Changelog was automatically generated by github_changelog_generator
v0.19.3
Changelog
v0.19.3 (2022-09-06)
Implemented enhancements:
Merged pull requests:
* This Changelog was automatically generated by github_changelog_generator
v0.19.2
Changelog
v0.19.2 (2022-09-05)
Fixed bugs:
- Wrong fractional particle positions in test #1232
Closed issues:
- If nperiodic_dimensions=2 the structure adapter can only properly convert it to ase #1212
Merged pull requests:
- Bugfix validator so next links are followed the correct number of times #1318 (JPBergsma)
- Use proper type hint for griffe 0.22 compatibility #1313 (JPBergsma)
- Remove incorrect default value for
page_number
query parameter #1303 (ml-evs) - Adapters now also return lattice information for structures that are periodic in 1 or 2 dimensions. #1233 (JPBergsma)
* This Changelog was automatically generated by github_changelog_generator
v0.19.1
v0.19.0
Changelog
v0.19.0 (2022-07-18)
This minor release includes several usability improvements for the server and client arising from the OPTIMADE workshop.
This release also drops support for Python 3.7, which should allow us to streamline our dependencies going forward.
Implemented enhancements:
- Support for Elasticsearch v7 #1216 (markus1978)
Fixed bugs:
- Landing page not loading #1256
- Config values are not cached by
@classproperty
#1219 - Prevent internal validator errors when entries are missing ID/type #1273 (ml-evs)
- Improve error handling for client when updating provider list #1222 (ml-evs)
Closed issues:
- Internal validator failures #1272
- Use versioned Dockerfiles for CI services to allow dependabot to update them #1241
- Wrong links to available endpoints #1214
- The validator should check for
meta->schema
#1209 - Add configurable
meta->schemas
field to reference server #1208
Merged pull requests:
- Bump providers from
fb05359
toa92e5bc
#1267 (dependabot[bot]) - Add schema parameter when calling meta_values in landing.py #1257 (JPBergsma)
- Update
lark
dependency to new name #1231 (ml-evs) - Use Python 3.10 instead of 3.7 in installation instructions #1229 (JPBergsma)
- Optimisation: do not re-access mapper properties inside the request loop #1223 (ml-evs)
- Add meta->schema validation warning #1211 (ml-evs)
- Add configurable
schema_url
andindex_schema_url
options #1210 (ml-evs) - Drop support for Python 3.7 #1179 (ml-evs)
* This Changelog was automatically generated by github_changelog_generator