-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add flake8 and fix warnings (#79)
- Loading branch information
Showing
10 changed files
with
77 additions
and
42 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Lint | ||
|
||
on: push | ||
|
||
jobs: | ||
formatting: | ||
if: "!contains(github.event.head_commit.message, 'skip_ci')" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- run: python -m pip install --upgrade tox | ||
- run: tox -e checkformatting | ||
flake8: | ||
if: "!contains(github.event.head_commit.message, 'skip_ci')" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- run: python -m pip install --upgrade tox | ||
- run: tox -e flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Pytest | ||
|
||
on: push | ||
|
||
jobs: | ||
test: | ||
if: "!contains(github.event.head_commit.message, 'skip_ci')" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8] | ||
|
||
name: Python ${{ matrix.python-version }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- run: python -m pip install --upgrade pip tox | ||
- run: tox -e pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
from io import StringIO | ||
|
||
import numpy as np | ||
import pandas as pd | ||
import pytest | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
h5py>=2.9.0 | ||
ipython>=7.0 | ||
julia>=0.5.1 | ||
numpy>=1.16.0 | ||
pandas>=0.25.3 | ||
scipy>=1.2 | ||
tqdm>=4.29.1 | ||
h5py~=2.10.0 | ||
ipython~=7.0 | ||
julia~=0.5.1 | ||
numpy~=1.18.5 | ||
pandas~=1.1.3 | ||
scipy~=1.2 | ||
tqdm~=4.29.1 | ||
pytest~=6.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[tox] | ||
envlist = pytest, format, flake8 | ||
skipsdist = true | ||
|
||
[testenv] | ||
deps = | ||
pytest: -rrequirements.txt | ||
{format,checkformatting}: black | ||
{format,checkformatting}: isort | ||
flake8: flake8 | ||
changedir = pyreisejl | ||
commands = | ||
pytest: pytest | ||
format: black . | ||
format: isort -m 3 --tc . | ||
checkformatting: black . --check --diff | ||
checkformatting: isort -m 3 --tc --check --diff . | ||
flake8: flake8 | ||
|
||
[flake8] | ||
ignore = E501,E731 |