MolSSI / QCFractal

A distributed compute and database platform for quantum chemistry.
https://molssi.github.io/QCFractal/
BSD 3-Clause "New" or "Revised" License
148 stars 48 forks source link

Extras field of records should not be None/NULL #854

Closed bennybp closed 4 weeks ago

bennybp commented 1 month ago

Description

The extras field of base_record (therefore all records) should probably not be null. It's more consistent that it's a dict, even if it's empty.

The original idea is that extras is only populated on record completion. But

This inconsistency has caused problems for some users as well: https://github.com/openforcefield/openff-bespokefit/issues/369 https://github.com/openforcefield/openff-bespokefit/pull/370

Relatively easy fix - make the db column not null, and the pydantic field not optional. A small validator is added to halp newer clients use older servers.

This is backwards compatible - new clients can use old servers, and old clients can still use new servers.

Status

j-wags commented 4 weeks ago

Awesome, thanks Ben!