Accenture / AmpliGraph

Python library for Representation Learning on Knowledge Graphs https://docs.ampligraph.org
Apache License 2.0
2.14k stars 251 forks source link

Fix PEP8 violations #97

Closed tabacof closed 5 years ago

tabacof commented 5 years ago

Background and Context PEP8 is the standard style guide for Python: https://www.python.org/dev/peps/pep-0008/

According to flake8, AmpliGraph currently has 1254 violations, mostly related to long lines.

An IDE like PyCharm will mark the PEP8 violations as warnings.

Description There are three sub-tasks:

  1. Decide which standard to follow. My suggestion would be for the standard flake8.
  2. Fix the code violations.
  3. [Optional] Add the flake8 check to the Jenkins script to make the build fail if there is any violation.
tabacof commented 5 years ago

Solved by this commit: https://github.com/Accenture/AmpliGraph/commit/7991c2cbdc34a59f0e325ee9b30a2d62a91eb021

Important:

Adding flake8 to the Jenkins build script to prevent future violations.

The flake8 command has been customized with two changes:

  1. Increasing the line length to 120 instead of 80
  2. Removing some whitespace warnings

Both changes make the linting more similar to the default PyCharm configuration.