Unverified Commit 2c6dca76 authored by Vít Starý Novotný's avatar Vít Starý Novotný
Browse files

Add flake8 to continuous integration

parent 8c1ca528
Loading
Loading
Loading
Loading
+16 −2
Original line number Original line Diff line number Diff line
name: Run Python Tests
name: Run Tests
on:
on:
  push:
  push:
  pull_request:
  pull_request:
  workflow_dispatch:
  workflow_dispatch:
jobs:
jobs:
  build:
  flake8:
    name: Check Code Style
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v1
        with:
          python-version: 3.7
      - run: |
          python -m pip install --upgrade pip
          pip install flake8
      - run: |
          flake8
  unit_tests:
    name: Run Unit Tests
    runs-on: ubuntu-latest
    runs-on: ubuntu-latest
    steps:
    steps:
      - uses: actions/checkout@v2
      - uses: actions/checkout@v2
+19 −1
Original line number Original line Diff line number Diff line
from .common import get_topics, get_judged_documents, get_ndcg as ndcg, get_ndcg, get_random_ndcg, get_random_normalized_ndcg, get_judgement
from .common import (
    get_topics,
    get_judged_documents,
    get_ndcg as ndcg,
    get_ndcg,
    get_random_ndcg,
    get_random_normalized_ndcg,
    get_judgement,
)

__all__ = [
    'get_topics',
    'get_judged_documents',
    'ndcg',
    'get_ndcg',
    'get_random_ndcg',
    'get_random_normalized_ndcg',
    'get_judgement',
]
+0 −1
Original line number Original line Diff line number Diff line
# -*- coding:utf-8 -*-
# -*- coding:utf-8 -*-


from copy import deepcopy
from copy import deepcopy
from itertools import chain
from math import log2
from math import log2


import numpy as np
import numpy as np

setup.cfg

0 → 100644
+2 −0
Original line number Original line Diff line number Diff line
[flake8]
max-line-length = 120
+0 −1
Original line number Original line Diff line number Diff line
from math import log2
import unittest
import unittest


from arqmath_eval import get_judgement
from arqmath_eval import get_judgement
+4 −4

File changed.

Contains only whitespace changes.

Loading