-
Notifications
You must be signed in to change notification settings - Fork 11
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
GenericDiffractomer and AbstractCollect #18
Comments
A quick question regarding the naming conventions. Currently it's a mix of camelCase and underscore. To solve the legacy issue and make the APIs compatible for different sites and mockups, both are used, such as self.startAutoCentring = self.start_automatic_centring, which is a nice quick solution. However it's not implemented in all mockups and hwobj and quite some "bugs" were due to this. So it would be nice that at least in the future if we could agree on ONE. Because currently both naming conventions are still showing up in the new codes. What do you say? |
I would wote for the snake style (the one with underscores, for example self.start_automatic_centring). In fact there was before discussion about this. I think we should once define it. Based on PEP https://www.python.org/dev/peps/pep-0008/
|
Thanks! We will try to follow the same rules. From: Ivars Karpics [mailto:[email protected]] I would wote for the snake style (the one with underscores, for example self.start_automatic_centring). In fact there was before discussion about this. I think we should once define it. Based on PEP https://www.python.org/dev/peps/pep-0008/
— |
In the v3 development we are using camelCase, although we are not very consistent. In fact we did a pr called Pep8 with camelCase... and we have code with snake_style... bluurrrr Anyway, if we all agree to follow pep8 it's fine for me, the rules are already defined so it is just a matter of decision... and refactoring, but doable. |
👍 for PEP8 and snake style for Python code. |
I have a question on how to copy greenlet in python. self.currentCentringProcedure = self.current_centring_procedure |
You can move all those aliases including the greenlet in
It's a bit ugly, but this is ugly with aliases too so... ;) |
Great, thanks! From: Matias Guijarro [mailto:[email protected]] You can move all those aliases including the greenlet in getattr: def getattr(self, attr):
else:
It's a bit ugly, but this is ugly with aliases too so... ;) — |
Phases become methods (free to develop new phase, based on a current diffractometer), head types and centring methods as dict. |
Also topic for 2.3 #82 |
Hi all,
The text was updated successfully, but these errors were encountered: