From a9bdfcb1d5b07ed74c4c478d8f4d9e5715568223 Mon Sep 17 00:00:00 2001 From: Sergio Garcia Prado Date: Sat, 31 Aug 2019 11:54:09 +0200 Subject: [PATCH] * Included "flake8" on the project. * Created configuration file. * Included "flake8" validation on Travis deployments. #41 --- .travis.yml | 1 + Pipfile.lock | 35 +++++++++++++++++++++++++++++++++++ setup.cfg | 8 ++++++++ setup.py | 3 +++ 4 files changed, 47 insertions(+) create mode 100644 setup.cfg diff --git a/.travis.yml b/.travis.yml index a184803c..2386d7d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ install: - 'pip install pipenv' - 'pipenv sync' script: + - 'pipenv run flake8' - 'pipenv run coverage run --source=jinete --module unittest discover tests' after_success: - 'pipenv run codecov' diff --git a/Pipfile.lock b/Pipfile.lock index dc48418e..bcbb66b0 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -124,6 +124,20 @@ ], "version": "==0.15.2" }, + "entrypoints": { + "hashes": [ + "sha256:589f874b313739ad35be6e0cd7efde2a4e9b6fea91edcc34e58ecbb8dbe56d19", + "sha256:c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451" + ], + "version": "==0.3" + }, + "flake8": { + "hashes": [ + "sha256:19241c1cbc971b9962473e4438a2ca19749a7dd002dd1a946eaba171b4114548", + "sha256:8e9dfa3cecb2400b3738a42c54c3043e821682b9c840b0448c0503f781130696" + ], + "version": "==3.7.8" + }, "humanfriendly": { "hashes": [ "sha256:23057b10ad6f782e7bc3a20e3cb6768ab919f619bbdc0dd75691121bbde5591d", @@ -239,6 +253,13 @@ ], "version": "==3.1.1" }, + "mccabe": { + "hashes": [ + "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42", + "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f" + ], + "version": "==0.6.1" + }, "networkx": { "hashes": [ "sha256:8311ddef63cf5c5c5e7c1d0212dd141d9a1fe3f474915281b73597ed5f1d4e3d" @@ -300,6 +321,20 @@ ], "version": "==5.4.2" }, + "pycodestyle": { + "hashes": [ + "sha256:95a2219d12372f05704562a14ec30bc76b05a5b297b21a5dfe3f6fac3491ae56", + "sha256:e40a936c9a450ad81df37f549d676d127b1b66000a6c500caa2b085bc0ca976c" + ], + "version": "==2.5.0" + }, + "pyflakes": { + "hashes": [ + "sha256:17dbeb2e3f4d772725c777fabc446d5634d1038f234e77343108ce445ea69ce0", + "sha256:d976835886f8c5b31d47970ed689944a0262b5f3afa00a5a7b4dc81e5449f8a2" + ], + "version": "==2.1.1" + }, "pygments": { "hashes": [ "sha256:71e430bc85c88a430f000ac1d9b331d2407f681d6f6aec95e8bcfbc3df5b0127", diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..518b1a43 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,8 @@ +[flake8] +max-line-length = 120 +filename = + examples/*/*.py + jinete/**/*.py + tests/**/*.py +per-file-ignores = + ./**/__init__.py:F401 \ No newline at end of file diff --git a/setup.py b/setup.py index dc780905..aae36e9c 100644 --- a/setup.py +++ b/setup.py @@ -36,6 +36,9 @@ 'coverage', 'codecov', ], + 'syntax': [ + 'flake8', + ], 'logs': [ 'coloredlogs', ]