-
-
Notifications
You must be signed in to change notification settings - Fork 6
Detect & remove unused functions #170
Comments
Hi, I would like to contribute if you can assign to me. thank you!😁 |
Thank you so much - that would be super-helpful! |
Hello, thanks for assign 😃 |
Please don't feel under any pressure! You've chosen a great issue to work on: It's definitely important; but it's not blocking anything else, so it's not super-urgent! Thank you so much for diving in and helping out! Hopefully this will help reduce CO2 emissions ASAP :) |
I was looking at https://app.codecov.io/gh/openclimatefix/nowcasting_dataset/blob/main/nowcasting_dataset/utils.py @BodaleDenis hope I didnt steal this task from you |
ah, so, before removing functions please also run |
Detailed Description
It's quite likely that our code implements some functions that are no longer used. We should remove these unused functions :)
Possible Implementation
A manual way to do this would be to do
grep -r --include=*.py "<function name>"
for all the function names we think might no longer be used. But that's a bit tedious!It would be nice to automatically detect dead code, possibly every time CI runs. Here's a Stack Overflow thread with some suggestions for how to do that! But anything automated should only warn us; it shouldn't automatically delete code!
The text was updated successfully, but these errors were encountered: