From 0aae1b26ac17b476a05dd94521d5637df20d6f47 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Mon, 30 Oct 2023 16:39:25 -0400 Subject: [PATCH 1/2] test: enable testing --- .github/workflows/ci.yml | 13 ++++++++----- pyproject.toml | 23 ++++++++++++----------- src/traccuracy/__init__.py | 2 +- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 11705e57..3acb21f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,10 @@ on: pull_request: workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: # check-manifest: # runs-on: ubuntu-latest @@ -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: @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 1b086a50..f627818f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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] diff --git a/src/traccuracy/__init__.py b/src/traccuracy/__init__.py index fc04c365..6fbbeeb8 100644 --- a/src/traccuracy/__init__.py +++ b/src/traccuracy/__init__.py @@ -3,7 +3,7 @@ try: __version__ = version("traccuracy") -except PackageNotFoundError: +except PackageNotFoundError: # pragma: no cover __version__ = "uninstalled" from ._run_metrics import run_metrics From 681fb938b5c6cb9ae322f85497e8462c6760ff21 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Mon, 30 Oct 2023 17:06:08 -0400 Subject: [PATCH 2/2] add badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b32b0c0e..a0deab32 100644 --- a/README.md +++ b/README.md @@ -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