Open alcides opened 1 month ago
I particularly like this idea. It would probably not be that useful for the regressor.py
files since they are quite small and template based, but for any code contribution we may have in the future (i.e., experiments, analysis, plotting scripts).
And since we are going to modify many of the scripts, I would go for it.
What do you think @gAldeia @lacava ?
Hi @alcides,
The idea sounds interesting! To be honest, I've been wanting to use ruff
for a while but haven't had the chance to do so.
@folivetti, even though the changes to regressor.py
are small, it could help ensure everything is working as expected.
That said, creating a new CI for ruff
might not run smoothly. I think it is likely that several stuff will need fixing to pass the tests, and I'm not sure how much time you have to deal with it.
fair point, it would possibly make things stop passing the tests right now and it wouldn't be wise to do it at this moment.
But I guess @alcides could do it and open a PR that we can merge after the benchmark is done (or maybe do it at a later moment if he's too busy right now).
The main problem with the proposed change is that it will result in a huge commit that touches everything. This is aweful for people who are working on their branches/forks.
My proposal is to do this (probably after the competition), when no-one is actively working on branches. It is not worthwhile to do it before hand.
I agree!! We'll let you know when all the work in srbench seems to be finished. I'm looking forward to this (so I can "steal" to some other projects :-P ). Thanks @alcides !
Different contributors have different code styles. The recommended approach to handle this is to have a pre-commit/CI step that validates that the source code follows some style.
For Python, I have been using ruff, that automatically fixes many issues, and detects code smells.
If you think it's useful, I can prepare a PR. But I don't think I should spend the time if you do not think it's worthwhile.