-
Notifications
You must be signed in to change notification settings - Fork 589
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
Adding isort #2375
Adding isort #2375
Conversation
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.
Thanks a lot for adding this, @gbmarc1! Look great. Left some nits.
--sg 'sky/skylet/providers/aws/**' \ | ||
--sg 'sky/skylet/providers/gcp/**' \ | ||
--sg 'sky/skylet/providers/azure/**' \ |
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.
+1 that we want to skip formatting sky/skylet/providers/{aws,gcp,azure}. Reason is those files are forked from upstream Ray, and each time when we do a Ray dependency upgrade, we do a diff against the upstream files to understand whether our genuine changes are affected.
However, it seems like this PR has changed files under those dirs?
.../ibm should be okay to be isort-ed since it's not forked from Ray.
'--sg' 'sky/skylet/providers/aws/**' | ||
'--sg' 'sky/skylet/providers/gcp/**' | ||
'--sg' 'sky/skylet/providers/azure/**' |
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.
(See other comment) Some files under these dirs seem formatted.
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.
I added isort with the black
profile (L120) since they were already formatted by black (L105-106).
They are formatted but it seems that mostly things that were moved were sky
imports.
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.
Discussed with @Michaelvll. The imports being formatted may still hinder humans (us :)) looking at diffs when we're upgrading Ray. Can we skip formatting sky/skylet/providers/{aws,gcp,azure} even with the black profile, both in format.sh
and in .github/workflows/format.yml
?
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.
yes will do
Co-authored-by: Zongheng Yang <zongheng.y@gmail.com>
'--sg' 'sky/skylet/providers/aws/**' | ||
'--sg' 'sky/skylet/providers/gcp/**' | ||
'--sg' 'sky/skylet/providers/azure/**' |
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.
Discussed with @Michaelvll. The imports being formatted may still hinder humans (us :)) looking at diffs when we're upgrading Ray. Can we skip formatting sky/skylet/providers/{aws,gcp,azure} even with the black profile, both in format.sh
and in .github/workflows/format.yml
?
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.
Smoke tests all passed:
-
pytest tests/test_smoke.py --aws
We can merge this after consensus on that nit (excluding some providers)!
Co-authored-by: Zongheng Yang <zongheng.y@gmail.com>
Some conflicts need to be resolved: maybe
? |
Thanks for this awesome addition @gbmarc1! Merging. |
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.
okie dokie?
Adding isort and executing
Tested (run the relevant ones):
bash format.sh
pytest tests/test_smoke.py
pytest tests/test_smoke.py::test_fill_in_the_name
bash tests/backward_comaptibility_tests.sh