MatterMiners/cobald

Add basic yaml math evaluation tag

Open

#73 opened on Feb 28, 2020

 (1 comment) (0 reactions) (0 assignees)Python (13 forks)auto 404
enhancementgood first issue

Repository metrics

Stars
 (11 stars)
PR merge metrics
 (PR metrics pending)

Description

The YAML format does not allow for math or other convenience syntax. cobald could provide a YAML tag plugin for basic evaluation and unit replacement.

Before:

maxBytes: 10485760

After:

maxBytes: !eval 10 MiB

maxBytes: !eval 10 * 1024 * 1024

Possible to use ast.literal_eval for the evaluation part.

Contributor guide