Skip to content

Commit

Permalink
Merge branch 'master' of github.com:scilus/scilpy into compare_tracto…
Browse files Browse the repository at this point in the history
…gram_big
  • Loading branch information
frheault committed Feb 19, 2024
2 parents d674e17 + 065a43a commit 9fe6f9e
Show file tree
Hide file tree
Showing 27 changed files with 434 additions and 399 deletions.
14 changes: 10 additions & 4 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[run]
branch = True
concurrency = multiprocessing
data_file = .test_reports/.coverage
source =
scilpy/
scripts/
data_file = .coverage
source_pkgs =
scilpy
scripts
relative_files = True
omit =
scripts/tests/*.py
scilpy/tests/**/*.py
Expand All @@ -15,6 +16,11 @@ omit =

[report]
skip_empty = True
skip_covered = True

[html]
title = Scilpy Coverage Report
directory = .test_reports/coverage.html

[xml]
output = .test_reports/coverage.xml
28 changes: 0 additions & 28 deletions .github/workflows/build.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/freeze_requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
freeze_requirements:
runs-on: ubuntu-latest
runs-on: scilus-runners
steps:
-
name: Checkout scilpy
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Scilpy test suite

on:
push:
branches:
- master
pull_request:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
MPLBACKEND: agg
OPENBLAS_NUM_THREADS: 1

jobs:
test:
runs-on: scilus-runners
if: github.repository == 'scilus/scilpy'
steps:
- name: Checkout repository for merge
uses: actions/checkout@v4

- name: Fetch python version from repository
id: python-selector
run: echo "python-version=$(cat .python-version)" >> $GITHUB_OUTPUT

- name: Set up Python for Scilpy
uses: actions/[email protected]
with:
python-version: ${{ steps.python-selector.outputs.python-version }}
cache: 'pip'

- name: Install non-python dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
curl \
git \
libblas-dev \
liblapack-dev \
libfreetype6-dev
- name: Install Scilpy
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e .
- name: Run tests
run: |
export C_INCLUDE_PATH=$pythonLocation/include/python${{ steps.python-selector.outputs.python-version }}:$C_INCLUDE_PATH
pytest --cov-report term-missing:skip-covered
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
name: scilpy-unittests-${{ github.run_id }}
verbose: true
fail_ci_if_error: true
plugin: pycoverage

- name: Upload test reports and coverage to artifacts
uses: actions/[email protected]
with:
name: test-reports
path: |
.test_reports/*
114 changes: 0 additions & 114 deletions Jenkinsfile

This file was deleted.

1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ include LICENSE
include requirements.txt
include .python-version

recursive-include data/LUT *
recursive-include scilpy *.c
recursive-include scilpy *.cpp
recursive-include scilpy *.pyx
34 changes: 34 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
codecov:
allow_coverage_offsets: True

coverage:
status:
project:
default:
target: 75%
threshold: 2%
branches:
- master
if_ci_failed: error
only_pulls: false
patch:
default:
target: 90%
branches:
- master
if_ci_failed: error
only_pulls: false

component_management:
individual_components:
- component_id: scilpy_scripts
name: Scripts
paths:
- scripts/
- component_id: scilpy_library
name: Library
paths:
- scilpy/

comment:
layout: "condensed_header, diff, components"
7 changes: 3 additions & 4 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ junit_logging = out-err

addopts =
--html=.test_reports/pytest.html
--cov-report=html:.test_reports/coverage.html
--junit-xml=.test_reports/junit.xml
--cov-report=xml:.test_reports/coverage.xml
--cov=scilpy/
--cov=scripts/
--cov
--cov-report html
--cov-report xml
Loading

0 comments on commit 9fe6f9e

Please sign in to comment.