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

Improve documentation on what names are generated by the various functions #493

Open
yav opened this issue Jul 22, 2023 · 0 comments
Open

Comments

@yav
Copy link

yav commented Jul 22, 2023

Many of the naming methods do not describe what they do, so the only way to know is to try look through the source code, or do experimentation trying to guess what they might have done, which is not a great experience.

Here is an example of one that has good documentation:

A FieldNamer that strips the _ off of the field name, lowercases the name, and skips the field if it doesn't start with an '_'.

Here is an example of one that has bad documentation:

A FieldNamer for abbreviatedFields.

This second style would make sense, if abbreviatedFields had some documentation but that's not the case. In any case,
documenting that the namer is used by some other function doesn't seem nearly as useful as saying what it does.

Similarly, the functions that generate prisms, makePrismLabels, and makePrisms should say how the names/labels of the prisms are derived from the name of the constructor. It would also be handy of these were configurable, in a style similar
to what happens with fields.

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

1 participant