diff --git a/.deepsource.toml b/.deepsource.toml index 2d0e342..2cf3b65 100644 --- a/.deepsource.toml +++ b/.deepsource.toml @@ -10,3 +10,7 @@ enabled = true runtime_version = "3.x.x" max_line_length = 127 skip_doc_coverage = ["magic", "init", "class", "module"] + +[[analyzers]] +name = "test-coverage" +enabled = true diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index de2dab1..cb253f6 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -43,11 +43,11 @@ jobs: run: | pip install . py.test --cov-report=xml --cov=plantcv tests/ - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + - name: Upload coverage to Deepsource + uses: deepsourcelabs/test-coverage-action@master with: - token: ${{ secrets.CODECOV_TOKEN }} - file: ./coverage.xml - flags: unittests - env_vars: OS,PYTHON - fail_ci_if_error: true + key: python + coverage-file: coverage.xml + dsn: ${{ secrets.DEEPSOURCE_DSN }} + env: + DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }} diff --git a/README.md b/README.md index 0349a18..e2f9966 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,13 @@ Geospatial add-on package to PlantCV [![builds](https://github.com/danforthcenter/plantcv-geospatial/actions/workflows/continuous-integration.yml/badge.svg?branch=main)](https://github.com/danforthcenter/plantcv-geospatial/actions/workflows/continuous-integration.yml) -[![codecov](https://codecov.io/gh/danforthcenter/plantcv-geospatial/graph/badge.svg?token=M9TBGYVXJ9)](https://codecov.io/gh/danforthcenter/plantcv-geospatial) +[![DeepSource](https://app.deepsource.com/gh/danforthcenter/plantcv-geospatial.svg/?label=code+coverage&show_trend=true&token=4ueUDDsEmz3YIs1UPNFPdk4r)](https://app.deepsource.com/gh/danforthcenter/plantcv-geospatial/) [![DeepSource](https://app.deepsource.com/gh/danforthcenter/plantcv-geospatial.svg/?label=active+issues&show_trend=true&token=4ueUDDsEmz3YIs1UPNFPdk4r)](https://app.deepsource.com/gh/danforthcenter/plantcv-geospatial/) ## Installation +Developers should set up a PlantCV conda environment from source code as normal, then: + ```bash cd plantcv-geospatial pip install -e .