CadQuery / cadquery-plugins

A collection of community contributed plugins that extend the functionality of CadQuery
Apache License 2.0
38 stars 15 forks source link

Use camelCase for plugins functions name #7

Closed Jojain closed 3 years ago

Jojain commented 3 years ago

Looking at what @jmwright wrote for his sample plugin I noticed he didn't used camelCase for his plugin name. Since all cadquery methods are using camelCase I would suggest this being also a standard for plugins functions names so it's consistent with the rest of cadquery, what are your thoughts about it ?

jmwright commented 3 years ago

There have been discussions about CadQuery's lack of PEP8 compatibility in function names before. Our stance is that we are not planning to change the function names in the CadQuery repo because it would break too many existing scripts. However, my thought was that this plugins repo could be PEP8 compliant (or at least closer to it) since it doesn't have the historical baggage.

This is certainly a discussion we can have though. Consistency with the existing CadQuery codebase is nice, but so is consistency with the Python community's conventions. We need to decide which is more important to us.

Jojain commented 3 years ago

My opinion is that consistency prevails on PEP8. So I would rather have everything camelCase rather than PEP8 accordance. But either way it would be nice to decide this quickly so it could be added in the contrib specifications

jmwright commented 3 years ago

@adam-urbanczyk @marcus7070 @dcowden Please chime in of you have an opinion.

adam-urbanczyk commented 3 years ago

I would not enforce it.

marcus7070 commented 3 years ago

I don't think we should enforce anything here.

Pros of enforcing camel case:

Cons:

jmwright commented 3 years ago

A comment has been added in #8 explaining the history of camelCase, but not forcing users to go that route if they want their code to be compliant with PEP8. Third bullet point here.