Skip to content

Add a few more python packages#924

Merged
tgamblin merged 4 commits intospack:developfrom
hegner:feature/python-diverse
May 10, 2016
Merged

Add a few more python packages#924
tgamblin merged 4 commits intospack:developfrom
hegner:feature/python-diverse

Conversation

@hegner
Copy link
Copy Markdown

@hegner hegner commented May 10, 2016

Adding

  • py-Genshi
  • py-astroid
  • py-jinja2
  • py-logilab-common
  • py-markupsafe
  • py-mistune
  • py-prettytable
  • py-py2neo
  • py-storm

tested on Ubuntu 16.04 and RedHat 6.7

py-Genshi
py-astroid
py-jinja2
py-logilab-common
py-markupsafe
py-mistune
py-prettytable
py-py2neo
py-storm
@tgamblin
Copy link
Copy Markdown
Member

@hegner Thanks!

Looks like this failed on the new formatting checks. Mind fixing all but E221? I should also add one to detect FIXME comments.

@hegner
Copy link
Copy Markdown
Author

hegner commented May 10, 2016

@tgamblin - sure. However, E203 conflicts with the nice formating in the version definitions. Are you sure you want to keep it?

@hegner
Copy link
Copy Markdown
Author

hegner commented May 10, 2016

@tgamblin - OK. Did all. However I am hitting a wall with E501 and the long URLs in

  • var/spack/repos/builtin/packages/py-logilab-common/package.py
  • var/spack/repos/builtin/packages/py-prettytable/package.py

@alalazo
Copy link
Copy Markdown
Member

alalazo commented May 10, 2016

@hegner For URLs you may try to disable the checks only for that line :

url      = "https://pypi.python.org/packages/a7/31/1650d23e44794d46935d82b86e73454cc83b814cbe1365260ccce8a2f4c6/logilab-common-1.2.0.tar.gz"  # NOQA

Use with care though 😄

@hegner
Copy link
Copy Markdown
Author

hegner commented May 10, 2016

@alalazo - thanks

@hegner
Copy link
Copy Markdown
Author

hegner commented May 10, 2016

@tgamblin - I now learned something more about the inner guts of spack. Due to the late binding of the configure commands, one cannot get rid of the F821 problems concerning python, cmake, make, etc

from spack import Package


class PyGenshi(Package):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can this one be lowercased to py-genshi for the package name? Basically that just requires renaming the directory.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

done.

@alalazo
Copy link
Copy Markdown
Member

alalazo commented May 10, 2016

@tgamblin @hegner One solution for packages would be to create them with something like (still have to check the exact syntax):

# flake8: ignore=F821

What do you think?

@tgamblin
Copy link
Copy Markdown
Member

@hegner: I already disabled E221 for url formatting -- that's in develop but this is based on a slightly earlier commit.

I'll also add F821 to the list though that might be motivation for me to start putting the things we poke into module scope in the from spack import * namespace instead.

@tgamblin
Copy link
Copy Markdown
Member

@alalazo: is there a way to add file patterns? We could just put ignore 821 for package.py files in the flake8.ini file. Is there a way to ignore E501 for particular line patterns? I like the 79 char limit but I don't want to enforce it for URLs, as @hegner points out.

@tgamblin
Copy link
Copy Markdown
Member

@hegner: thanks for being the strict formatting guinea pig

@hegner
Copy link
Copy Markdown
Author

hegner commented May 10, 2016

@tgamblin - if you can fix it in the __init__.py so that E821 can be applied that would be great. I could re-surrect my PR on the spack create in that case.
E203 vs pretty column alignment is still unclear to me as well.

@tgamblin
Copy link
Copy Markdown
Member

tgamblin commented May 10, 2016

@hegner: I actually like E203 (whitespace before ,):

I prefer this:

    version('2.1',     'abc123')
    version('2.1.5.7', 'abc123')

to this:

    version('2.1'    , 'abc123')
    version('2.1.5.7', 'abc123')

@tgamblin tgamblin closed this May 10, 2016
@tgamblin tgamblin reopened this May 10, 2016
@tgamblin
Copy link
Copy Markdown
Member

tgamblin commented May 10, 2016

oops wrong button

@hegner
Copy link
Copy Markdown
Author

hegner commented May 10, 2016

@tgamblin - me as well. could be I took the wrong number in my comment but currently you disallow both.

@tgamblin
Copy link
Copy Markdown
Member

@hegner: added F821 t the ignore list... I'll figure out whether I can ignore certain patterns later

@hegner
Copy link
Copy Markdown
Author

hegner commented May 10, 2016

@tgamblin - OK. I'll fix the outstanding problems for the line lengths.

@alalazo
Copy link
Copy Markdown
Member

alalazo commented May 10, 2016

@tgamblin I'll try to have a look on how to ignore some of the rules just for packages.py, let you know if I find something

@tgamblin
Copy link
Copy Markdown
Member

@hegner: don't worry about the URL lines -- I can merge it despite those.

@hegner
Copy link
Copy Markdown
Author

hegner commented May 10, 2016

@tgamblin - OK. In that case it is complete.

@tgamblin tgamblin merged commit 3e71784 into spack:develop May 10, 2016
@tgamblin
Copy link
Copy Markdown
Member

Thanks!

@hegner hegner deleted the feature/python-diverse branch November 28, 2016 20:10
olupton pushed a commit to olupton/spack that referenced this pull request Feb 7, 2022
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