McDermott-Group / servers

Public repo that stores LabRAD servers and other non-measurement related code
0 stars 2 forks source link

Lots of junk and clutter in servers\GUI\mView #82

Closed patzinak closed 7 years ago

patzinak commented 8 years ago

There should not be that many code lines that are simply commented out without any comments why there are still there. Please delete the lines that are not related to any open bugs or enhancements. MGrapher suffers the most but some other files as well.

There should not be more than two empty lines and there should be always one empty line between the methods.

Does serialDevice.py server any purpose? If not, please delete it.

patzinak commented 7 years ago

@nmGit I think we should go over some of your code again. You have to keep developing some taste to good practices :)

patzinak commented 7 years ago

@nmGit Please let me know when you have a break from working on the GUI project. I'd like to finish cleaning up your files at some point but don't want to create an unnecessary merge conflicts. The Leiden GUI works pretty well now (ignoring the known issues) and it became a really-really useful tool for assessing the state of the fridge remotely/in real time. It already looks great, however, you should focus on logging/plotting and some cosmetic changes. What I want to ensure here is that your code is maintainable in the long run.

nmGit commented 7 years ago

Ok, ya that makes sense. I will spend some time over the next few days going through everything and then when i get back we can sit down and go through it some more

patzinak commented 7 years ago

Waiting for ~10-15 sec does not help...

patzinak commented 7 years ago

@nmGit You can use autopep8 and pep8 to easily clean up your code. These are very easy to use modules. Install these modules with pip, run autopep8 --in-place --aggressive --aggresive your_file_name.py to clean up your code. Verify that you don't have any easily-resolvable issues by running pep8 your_file_name.py If you run this on all your files, you can close the issue.

nmGit commented 7 years ago

I autopep8'd all files. I did not do aggressive because it can mess with some subtle but important details such as 'a == b' vs 'a is b' which are similar but not the same.