diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index da3c14c..3c266de 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -21,7 +21,7 @@ jobs: python -m pip install --upgrade pip python -m pip install flake8 pytest python -m pip install coverage - python -m pip install -r requirements.txt + python -m pip install -r test-requirements.txt coverage run --source='.' --parallel -m pytest - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml index fb2ccd3..4ce9c11 100644 --- a/.github/workflows/python-test.yml +++ b/.github/workflows/python-test.yml @@ -29,7 +29,7 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install flake8 pytest - python -m pip install -r requirements.txt + python -m pip install -r test-requirements.txt - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names diff --git a/graph/visuals.py b/graph/visuals.py index 7ddcb34..05bf0fe 100644 --- a/graph/visuals.py +++ b/graph/visuals.py @@ -5,6 +5,8 @@ visuals_enabled = True except ImportError: visuals_enabled = False + import warnings + warnings.warn("matplotlib is not installed, visuals are disabled. Please install matplotlib>=3.1.0") def visualise(func): diff --git a/requirements.txt b/requirements.txt index beadd09..e69de29 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +0,0 @@ -matplotlib >= 3.1 \ No newline at end of file diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..beadd09 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1 @@ +matplotlib >= 3.1 \ No newline at end of file