-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
add pylint test to kso-utils. This test is run in the container so that all requirements are installed. Currently, the test is run while only checking on errors (specified in the .pylintrc), to not get too many warnings at once. When we are used to this, we can include more warnings to improve code quality. Note: currently the container to use is hard coded, but if we then update the requirements and do not have a pull to the kso-object-detection yet, we will not have this present here to do the pylint test. So this need to change in some way: *Or change entire structure repos *Or just install packages here instead of opening the container, however, this will have the problem that it cannot see the requirements from yolov5 and yolov5_tracker which are needed.
1454916
to
ed6442d
Compare
@victor-wildlife and @jannesgg , the pylint test is now running on all the kso_utils and there are quite some errors. (And I have solved some of them already) I started looking at the ipywidget error in the yolo_utils, since it says to not have a BBoxWidget and it indeed does not. In tutorial_utils we do 'from jupyter_bbox_widget import BBoxWidget' and that works indeed. But since this is wrong in the code in yolo_utils, I started looking at when that function gets used, and it does not. However, we do try to use a get_annotator from tutorial_utils, which does not have that (And pylint does not give an error about this, which I do not understand why. But maybe it encountered too many already?) At least, this all made me question what we actually use from the annotator class in project.py. Can one of you look at this? And feel free to resolve more of the errors we get. You can see them when you press on the details of the code quality test. But if you work on this branch, please do make your own copy of it and make a draft pull request for that one, so that we do not get any conflicts. Then, if you have solved some of the errors, let me know and I can pull in the changes to this one. |
@Diewertje11 thanks for setting the pylint tests. It has already proven to be a really good idea to clean up our code. I have resolved the errors on the server_utils in pull request #165 and will work on the other ones today. @jannesgg might have a better understanding of the annotator class in project.py |
We need to specify in the .pylintrc that we use the new logging format with {} and this we need to actually apply in all the loggin statements.
pylint highlighted issues with the duplication of the choose_workflows function so I removed the function from the project.py as we didn't use it in the tutorials and we already have one "choose_workflow" function in zooniverse_utils.
22fd6a1
to
861a450
Compare
Great! All the issues pylint shows us are solved. |
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.
Looks good and ready to merge.
No description provided.