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:
2222 - name : Install dependencies
2323 run : |
2424 python -m pip install --upgrade pip
25+ pip install -r requirements.txt
2526 pip install -e .
26- pip install pytest pytest-cov black isort
2727
2828 - name : Check formatting with black
2929 run : |
30- black --check anomaly_detection/ tests/
30+ black --check .
3131
3232 - name : Check import sorting with isort
3333 run : |
34- isort --check-only anomaly_detection/ tests/
34+ isort --check-only .
3535
3636 - name : Run tests with coverage
3737 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
22
33install :
44 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
69
710test :
811 pytest tests/ --cov=anomaly_detection --cov-report=term-missing -v
912
1013lint :
11- black --check anomaly_detection/ tests/
12- isort --check-only anomaly_detection/ tests/
14+ black --check .
15+ isort --check-only .
1316
1417format :
15- black anomaly_detection/ tests/
16- isort anomaly_detection/ tests/
18+ black .
19+ isort .
1720
1821check-format :
19- black --check anomaly_detection/ tests/
22+ black --check .
2023
2124check-imports :
22- isort --check-only anomaly_detection/ tests/
25+ isort --check-only .
2326
2427clean :
2528 find . -type d -name " __pycache__" -exec rm -r {} +
3235 find . -type d -name " .pytest_cache" -exec rm -r {} +
3336 find . -type d -name " .coverage" -exec rm -r {} +
3437 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
42boto3 >= 1.26.0
53fastapi >= 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
710python-dotenv >= 0.19.0
811pytest >= 6.2.5
912pytest-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
22
33setup (
44 name = "anomaly_detection" ,
1616 "pytest-cov>=2.12.0" ,
1717 ],
1818 python_requires = ">=3.8" ,
19- )
19+ )
You can’t perform that action at this time.
0 commit comments