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

Fix import formatting using isort #23334

Closed
alimcmaster1 opened this issue Oct 25, 2018 · 34 comments
Closed

Fix import formatting using isort #23334

alimcmaster1 opened this issue Oct 25, 2018 · 34 comments
Labels
Clean Code Style Code style, linting, code_checks good first issue

Comments

@alimcmaster1
Copy link
Member

alimcmaster1 commented Oct 25, 2018

Following on from #23048. We now need to run isort on all *.py files in the codebase that we are ignoring in CI see here. Information on Isort here

Useful commands:

To sort imports in files in pandas directory ( ignoring those explicitly mentioned in setup.cfg)
isort --recursive pandas

To check imports are formatted correctly:
isort --recursive --check-only pandas

Find a directory you wish to fix from the list below( larger directories by # of files)
And comment on here that you are working on fixing. To avoid duplicated efforts.

Directories we need to cover:

PRs must contain no more than 20 files.

For new contributors please first take a look at our Contributing Guide

Pandas-Dev: Could we please add the following labels "Style", "Good first Issue", Contributions Welcome" and any more you feel appropriate.

Thanks,
Alistair

@alimcmaster1 alimcmaster1 mentioned this issue Oct 25, 2018
2 tasks
@alimcmaster1 alimcmaster1 changed the title Fix import formatting using isort. Fix import formatting using isort Oct 25, 2018
@alexander-ponomaroff
Copy link
Contributor

I would like to help out with this issue. Can I please work on the following directories?

  • pandas/core/dtypes/
  • pandas/core/groupby/
  • pandas/core/reshape/
  • pandas/core/computation/

@alimcmaster1
Copy link
Member Author

Hey @alexander-ponomaroff thanks for looking to contribute! I've put you down for dtypes and groupby first so we can concentrate on getting those merged first. Then we can look into the others. Let us know on here if you need any help.

@TomAugspurger TomAugspurger added this to the Contributions Welcome milestone Oct 25, 2018
@TomAugspurger TomAugspurger added Code Style Code style, linting, code_checks good first issue Clean labels Oct 25, 2018
@alexander-ponomaroff
Copy link
Contributor

Thank you very much @alimcmaster1 . I will start working on this as soon as possible.

@thoo
Copy link
Contributor

thoo commented Oct 25, 2018

@alimcmaster1 I will be working on:

pandas/tests/indexes/
pandas/tests/series/
pandas/tests/arrays/
pandas/tests/util/

@alimcmaster1
Copy link
Member Author

thanks both @thoo and @pvarshney1729

@thoo
Copy link
Contributor

thoo commented Oct 25, 2018

@alimcmaster1 Do you want several PR from the same branch ?? I have more than 20 files.

@alimcmaster1
Copy link
Member Author

I would recommend using separate branches so the PRs are independent of each other.

@thoo
Copy link
Contributor

thoo commented Oct 25, 2018

@alimcmaster1 That is what I think. Wait for more PR :) :)

@alexander-ponomaroff
Copy link
Contributor

@alimcmaster1 I've looked into dtypes and groupby, now waiting for CI checks to finish for those two pull requests. Could I now also look into the following directories that I previously requested?

  • pandas/core/reshape/
  • pandas/core/computation/

@mwoss
Copy link
Contributor

mwoss commented Oct 25, 2018

Hi. I would like to help with this issue. May I work on those dirs?

  • pandas/tests/extension/
  • pandas/tests/io/parser/
  • pandas/tests/io/formats/
  • pandas/tests/groupby/

@amphy
Copy link
Contributor

amphy commented Oct 26, 2018

I would like to help out with this issue. I will be working on

  • pandas/tests/indexing

tm9k1 pushed a commit to tm9k1/pandas that referenced this issue Nov 19, 2018
tm9k1 pushed a commit to tm9k1/pandas that referenced this issue Nov 19, 2018
@alimcmaster1
Copy link
Member Author

Still a few files to be worked on here if anyone is interested. Full list in setup.cfg, post on here if anyone is interested.

@thoo
Copy link
Contributor

thoo commented Jan 1, 2019

@alimcmaster1
Working on

  • pandas/tests/frame/
  • pandas/tests/indexes/
  • pandas/tests/io

@mwoss
Copy link
Contributor

mwoss commented Jan 2, 2019

@alimcmaster1
Hi. I will work on:

  • pandas/tests/dtypes/
  • pandas/tests/arithmetic/
  • pandas/tests/plotting/

@simonjayhawkins
Copy link
Member

@alimcmaster1 i think there could be an issue isorting asv_bench/benchmarks/, xref #22947

@alimcmaster1
Copy link
Member Author

Thanks @mwoss and @thoo.

I will complete all the leftover files that havn't been mentioned above.

@simonjayhawkins we should just be able to force that import to the end using isort.

@gasparia405
Copy link
Contributor

Are any of the following directories still available?

  • pandas/tests/indexes/multi
  • pandas/tests/indexes/interval
  • pandas/tests/indexes/timedeltas
  • pandas/tests/io/formats/
  • pandas/tests/io/msgpack/

If so, I would love to take some of them!

@alimcmaster1
Copy link
Member Author

alimcmaster1 commented Jan 26, 2019 via email

@gasparia405
Copy link
Contributor

@alimcmaster1 Sorry, I missed that in the thread. It looks like the only ones left are the asv_bench/benchmark files, I'll take a crack at some of those. I saw the comment about keeping the setup imports at the bottom of the file, so I'll make sure to keep an eye out for that.

Thank you for responding so quickly before!

@jreback
Copy link
Contributor

jreback commented Feb 28, 2019

@simonjayhawkins actually let's create a new one with the remaining items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Code Style Code style, linting, code_checks good first issue
Projects
None yet
Development

No branches or pull requests