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

Github workflow for testing and linting. #54

Merged
merged 16 commits into from
Dec 20, 2021
24 changes: 24 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Linting

on: [push, pull_request]

jobs:
flake8:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install flake8
- name: Lint with flake8
run: |
flake8 .
38 changes: 38 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Testing

on: [push, pull_request]

jobs:

pytest:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.8, 3.9]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install package dependencies
run: |
pip install -r requirements.txt


- name: Install test dependencies
run: |
pip install -r requirements_testing.txt

- name: Install main package
run: |
pip install -e .

- name: Run test-suite
run: |
python -m pytest
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ omegaconf>=2.0.1
torchmetrics>=0.3.2
tensorboard>=2.2.0, !=2.5.0
pytorch-tabnet==3.0.0
PyYAML>=5.1.* # OmegaConf requirement >=5.1
PyYAML<=5.4.1, >=5.1
# importlib-metadata <1,>=0.12
matplotlib>3.1
ipywidgets
# Use dataclasses backport for Python 3.6.
dataclasses;python_version=='3.6'
einops==0.3.0
einops==0.3.0
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ replace = {new_version}
universal = 1

[flake8]
exclude = docs
exclude = docs, examples
ignore = E501

[aliases]
test = pytest
Expand Down