-
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
Adopting a code formatting standard #511
Conversation
Ah OK, so I think the |
I think I solved the issue with |
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 made small adjustment sugestions in docs/sourc[docs/source/CONTRIBUTE.md
, else this looks good vis-à-vis formatting. Thanks. Please see my other comment re. unused imports.
Regarding #507, I found 3 left-over ones: $ ruff check --select F401 $(find mala -name "*.py") | grep -v __init__
mala/descriptors/atomic_density.py:136:32: F401 [*] `lammps.lammps` imported but unused
mala/descriptors/bispectrum.py:141:32: F401 [*] `lammps.lammps` imported but unused
mala/descriptors/minterpy_descriptors.py:95:32: F401 [*] `lammps.lammps` imported but unused All have the form # For version compatibility; older lammps versions (the serial version
# we still use on some machines) have these constants as part of the
# general LAMMPS import.
try:
from lammps import constants as lammps_constants
except ImportError:
from lammps import lammps but the fallback module try:
from lammps import constants as lammps_constants
except ImportError:
from lammps import lammps as lammps_constants |
Co-authored-by: Steve Schmerler <[email protected]>
Co-authored-by: Steve Schmerler <[email protected]>
You're right, there are three leftovers. I consciously left them in, because I am not entirely sure myself anymore how the old version handled |
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.
Thanks, looks all good now.
This PR lays a foundation for having a proper code formatting standard within MALA. It employs
black
It
black
pyproject.toml
file; it currently does not replace thesetup.py
, but complements it; I would postpone fully replacing it until the upcoming hackathonblack
It does not implement automatic code formatting checks. As mentioned in #501 we can setup a CI for this, but I would also postpone this until the upcoming hackathon, when we wanted to tackle the CI anyway.
Closes #501 (except for the CI, which we will add with the coming CI improvements) and #507.