You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 have set_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:
Use the function naming rules: lowercase with words separated by underscores as necessary to improve readability.
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++).
Thus, renaming things to follow Python style guides as PRs is very welcome and breakage is encouraged to fulfill it.
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.
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: