-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The return type of the `get_scale_factors` method was inconsistent. If `scale_factors` is defined in the input, it would return a `List` node of floats, but otherwise it would return a `list` of `Float` nodes. The method is changed to always return a tuple of normal floats. The caller then has the responsability of casting to a `Float` node if necessary. The input spec of the `EosWorkChain` is also updated to use a serializer for the `scale_factors`, `scale_count` and `scale_increment` inputs. This allows a user to pass a simple base type and it will automatically be converted to the corresponding AiiDA data node type. Note that this feature does not yet work for `List` but this will be added soon to `aiida-core`. Note that the test needs a special condition to transform `list` inputs into `orm.List` nodes. The reason for this special treatment is that for `aiida-core<2.0` there is no automatic serializer yet for `list` types. Once we upgrade the requirement, we can drop this special case.
- Loading branch information
Showing
3 changed files
with
97 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters