Skip to content
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

Merged
merged 15 commits into from
Aug 11, 2023
Merged

Adding isort #2375

merged 15 commits into from
Aug 11, 2023

Conversation

gbmarc1
Copy link
Contributor

@gbmarc1 gbmarc1 commented Aug 10, 2023

Adding isort and executing

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
  • All smoke tests: pytest tests/test_smoke.py
  • Relevant individual smoke tests: pytest tests/test_smoke.py::test_fill_in_the_name
  • Backward compatibility tests: bash tests/backward_comaptibility_tests.sh

@gbmarc1 gbmarc1 marked this pull request as ready for review August 10, 2023 18:03
@gbmarc1 gbmarc1 changed the title adding isort and executing Adding isort Aug 10, 2023
@concretevitamin concretevitamin self-requested a review August 11, 2023 04:54
Copy link
Member

@concretevitamin concretevitamin left a 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.

Comment on lines +56 to +58
--sg 'sky/skylet/providers/aws/**' \
--sg 'sky/skylet/providers/gcp/**' \
--sg 'sky/skylet/providers/azure/**' \
Copy link
Member

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.

Comment on lines +59 to +61
'--sg' 'sky/skylet/providers/aws/**'
'--sg' 'sky/skylet/providers/gcp/**'
'--sg' 'sky/skylet/providers/azure/**'
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes will do

Comment on lines +59 to +61
'--sg' 'sky/skylet/providers/aws/**'
'--sg' 'sky/skylet/providers/gcp/**'
'--sg' 'sky/skylet/providers/azure/**'
Copy link
Member

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?

Copy link
Member

@concretevitamin concretevitamin left a 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)!

gbmarc1 and others added 2 commits August 11, 2023 13:59
Co-authored-by: Zongheng Yang <zongheng.y@gmail.com>
@concretevitamin
Copy link
Member

Some conflicts need to be resolved: maybe

git merge master
git checkout master -- sky/skylet/providers/{aws,gcp,azure}

?

@concretevitamin
Copy link
Member

Thanks for this awesome addition @gbmarc1! Merging.

@concretevitamin concretevitamin merged commit 47ecf99 into skypilot-org:master Aug 11, 2023
Copy link

@invisiblepancake invisiblepancake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okie dokie?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants