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

New dimensions #436

Closed
carbonmetrics opened this issue May 22, 2024 · 2 comments
Closed

New dimensions #436

carbonmetrics opened this issue May 22, 2024 · 2 comments

Comments

@carbonmetrics
Copy link

Following the Syntax overview:

Screenshot 2024-05-22 at 08 35 09

How does this work?

it would be clearer to group the warhol example lines:

dimension Fame
@metric_prefixes
@aliases(wh: short)
unit warhol: Fame
print(2 kilowarhol)
@sharkdp
Copy link
Owner

sharkdp commented May 22, 2024

How does this work?

@metric_prefixes and other decorators can not be used as standalone statements. They need to be followed by a (unit) definition.

You can achieve this by copying & pasting the whole

@metric_prefixes
@aliases(wh: short)
unit warhol: Fame

block (all three lines) into the CLI. Or, if you want to type it, you can press Alt+Enter for a multiline input. Or you could just write everything on a single line, if you prefer:

@metric_prefixes @aliases(wh: short) unit warhol: Fame

@carbonmetrics
Copy link
Author

Thanks! This works, if dimension Fame is typed before copy/pasting the block.

@sharkdp sharkdp closed this as completed May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants