-
Notifications
You must be signed in to change notification settings - Fork 19
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
Naming conventions or style in pyamrex #144
Comments
The python is probably following pep-8 |
Good question! Yes, somewhat inconsistently, I started to use more Pythonic names for methods where appropriate (or even standardized) in Python. As Mike mentioned, part of PEP-8 is:
For formatting, we use black. black is a somewhat superset (with some reasonable breaks) of PEP-8, but the tool does not control that we use proper naming schemes (just formatting). |
Going forward, I want the Python bindings to look Pythonic (and not like a wrapper on C++). We have tab completion and a full doc now, thus people will still find the methods they know from AMReX C++, as long as we keep the same naming schemes, but in the proper Python style. |
I started to merge some breakage for the
|
We were adding some examples in pyamrex and observed that we use small-case with underscore for functions
For example, in amrex, we have a function,
setVal()
, while in pyamrex we haveset_val()
Additionally, the python bindings in warpx also dont have consistent conventions.
Is there a preferable style, so going forward when we make changes, we ensure to stay aligned with preferred style.
The text was updated successfully, but these errors were encountered: