Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic yaml math evaluation tag #73

Open
maxfischer2781 opened this issue Feb 28, 2020 · 1 comment
Open

Add basic yaml math evaluation tag #73

maxfischer2781 opened this issue Feb 28, 2020 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@maxfischer2781
Copy link
Member

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.

@maxfischer2781 maxfischer2781 added enhancement New feature or request good first issue Good for newcomers labels Feb 28, 2020
@maxfischer2781
Copy link
Member Author

It could be worth using pyparsing to offer lambda support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant