Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: enable codecov #69

Merged
merged 2 commits into from
Nov 1, 2023
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
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Comment on lines +12 to +14
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to make sure I understand, if we push a new commit on the same branch, this will cancel in progress workflows on the previous commit and then run the workflows on the new commit?

Copy link
Contributor Author

@tlambert03 tlambert03 Oct 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes sorry, should have commented on that. that's exactly right. it just saves CI time.
more here: https://docs.github.com/en/actions/using-jobs/using-concurrency#overview


jobs:
# check-manifest:
# runs-on: ubuntu-latest
Expand All @@ -22,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ["3.8", "3.9", "3.10", "3.11"]
platform: [ubuntu-latest, macos-latest, windows-latest]

steps:
Expand All @@ -35,17 +39,16 @@ jobs:
cache-dependency-path: "pyproject.toml"
cache: "pip"

# if running a cron job, we add the --pre flag to test against pre-releases
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -e .[test]

- name: Test
run: pytest --color=yes #--cov --cov-report=xml --cov-report=term-missing
run: pytest --color=yes --cov --cov-report=xml --cov-report=term-missing

# - name: Coverage
# uses: codecov/codecov-action@v3
- name: Coverage
uses: codecov/codecov-action@v3

benchmark:
name: Benchmark
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[![CI](https://github.com/Janelia-Trackathon-2023/traccuracy/actions/workflows/ci.yml/badge.svg)](https://github.com/Janelia-Trackathon-2023/traccuracy/actions/workflows/ci.yml)
[![Benchmarking](https://github.com/Janelia-Trackathon-2023/traccuracy/actions/workflows/benchmark-report.yml/badge.svg)](https://janelia-trackathon-2023.github.io/traccuracy/dev/bench/)
[![Documentation Status](https://readthedocs.org/projects/traccuracy/badge/?version=latest)](https://traccuracy.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/Janelia-Trackathon-2023/traccuracy/branch/main/graph/badge.svg)](https://codecov.io/gh/Janelia-Trackathon-2023/traccuracy)


`traccuracy` provides a suite of benchmarking functions that can be used to evaluate cell
Expand Down
23 changes: 12 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -167,17 +167,18 @@ pretty = true


# https://coverage.readthedocs.io/en/6.4/config.html
# [tool.coverage.report]
# exclude_lines = [
# "pragma: no cover",
# "if TYPE_CHECKING:",
# "@overload",
# "except ImportError",
# "\\.\\.\\.",
# "raise NotImplementedError()",
# ]
# [tool.coverage.run]
# source = ["src"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"@overload",
"except ImportError",
"\\.\\.\\.",
"raise NotImplementedError()",
"pass",
]
[tool.coverage.run]
source = ["traccuracy"]

# https://github.com/mgedmin/check-manifest#configuration
# [tool.check-manifest]
Expand Down
2 changes: 1 addition & 1 deletion src/traccuracy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

try:
__version__ = version("traccuracy")
except PackageNotFoundError:
except PackageNotFoundError: # pragma: no cover
cmalinmayor marked this conversation as resolved.
Show resolved Hide resolved
__version__ = "uninstalled"

from ._run_metrics import run_metrics
Expand Down