Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .coveragerc

This file was deleted.

12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@
name: CI

on:
create:
push:
branches: ["main", "develop"]
pull_request:

jobs:
branch-create-debug:
if: github.event_name == 'create' && github.event.ref_type == 'branch'
runs-on: ubuntu-latest

steps:
- name: Log created branch
run: echo "Created branch ${{ github.event.ref }} from ${{ github.repository }}"

test:
runs-on: ubuntu-latest

Expand Down Expand Up @@ -60,7 +68,7 @@ jobs:
run: black --check .

- name: Run tests with coverage
run: pytest --cov=. --cov-report=term-missing --cov-report=xml --cov-fail-under=85 -q
run: pytest -q

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ test:
$(WEB) pytest -q

test-cov:
$(WEB) pytest -q --cov=. --cov-report=term-missing --cov-report=xml --cov-fail-under=85
$(WEB) pytest -q

lint:
$(PY) -m ruff check .
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ docker compose exec -T web python manage.py retrain_baseline_model --seed 7 --ro
├── docker-compose.yml
├── manage.py
├── pyproject.toml
├── pytest.ini
└── web/
```

Expand Down
22 changes: 20 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,35 @@
[tool.black]
line-length = 100
target-version = ["py312"]
extend-exclude = '''
/(
migrations
)/
'''

[tool.ruff]
line-length = 100
target-version = "py312"
exclude = ["migrations"]
extend-exclude = ["**/migrations/*.py"]

[tool.ruff.lint]
select = ["E", "F", "I", "B", "UP", "DJ"]

[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "config.settings.test"
python_files = ["tests.py", "test_*.py", "*_tests.py"]
addopts = "--strict-markers --disable-warnings"
addopts = "--strict-markers --disable-warnings --cov --cov-report=term-missing --cov-report=xml --no-cov-on-fail"
testpaths = ["tests"]

[tool.coverage.run]
branch = true
source = ["accounts", "analytics", "api", "common", "config", "console", "core", "ml", "returns", "ui", "web"]

[tool.coverage.report]
fail_under = 85
show_missing = true
skip_covered = false
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
]
5 changes: 0 additions & 5 deletions pytest.ini

This file was deleted.

Loading