Skip to content

Commit

Permalink
Test coverage reports (#172)
Browse files Browse the repository at this point in the history
* add how to run tests
* add pytest coverage map
  • Loading branch information
jbloomAus authored Feb 19, 2023
1 parent 4748e9c commit 82d423a
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Install dependencies
run: poetry install --with dev
- name: Pytest
run: poetry run pytest
run: poetry run pytest -v --cov=transformer_lens/ --cov-report=term-missing transformer_lens/tests/
# - name: Type check
# run: poetry run mypy transformer_lens
- name: Build check
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ _modidx.py
.ipynb_checkpoints
env
dist/
.coverage
88 changes: 87 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ rich = "^12.6.0"

[tool.poetry.group.dev.dependencies]
pytest = "^7.2.0"
pytest-cov = "^4.0.0"
mypy = "^0.991"
jupyter = "^1.0.0"
circuitsvis = "^1.38.1"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
"torchtyping",
"rich",
],
extras_require={"dev": ["pytest", "mypy"]},
extras_require={"dev": ["pytest", "mypy", "pytest-cov"]},
)

0 comments on commit 82d423a

Please sign in to comment.