Skip to content

Add isort to pre-commit hooks, package resorting #4647

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

Merged
merged 10 commits into from
Mar 31, 2021

Conversation

charlesbluca
Copy link
Member

Second pass at #4600, as there were a lot of merge conflicts piling up there.

  • Tests added / passed
  • Passes black distributed / flake8 distributed

@charlesbluca
Copy link
Member Author

charlesbluca commented Mar 29, 2021

Looks like failures due to deprecations in pytest - does this have something to do with #4646?

@jrbourbeau
Copy link
Member

Yep, I was trying to figure out what's causing the test suite to start failing (definitely unrelated to the changes here). It looks like there was an issue in a new release of the setup-miniconda GitHub action (xref conda-incubator/setup-miniconda#160), though this should be fixed soon for us with #4585

@charlesbluca
Copy link
Member Author

Good to know! In that case, I'll revisit the tests once that is merged.

@jrbourbeau
Copy link
Member

#4585 is in, so you should be able to resolve the test failures here by merging main into your PR branch

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

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

Thanks @charlesbluca!

I have a similar question to this one over in dask/dask about making dask a special third party library so it's imports are just above the distributed imports instead of being grouped with things like numpy, tlz, etc.

cc @jsignell

@@ -1,4 +1,9 @@
repos:
- repo: https://github.com/pycqa/isort
rev: 5.7.0
Copy link
Member

Choose a reason for hiding this comment

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

It looks like release came out a few days ago

Suggested change
rev: 5.7.0
rev: 5.8.0

@@ -1,42 +1,42 @@
from . import config
from . import config # isort:skip
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a small comment here about why we need to skip isort?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure!

@charlesbluca
Copy link
Member Author

charlesbluca commented Mar 29, 2021

Thanks for the review! Distinguishing Dask from other imports makes sense to me, happy to add that in as long as it's consistent with dask/dask#7370.

@jrbourbeau
Copy link
Member

We just added a new module which is throwing some isort errors. Would you mind running isort on the new module and pushing up the changes?

@charlesbluca
Copy link
Member Author

Sure! Also want to note that a test that failed in the original PR #4600, test_as_completed_with_results, seems to have worked in these subsequent CI runs, so maybe it should be marked as flaky.

@charlesbluca
Copy link
Member Author

Most of the test failures have something to do with human readable byte formatting not being consistent:

 >           assert "GB" in text and "4" in text
E           assert ('GB' in "LocalCluster(dd8123bb, 'inproc://10.1.0.4/2069/705', workers=2, threads=4, memory=3.73 GiB)")

Not sure if this has something to do with the order of imports, as I'm unable to replicate these failures locally.

@jsignell
Copy link
Member

jsignell commented Mar 30, 2021

Most of the test failures have something to do with human readable byte formatting not being consistent:

This has to do with the work that @crusaderky has been doing in dask/dask#7484 it'll be fixed in #4649

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

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

Thanks @charlesbluca!

@jrbourbeau jrbourbeau merged commit 20a55e9 into dask:main Mar 31, 2021
@charlesbluca
Copy link
Member Author

Thanks for the help @jrbourbeau and @jsignell!

@charlesbluca charlesbluca deleted the add-isort branch July 20, 2022 03:00
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