Skip to content

Commit

Permalink
add coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Witteck committed Oct 24, 2024
1 parent 7091358 commit 3682934
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 4 deletions.
Binary file removed .DS_Store
Binary file not shown.
6 changes: 4 additions & 2 deletions .github/workflows/tomlproject.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ jobs:
# Lint with Ruff
# - name: Lint with Ruff
# run: |
# ruff check . --statistics # Lint the code using Ruff
# ruff check . --statistics

# Run pyest
- name: Run Tests
run: |
pytest
pytest --cov=pvcircuit
coverage xml
coverage html
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Python Tests](https://github.com/NREL/PVcircuit/actions/workflows/tomlproject.yml/badge.svg?branch=master)](https://github.com/NREL/PVcircuit/actions/workflows/tomlproject.yml)

# pvcircuit
*pvcircuit* contains objects that are building blocks for PV modeling and interactive data fitting.

Expand Down
24 changes: 22 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,14 @@ dev = [
"check-manifest",
"coverage",
"pytest",
"pytest-cov",
"ruff",

]
test = [
"check-manifest",
"coverage",
"pytest"
"pytest",
"pytest-cov",
]

# List URLs that are relevant to your project
Expand Down Expand Up @@ -198,3 +199,22 @@ ignore = [
"F401", # Ignore unused imports
# "F841", # Ignore unused variables
]

[tool.pytest.ini_options]
# Specify directories to ignore during testing
norecursedirs = ["Share", "notebooks", "images", "data"]

[tool.coverage.run]
branch = true
source = ["pvcircuit"]
omit = [
"tests/*",
"Share/*",
"notebooks/*",
"images/*",
"data/*",
"pvcircuit/PlotWithControls.py",
]

[tool.coverage.report]
show_missing = false
Empty file added tests/__init__.py
Empty file.

0 comments on commit 3682934

Please sign in to comment.