Skip to content

Commit

Permalink
Merge pull request #607 from DHI/ruff
Browse files Browse the repository at this point in the history
Lint with Ruff
  • Loading branch information
ecomodeller authored Oct 12, 2023
2 parents 41f7ec6 + 39b68d0 commit 29cd875
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 16 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/full_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,20 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]

python-version: [3.8, "3.11"]

steps:
- uses: actions/checkout@v3
- uses: chartboost/ruff-action@v1 # Fail fast if there are any linting errors
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov
pip install pytest pytest-cov
- 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
# 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
# test methods have to be unique
flake8 tests/ --select=F811
- name: Install mikeio
run: |
pip install .[test]
Expand Down
1 change: 0 additions & 1 deletion tests/performance/test_performance_dfs0.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from pathlib import Path
import numpy as np
import pandas as pd
import mikeio
Expand Down
1 change: 0 additions & 1 deletion tests/test_dfs0.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
import numpy as np
import pandas as pd
import datetime
Expand Down
1 change: 0 additions & 1 deletion tests/test_dfsu_layered.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
import numpy as np
import pytest
import mikeio
Expand Down
1 change: 0 additions & 1 deletion tests/test_dfsu_plot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
import numpy as np
import pytest
import matplotlib as mpl
Expand Down
1 change: 0 additions & 1 deletion tests/test_mesh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
import numpy as np
import pytest
from mikeio import Mesh
Expand Down
1 change: 0 additions & 1 deletion tests/test_pfs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from io import StringIO
import sys
import os
import pytest
import mikeio
import pandas as pd
Expand Down

0 comments on commit 29cd875

Please sign in to comment.