microsoft / yardl

Tooling for streaming instrument data
https://microsoft.github.io/yardl/
MIT License
30 stars 5 forks source link

Update snake_case regex #59

Closed johnstairs closed 1 year ago

johnstairs commented 1 year ago

Changing the tokenization used to convert PascalCased and camelCased identifiers to snake_case.

In particular, numbers will be separated by an underscore, unless preceded by an uppercase. So kspaceEncodeStep1 becomes kspace_encode_step_1 instead of kspace_encode_step1.

hansenms commented 1 year ago

There are some test failures, that I think will need a bit of adjustment, but in general the regex is right now.

johnstairs commented 1 year ago

@hansenms yeah the test failures are for fields named e.g. int32Field which now become int_32_field which is a bit unfortunate, but I suppose not a common case.