Skip to content

Commit

Permalink
fix coverage command
Browse files Browse the repository at this point in the history
  • Loading branch information
guidopetri committed Apr 21, 2024
1 parent a0bab0f commit fa7271d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ chess_pipeline.egg-info/
!**/plots/.keep
.luigi_env
.postgres_env
coverage.json
cov_html/
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,18 @@ ci-pytest:
pytest: build-dev ci-pytest

ci-coverage:
docker rm chess_pipeline_dev_coverage || true
docker compose run \
--rm \
--entrypoint=pytest \
--name chess_pipeline_dev_coverage \
chess_pipeline_dev \
-vv \
--cov=src/ \
--cov=/app \
--cov-report term \
--cov-report json:coverage.json \
--cov-report html:cov_html
--cov-report json:/coverage.json \
--cov-report html:/cov_html
docker cp chess_pipeline_dev_coverage:/coverage.json .
docker cp chess_pipeline_dev_coverage:/cov_html .


coverage: build-dev ci-coverage
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ inline-quotes = "single"
[tool.ruff.lint]
select = ["E", "F", "W", "Q", "I"]
preview = true

[tool.coverage.run]
omit = ["/app/tests/*"]
4 changes: 1 addition & 3 deletions src/chess_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
HashableDict,
TransactionFactTable,
)
from pipeline_import.transforms import (
transform_game_data,
)
from pipeline_import.transforms import transform_game_data
from vendors.lichess import fetch_lichess_api_json, fetch_lichess_api_pgn
from vendors.stockfish import get_evals

Expand Down

0 comments on commit fa7271d

Please sign in to comment.