From 97e7619097eb57e71e40173eb960027f09f7aa14 Mon Sep 17 00:00:00 2001 From: Thomas Nipen Date: Mon, 11 Mar 2024 14:02:56 +0100 Subject: [PATCH] Cleanup dependencies for testing --- .github/workflows/python-package.yml | 7 ++++--- run_coveralls.py | 14 -------------- setup.py | 4 +--- 3 files changed, 5 insertions(+), 20 deletions(-) delete mode 100644 run_coveralls.py diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 1b74b4b..d21cf39 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -30,14 +30,15 @@ jobs: python -m pip install flake8 nose - name: Install package run: | - python -m pip install . --only-binary=:all: + python -m pip install .[test] --only-binary=:all: - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + flake8 verif scripts --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 - name: Test with nose run: | - nosetests + coverage run --source verif -m unittest discover + coverage report --precision 2 diff --git a/run_coveralls.py b/run_coveralls.py deleted file mode 100644 index e5bbe4f..0000000 --- a/run_coveralls.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/env/python - -# From: https://stackoverflow.com/a/33012308 -# Runs coveralls if Travis CI is detected - -import os -from subprocess import call - -if __name__ == '__main__': - if 'TRAVIS' in os.environ: - rc = call('coveralls') - raise SystemExit(rc) - else: - print("Travis was not detected -> Skipping coveralls") diff --git a/setup.py b/setup.py index e9a6e15..e7784f9 100644 --- a/setup.py +++ b/setup.py @@ -82,10 +82,8 @@ # for example: # $ pip install -e .[dev,test] extras_require={ - # 'dev': ['check-manifest'], - 'test': ['coverage', 'pep8', 'pylint'], + 'test': ['coverage', 'pep8', 'pylint', 'flake8'], 'cartopy': ['cartopy'], - # 'test': ['pytest'], }, test_suite="verif.tests",