WIP: Text format parser for Python#54
Conversation
|
I'll have a look ASAP. |
There was a problem hiding this comment.
Has nothing to do with the change, but: Why typ and not type?
There was a problem hiding this comment.
NM, keywords are evil... :-(
|
Before checking further: Let's confirm what the intention WRT whitespace is. The text format is supposed to have any amount of non-new-line whitespace between tokens. |
|
OK, looks sane to me. Just sprinkle a few crazy whitespace characters over the test cases to see if it works. |
|
The |
|
Ah, didn't see that... with the pre-squashed commits, it's difficult to see what has changed... 👍 But definitely leave the whitespace flexibility in place. That's what people expect when they see this kind of syntax. Remember that the text format is also meant to be easy for humans to assemble. |
Split out test files. Add missing histogram exposition test. Add unittests for metric families.
Fix exposition of 'NaN' in text format (Python uses 'nan').
WIP: Text format parser for Python
@beorn7 Would you mind taking a peek at this to see if I've missed anything major? Main code is in parser.py, the rest is surrounding changes for this to make sense and have the right data structures.
The motivation is that Zalando's Zmon has a partial implementation of the text parser, so I'd like to offer them an official option.