-
Notifications
You must be signed in to change notification settings - Fork 27
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 config option: rule_ordering #52
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not keen on having two options that are synonyms of one-another, to be honest, but I understand the desire to rename this flag since as_is
is not intuitive or self-documenting.
If we all agree rule_ordering=...
is preferable, I would suggest converting all the existing mappings from as_is
to rule_ordering
and issuing a warning when the system sees as_is
indicating it's deprecated though still supported. Or go one step further: convert all the rules and stop accepting as_is
altogether, outputting instead an message telling the user how to convert correctly to the new syntax.
Furthermore, the documentation for as_is
should be updated to say it means the same as the other option, and please use that one instead. And, the doc for rule_ordering
should say "This was formerly done by setting as_is=False
" or "as_is=True
", respectively.
[skip ci]: this will fails, since the tests expect a `ValueError` Co-authored-by: Eric Joanis <Eric.Joanis@cnrc-nrc.gc.ca>
Nice testing of the logging messages, I needed just that to test my changes on |
It went from 3 files modified to 42 files modified with all of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, this is much better, and I am happy to have this self-documenting rule_ordering
name for the option. Good unit testing - the coverage went up a notch, which is always good to see! As far as I'm concerned, you can merge this in, as long as Aidan gives his go-ahead too.
Fixes: #51 |
This adds a config option called
rule_ordering
, which is a more self-descriptive alias ofas_is
.Why?
Say I am explaining how to write a mapping.
I suggest changing the explanation this:
Addresses #51