File tree Expand file tree Collapse file tree 5 files changed +54
-29
lines changed Expand file tree Collapse file tree 5 files changed +54
-29
lines changed Original file line number Diff line number Diff line change @@ -22,23 +22,17 @@ jobs:
22
22
- name : Install dependencies
23
23
run : |
24
24
python -m pip install --upgrade pip
25
+ pip install -r requirements.txt
25
26
pip install -e .
26
- pip install pytest pytest-cov black isort
27
27
28
28
- name : Check formatting with black
29
29
run : |
30
- black --check anomaly_detection/ tests/
30
+ black --check .
31
31
32
32
- name : Check import sorting with isort
33
33
run : |
34
- isort --check-only anomaly_detection/ tests/
34
+ isort --check-only .
35
35
36
36
- name : Run tests with coverage
37
37
run : |
38
- pytest tests/ --cov=anomaly_detection --cov-report=xml -v
39
-
40
- - name : Upload coverage to Codecov
41
- uses : codecov/codecov-action@v4
42
- with :
43
- file : ./coverage.xml
44
- fail_ci_if_error : true
38
+ pytest tests/ --cov=anomaly_detection -v
Original file line number Diff line number Diff line change
1
+ repos :
2
+ - repo : https://github.com/pre-commit/pre-commit-hooks
3
+ rev : v4.5.0
4
+ hooks :
5
+ - id : check-merge-conflict
6
+ - id : check-yaml
7
+ - id : end-of-file-fixer
8
+ - id : trailing-whitespace
9
+ - id : check-added-large-files
10
+
11
+ - repo : https://github.com/psf/black
12
+ rev : 24.1.1
13
+ hooks :
14
+ - id : black
15
+ language_version : python3.9
16
+
17
+ - repo : https://github.com/pycqa/isort
18
+ rev : 5.13.2
19
+ hooks :
20
+ - id : isort
21
+ args : ["--profile", "black"]
22
+
23
+ - repo : https://github.com/pre-commit/pre-commit-hooks
24
+ rev : v4.5.0
25
+ hooks :
26
+ - id : no-commit-to-branch
27
+ args : [--branch, main]
Original file line number Diff line number Diff line change 1
- .PHONY : install test lint format check-format check-imports clean
1
+ .PHONY : install test lint format check-format check-imports clean setup-pre-commit
2
2
3
3
install :
4
4
pip install -e .
5
- pip install pytest pytest-cov black isort
5
+ pip install pytest pytest-cov black isort pre-commit
6
+
7
+ setup-pre-commit :
8
+ pre-commit install
6
9
7
10
test :
8
11
pytest tests/ --cov=anomaly_detection --cov-report=term-missing -v
9
12
10
13
lint :
11
- black --check anomaly_detection/ tests/
12
- isort --check-only anomaly_detection/ tests/
14
+ black --check .
15
+ isort --check-only .
13
16
14
17
format :
15
- black anomaly_detection/ tests/
16
- isort anomaly_detection/ tests/
18
+ black .
19
+ isort .
17
20
18
21
check-format :
19
- black --check anomaly_detection/ tests/
22
+ black --check .
20
23
21
24
check-imports :
22
- isort --check-only anomaly_detection/ tests/
25
+ isort --check-only .
23
26
24
27
clean :
25
28
find . -type d -name " __pycache__" -exec rm -r {} +
32
35
find . -type d -name " .pytest_cache" -exec rm -r {} +
33
36
find . -type d -name " .coverage" -exec rm -r {} +
34
37
find . -type d -name " htmlcov" -exec rm -r {} +
35
- find . -type f -name " coverage.xml" -delete
38
+ find . -type f -name " coverage.xml" -delete
Original file line number Diff line number Diff line change 1
- numpy >= 1.21.0
2
- pandas >= 1.3.0
3
- scikit-learn >= 0.24.2
1
+ black >= 21.7b0
4
2
boto3 >= 1.26.0
5
3
fastapi >= 0.68.0
6
- uvicorn >= 0.15.0
4
+ flake8 >= 3.9.2
5
+ httpx >= 0.24.0
6
+ isort >= 5.9.3
7
+ numpy >= 1.21.0
8
+ pandas >= 1.3.0
9
+ pre-commit >= 3.6.0
7
10
python-dotenv >= 0.19.0
8
11
pytest >= 6.2.5
9
12
pytest-cov >= 2.12.1
10
- black >= 21.7b0
11
- isort >= 5.9.3
12
- flake8 >= 3.9.2
13
- httpx >= 0.24.0
13
+ scikit-learn >= 0.24.2
14
+ uvicorn >= 0.15.0
Original file line number Diff line number Diff line change 1
- from setuptools import setup , find_packages
1
+ from setuptools import find_packages , setup
2
2
3
3
setup (
4
4
name = "anomaly_detection" ,
16
16
"pytest-cov>=2.12.0" ,
17
17
],
18
18
python_requires = ">=3.8" ,
19
- )
19
+ )
You can’t perform that action at this time.
0 commit comments