You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Brian Wickman <wi...@apache.org> on 2014/05/07 01:09:58 UTC

Review Request 21136: Add python import order wrapper/commit hook

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21136/
-----------------------------------------------------------

Review request for Aurora and Kevin Sweeney.


Repository: aurora


Description
-------

Adds build-support/isort wrapper for isort.
Adds build-support/isort-run to run import sort, build-support/isort-check to run import order check.
Adds build-support/hooks which contains hooks that people can place into their .git/hooks directory, currently just a pre-commit hook that checks import sort order (which can be overridden with an environment variable.)

The ordering it produces is different than the one we currently have but closer to straight PEP8.  If it runs, it's about a 500 line diff which I can send later.


Diffs
-----

  build-support/hooks/pre-commit PRE-CREATION 
  build-support/isort PRE-CREATION 
  build-support/isort-check PRE-CREATION 
  build-support/isort-run PRE-CREATION 
  src/.isort.cfg PRE-CREATION 

Diff: https://reviews.apache.org/r/21136/diff/


Testing
-------

Ran the isort and ran tests, everything worked.


Thanks,

Brian Wickman


Re: Review Request 21136: Add python import order wrapper/commit hook

Posted by Joe Smith <ya...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21136/#review42421
-----------------------------------------------------------

Ship it!


fwiw, lgtm as-is

- Joe Smith


On May 6, 2014, 4:10 p.m., Brian Wickman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21136/
> -----------------------------------------------------------
> 
> (Updated May 6, 2014, 4:10 p.m.)
> 
> 
> Review request for Aurora and Kevin Sweeney.
> 
> 
> Bugs: AURORA-149
>     https://issues.apache.org/jira/browse/AURORA-149
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Adds build-support/isort wrapper for isort.
> Adds build-support/isort-run to run import sort, build-support/isort-check to run import order check.
> Adds build-support/hooks which contains hooks that people can place into their .git/hooks directory, currently just a pre-commit hook that checks import sort order (which can be overridden with an environment variable.)
> 
> The ordering it produces is different than the one we currently have but closer to straight PEP8.  If it runs, it's about a 500 line diff which I can send later.
> 
> 
> Diffs
> -----
> 
>   build-support/hooks/pre-commit PRE-CREATION 
>   build-support/isort PRE-CREATION 
>   build-support/isort-check PRE-CREATION 
>   build-support/isort-run PRE-CREATION 
>   src/.isort.cfg PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/21136/diff/
> 
> 
> Testing
> -------
> 
> Ran the isort and ran tests, everything worked.
> 
> 
> Thanks,
> 
> Brian Wickman
> 
>


Re: Review Request 21136: Add python import order wrapper/commit hook

Posted by Kevin Sweeney <ke...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21136/#review42730
-----------------------------------------------------------

Ship it!


Ship It!


.isort.cfg
<https://reviews.apache.org/r/21136/#comment76584>

    Mind adding a comment indicating what this is?


- Kevin Sweeney


On May 12, 2014, 10:25 a.m., Brian Wickman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21136/
> -----------------------------------------------------------
> 
> (Updated May 12, 2014, 10:25 a.m.)
> 
> 
> Review request for Aurora and Kevin Sweeney.
> 
> 
> Bugs: AURORA-149
>     https://issues.apache.org/jira/browse/AURORA-149
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Adds build-support/isort wrapper for isort.
> Adds build-support/isort-run to run import sort, build-support/isort-check to run import order check.
> Adds build-support/hooks which contains hooks that people can place into their .git/hooks directory, currently just a pre-commit hook that checks import sort order (which can be overridden with an environment variable.)
> 
> The ordering it produces is different than the one we currently have but closer to straight PEP8.  If it runs, it's about a 500 line diff which I can send later.
> 
> 
> Diffs
> -----
> 
>   .isort.cfg PRE-CREATION 
>   build-support/hooks/pre-commit PRE-CREATION 
>   build-support/isort PRE-CREATION 
>   build-support/isort-check PRE-CREATION 
>   build-support/isort-run PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/21136/diff/
> 
> 
> Testing
> -------
> 
> Ran the isort and ran tests, everything worked.
> 
> 
> Thanks,
> 
> Brian Wickman
> 
>


Re: Review Request 21136: Add python import order wrapper/commit hook

Posted by Brian Wickman <wi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21136/
-----------------------------------------------------------

(Updated May 12, 2014, 8:55 p.m.)


Review request for Aurora and Kevin Sweeney.


Changes
-------

Add comment to .isort.cfg


Bugs: AURORA-149
    https://issues.apache.org/jira/browse/AURORA-149


Repository: aurora


Description
-------

Adds build-support/isort wrapper for isort.
Adds build-support/isort-run to run import sort, build-support/isort-check to run import order check.
Adds build-support/hooks which contains hooks that people can place into their .git/hooks directory, currently just a pre-commit hook that checks import sort order (which can be overridden with an environment variable.)

The ordering it produces is different than the one we currently have but closer to straight PEP8.  If it runs, it's about a 500 line diff which I can send later.


Diffs (updated)
-----

  .isort.cfg PRE-CREATION 
  build-support/hooks/pre-commit PRE-CREATION 
  build-support/isort PRE-CREATION 
  build-support/isort-check PRE-CREATION 
  build-support/isort-run PRE-CREATION 

Diff: https://reviews.apache.org/r/21136/diff/


Testing
-------

Ran the isort and ran tests, everything worked.


Thanks,

Brian Wickman


Re: Review Request 21136: Add python import order wrapper/commit hook

Posted by Brian Wickman <wi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21136/
-----------------------------------------------------------

(Updated May 12, 2014, 5:25 p.m.)


Review request for Aurora and Kevin Sweeney.


Changes
-------

Moved src/.isort.cfg to root .isort.cfg -- this seems more consistent with the rest of our dotfiles.


Bugs: AURORA-149
    https://issues.apache.org/jira/browse/AURORA-149


Repository: aurora


Description
-------

Adds build-support/isort wrapper for isort.
Adds build-support/isort-run to run import sort, build-support/isort-check to run import order check.
Adds build-support/hooks which contains hooks that people can place into their .git/hooks directory, currently just a pre-commit hook that checks import sort order (which can be overridden with an environment variable.)

The ordering it produces is different than the one we currently have but closer to straight PEP8.  If it runs, it's about a 500 line diff which I can send later.


Diffs (updated)
-----

  .isort.cfg PRE-CREATION 
  build-support/hooks/pre-commit PRE-CREATION 
  build-support/isort PRE-CREATION 
  build-support/isort-check PRE-CREATION 
  build-support/isort-run PRE-CREATION 

Diff: https://reviews.apache.org/r/21136/diff/


Testing
-------

Ran the isort and ran tests, everything worked.


Thanks,

Brian Wickman


Re: Review Request 21136: Add python import order wrapper/commit hook

Posted by Brian Wickman <wi...@apache.org>.

> On May 6, 2014, 11:29 p.m., Kevin Sweeney wrote:
> > src/.isort.cfg, line 1
> > <https://reviews.apache.org/r/21136/diff/1/?file=575772#file575772line1>
> >
> >     can this live in config/ instead? that's where java checkstyle stuff lives

I don't think there's any way in isort to get this to work, reading both:

https://github.com/timothycrosley/isort/blob/develop/isort/main.py
https://github.com/timothycrosley/isort/blob/develop/isort/settings.py

We could instead just pass everything on the command line except that 'forced_separate' is not available on the command line.  Pull request maybe?

Alternate locations we could consider:
  repository root
  src/main/python + src/test/python (symlinked?)


- Brian


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21136/#review42370
-----------------------------------------------------------


On May 6, 2014, 11:10 p.m., Brian Wickman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21136/
> -----------------------------------------------------------
> 
> (Updated May 6, 2014, 11:10 p.m.)
> 
> 
> Review request for Aurora and Kevin Sweeney.
> 
> 
> Bugs: AURORA-149
>     https://issues.apache.org/jira/browse/AURORA-149
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Adds build-support/isort wrapper for isort.
> Adds build-support/isort-run to run import sort, build-support/isort-check to run import order check.
> Adds build-support/hooks which contains hooks that people can place into their .git/hooks directory, currently just a pre-commit hook that checks import sort order (which can be overridden with an environment variable.)
> 
> The ordering it produces is different than the one we currently have but closer to straight PEP8.  If it runs, it's about a 500 line diff which I can send later.
> 
> 
> Diffs
> -----
> 
>   build-support/hooks/pre-commit PRE-CREATION 
>   build-support/isort PRE-CREATION 
>   build-support/isort-check PRE-CREATION 
>   build-support/isort-run PRE-CREATION 
>   src/.isort.cfg PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/21136/diff/
> 
> 
> Testing
> -------
> 
> Ran the isort and ran tests, everything worked.
> 
> 
> Thanks,
> 
> Brian Wickman
> 
>


Re: Review Request 21136: Add python import order wrapper/commit hook

Posted by Kevin Sweeney <ke...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21136/#review42370
-----------------------------------------------------------



src/.isort.cfg
<https://reviews.apache.org/r/21136/#comment76149>

    can this live in config/ instead? that's where java checkstyle stuff lives


- Kevin Sweeney


On May 6, 2014, 4:10 p.m., Brian Wickman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21136/
> -----------------------------------------------------------
> 
> (Updated May 6, 2014, 4:10 p.m.)
> 
> 
> Review request for Aurora and Kevin Sweeney.
> 
> 
> Bugs: AURORA-149
>     https://issues.apache.org/jira/browse/AURORA-149
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Adds build-support/isort wrapper for isort.
> Adds build-support/isort-run to run import sort, build-support/isort-check to run import order check.
> Adds build-support/hooks which contains hooks that people can place into their .git/hooks directory, currently just a pre-commit hook that checks import sort order (which can be overridden with an environment variable.)
> 
> The ordering it produces is different than the one we currently have but closer to straight PEP8.  If it runs, it's about a 500 line diff which I can send later.
> 
> 
> Diffs
> -----
> 
>   build-support/hooks/pre-commit PRE-CREATION 
>   build-support/isort PRE-CREATION 
>   build-support/isort-check PRE-CREATION 
>   build-support/isort-run PRE-CREATION 
>   src/.isort.cfg PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/21136/diff/
> 
> 
> Testing
> -------
> 
> Ran the isort and ran tests, everything worked.
> 
> 
> Thanks,
> 
> Brian Wickman
> 
>


Re: Review Request 21136: Add python import order wrapper/commit hook

Posted by Brian Wickman <wi...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21136/
-----------------------------------------------------------

(Updated May 6, 2014, 11:10 p.m.)


Review request for Aurora and Kevin Sweeney.


Changes
-------

Add related ticket AURORA-149
(The checkstyle part is a subsequent review.)


Bugs: AURORA-149
    https://issues.apache.org/jira/browse/AURORA-149


Repository: aurora


Description
-------

Adds build-support/isort wrapper for isort.
Adds build-support/isort-run to run import sort, build-support/isort-check to run import order check.
Adds build-support/hooks which contains hooks that people can place into their .git/hooks directory, currently just a pre-commit hook that checks import sort order (which can be overridden with an environment variable.)

The ordering it produces is different than the one we currently have but closer to straight PEP8.  If it runs, it's about a 500 line diff which I can send later.


Diffs
-----

  build-support/hooks/pre-commit PRE-CREATION 
  build-support/isort PRE-CREATION 
  build-support/isort-check PRE-CREATION 
  build-support/isort-run PRE-CREATION 
  src/.isort.cfg PRE-CREATION 

Diff: https://reviews.apache.org/r/21136/diff/


Testing
-------

Ran the isort and ran tests, everything worked.


Thanks,

Brian Wickman