lewtun HF staff commited on
Commit
79d85b6
1 Parent(s): c671908

Add quality

Browse files
Files changed (3) hide show
  1. .github/workflows/quality.yml +29 -0
  2. Makefile +8 -0
  3. app.py +1 -1
.github/workflows/quality.yml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Code quality
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+
11
+ jobs:
12
+
13
+ check_code_quality:
14
+ name: Check code quality
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@v2
19
+ - name: Setup Python environment
20
+ uses: actions/setup-python@v2
21
+ with:
22
+ python-version: 3.9
23
+ - name: Install dependencies
24
+ run: |
25
+ python -m pip install --upgrade pip
26
+ python -m pip install black isort flake8
27
+ - name: Code quality
28
+ run: |
29
+ make quality
Makefile ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ style:
2
+ python -m black --line-length 119 --target-version py39 .
3
+ python -m isort .
4
+
5
+ quality:
6
+ python -m black --check --line-length 119 --target-version py39 .
7
+ python -m isort --check-only .
8
+ python -m flake8 --max-line-length 119
app.py CHANGED
@@ -8,7 +8,7 @@ from datasets import get_dataset_config_names
8
  from dotenv import load_dotenv
9
  from huggingface_hub import list_datasets
10
 
11
- from evaluation import EvaluationInfo, filter_evaluated_models
12
  from utils import (get_compatible_models, get_key, get_metadata, http_get,
13
  http_post)
14
 
 
8
  from dotenv import load_dotenv
9
  from huggingface_hub import list_datasets
10
 
11
+ from evaluation import filter_evaluated_models
12
  from utils import (get_compatible_models, get_key, get_metadata, http_get,
13
  http_post)
14