Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include lint with flake8 in travis CI #58

Open
bahp opened this issue May 20, 2021 · 3 comments
Open

Include lint with flake8 in travis CI #58

bahp opened this issue May 20, 2021 · 3 comments
Assignees

Comments

@bahp
Copy link
Collaborator

bahp commented May 20, 2021

Please include lint with flake on the travis integration (lines below)

script:
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

Before any push and pull request please address the issues highlighted by flake locally in your computer. To do so just install flake8, go to the main folder (where setup.py is) and run the two commands above in your terminal. You will see a number of errors to address which will increase the stability of the package a lot.

flake

@bahp bahp assigned meta00 and Koaha May 20, 2021
@meta00
Copy link
Owner

meta00 commented May 21, 2021

@bahp I use flake8 but much of the codes don't pass flake8 control, hence issue #6 to fix the legacy. To get builds pass for now, I skip flake8 in Travis CI and will add later.
Agree that we should run flake8 with your codes locally before pushing @Koaha @SKarolcik. Thanks.

@Koaha
Copy link
Collaborator

Koaha commented May 21, 2021

Noted with thanks. We will carefully check with flake8 before pushing

@bahp
Copy link
Collaborator Author

bahp commented May 21, 2021

Hi guys,

Note that all the issues highlighted in flake8 in the image attached are ‘unamed’ things. They are all basically related with importing so shouldn’t take too long to fix but are really important. Either importing a function from your library (PeakDetector), using np.nan (NaN), np.array etc.

Python is an scripting language (in comparison to other languages as c or Java that need compiling first). That means that many errors do not happen until you actually run the script and the execution reaches the error line. In this scenario there might be two options: 1. The environment somehow has been configured different (e.g you are using Python notebooks) and it is just a minor issue or 2. The code has been written but never tested or executed to check that it works which will cause a lot of problems of integrity and reliability.

If you could spend some tine fixing this issues and merge with main it would be great.

Hope it helps

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

No branches or pull requests

3 participants