Skip to content

Commit

Permalink
Adding in CI (#25)
Browse files Browse the repository at this point in the history
* added install workflow
* update lock file, fix python versions
* lock numpy to 1.26.4
* add status badge
  • Loading branch information
bendhouseart authored Dec 9, 2024
1 parent 2fb1329 commit f26bd10
Show file tree
Hide file tree
Showing 5 changed files with 250 additions and 140 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/build-package-install.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build and Install

on:
push:
branches:
- '**'

jobs:
build-install:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11"]

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Check python3 == python${{ matrix.python-version }}
run: |
installed_python=$(python3 --version)
echo "Installed Python: $installed_python"
if [[ "$installed_python" != *"${{ matrix.python-version }}"* ]]; then
echo "Python version mismatch. Expected: ${{ matrix.python-version }}, but got: $installed_python"
exit 1
else
echo "${{ matrix.python-version }}"
fi
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
run: |
python3 -m pip install setuptools
poetry install --with dev
- name: Package with Poetry
run: |
# clear out dist folder first
rm -rf dist
poetry build
- name: Install Built Package
run: |
python3 -m pip install dist/*.whl
- name: Test Installation
run: |
petprep_extract_tacs --version
merge_tacs --help
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,10 @@ dockerbuild:
dockerpush: dockerbuild
docker push openneuropet/$(shell cat pyproject.toml | grep name | cut -d '"' -f 2):$(shell cat pyproject.toml | grep version | head -n 1 | cut -d '"' -f 2)
docker push openneuropet/$(shell cat pyproject.toml | grep name | cut -d '"' -f 2):latest

# runs github actions ci locally using nektos/act
# needs to be installed with brew install act on mac
# install instructions for other platforms can be found here:
# https://nektosact.com/installation/index.html
ci:
act push
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# BIDS App for PETPrep Extract Time Activity Curves Workflow

---

[![Build and Install](https://github.com/mnoergaard/petprep_extract_tacs/actions/workflows/build-package-install.yaml/badge.svg)](https://github.com/mnoergaard/petprep_extract_tacs/actions/workflows/build-package-install.yaml)

## Overview

This BIDS App is designed to extract time activity curves (TACs) from PET data. The workflow has options to extract TACs from different regions of the brain, and it uses the Brain Imaging Data Structure (BIDS) standard for organizing and describing the data. This README will guide you through how to use the app and the various options available. The workflow requires that freesurfer's recon-all was already executed for these subjects, and exist as a 'freesurfer' directory inside the derivatives directory for the given BIDS dataset.
Expand Down
Loading

0 comments on commit f26bd10

Please sign in to comment.