Skip to content

Commit

Permalink
Merge pull request #892 from AlexVCaron/feat/github_runner
Browse files Browse the repository at this point in the history
[WIP] Kill Jenkins
  • Loading branch information
arnaudbore authored Feb 7, 2024
2 parents 5dcf990 + 6507f4f commit d9736d9
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 154 deletions.
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
70 changes: 70 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Scilpy test suite

on:
push:
branches:
- master
pull_request_target:
branches:
- master

env:
MPLBACKEND: agg
OPENBLAS_NUM_THREADS: 1

jobs:
test:
runs-on: scilus-runners
steps:
- name: Checkout repository
uses: actions/[email protected]

- 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@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
flags: unittests
name: scilpy-unittests-${{ github.run_id }}
verbose: true
directory: .test_reports/
fail_ci_if_error: true
root_dir: $GITHUB_WORKSPACE/scilpy/

- name: Upload test reports and coverage to artifacts
uses: actions/[email protected]
with:
name: test-reports
path: |
.test_reports/*
121 changes: 0 additions & 121 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
7 changes: 3 additions & 4 deletions scripts/scil_tractogram_filter_by_anatomy.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
import json
import logging
import os
import pkg_resources
import importlib.resources as resources

from dipy.io.streamline import save_tractogram
from dipy.io.utils import is_header_compatible
Expand Down Expand Up @@ -142,9 +142,8 @@ def load_wmparc_labels():
Load labels dictionary of different parcellations from the
Desikan-Killiany atlas
"""
resource_package = pkg_resources.get_distribution('scilpy').location
labels_path = os.path.join(
resource_package, 'data/LUT/dk_aggregate_structures.json')
lut_package = resources.files('data').joinpath('LUT')
labels_path = lut_package.joinpath('dk_aggregate_structures.json')
with open(labels_path) as labels_file:
labels = json.load(labels_file)
return labels
Expand Down

0 comments on commit d9736d9

Please sign in to comment.