pypa / auditwheel

Auditing and relabeling cross-distribution Linux wheels.
Other
437 stars 144 forks source link

Add flake8 to CI #115

Closed ehashman closed 5 years ago

ehashman commented 5 years ago

And fix any errors we currently have...

isaac-philip commented 5 years ago

I'll fix the pep8 errors and will look for addition of flake8 to CI. reference of earlier work done for similar pep8 work recently - pep8 refactor code

so for the CI in travis you wish to basically report through flake8 what errors/warnings are present? Are we looking to be strict on the errors since 79 character enforcement in some cases could be overdoing it. But that depends on the project maintainers and so let me know are we strict on that or should line character limit be a value greater than 79? Thanks!

ehashman commented 5 years ago

I would add some configs and a tox env for flake8. Then you can add it as a step to the Travis script.

Feel free to set max line length no higher than 90, I think we have a few long lines.

isaac-philip commented 5 years ago

Thanks, i'll proceed in that direction.

njsmith commented 5 years ago

For formatting you might also consider switching to black.

isaac-philip commented 5 years ago

@ehashman & @njsmith, Thanks for your guidance. I am pretty much done with the changes. Facing issue while executing tox.

Please advise how to proceed with resolving this, (pbr) Complete output from command python setup.py egg_info: Download error on https://pypi.org/simple/pbr/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:646) -- Some packages may not be found! Couldn't find index page for 'pbr' (maybe misspelled?) Download error on https://pypi.org/simple/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:646) -- Some packages may not be found! No local packages or working download links found for pbr

This occurs after the setup.py is invoked through tox i believe.

ehashman commented 5 years ago

Can you submit this as a WIP PR so CI runs and I can try to reproduce?

anthrotype commented 5 years ago

I think if you add a pyproject.toml file in the root of the repository, and specify pbr among the build dependencies, then pip (>= 10) will take care of installing it in its temporary build environment. The setup_requires setup keyword uses easy_install which is sort of deprecated these days, since pip gained support for PEP 518.

The pyproject.toml could look like this:

[build-system]
requires = [
    "setuptools",
    "wheel",
    "pbr",
]
build-backend = "setuptools.build_meta"

(disclaimer: I've not checked this works, and I've never used pbr)

isaac-philip commented 5 years ago

Ill create a WIP PR and then I can make additional changes as per feedback from @ehashman

Thanks @anthrotype , Once I submit that PR i can give your suggestion a try.

isaac-philip commented 5 years ago

Returned to the single quotes that black had formatted automagically in #124 We can proceed with that PR/