Skip to content

add bash script to merge csvs #64

add bash script to merge csvs

add bash script to merge csvs #64

name: Download dataset
on:
push:
branches:
- nk/add-post-training-script-to-compute-csa
# release:
# types: [published]
jobs:
run_dataset_download:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Python 3
uses: actions/setup-python@v4
with:
# python-version: 3.9.16
python-version: 3.8.18
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# pip install -r requirements.txt
# https://github.com/spinalcordtoolbox/spinalcordtoolbox/blob/master/.ci.sh
- name: Install SCT
run: |
# source python/etc/profile.d/conda.sh >> $GITHUB_ENV
git clone https://github.com/spinalcordtoolbox/spinalcordtoolbox.git
cd spinalcordtoolbox
./.ci.sh -i
# NB: install_sct edits ~/.bashrc, but those environment changes don't get passed to subsequent steps in GH Actions.
# So, we filter through the .bashrc and pass the values to $GITHUB_ENV and $GITHUB_PATH.
# Relevant documentation: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#environment-files
cat ~/.bashrc | grep "export SCT_DIR" | cut -d " " -f 2 >> $GITHUB_ENV
cat ~/.bashrc | grep "export PATH" | grep -o "/.*" | cut -d ':' -f 1 >> $GITHUB_PATH
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: '3.9.16'
# - name: Install dependencies
# run: |
# conda install -y git-annex
# - name: Ensure git-annex is accessible via git
# run: |
# echo "$(conda info --base)/bin" >> $GITHUB_PATH
# export PATH="$(conda info --base)/bin:$PATH"
# which git-annex
# git-annex version
- name: Configure Git identity
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
# - name: Run dataset setup script
# shell: bash -l {0} # Ensures the Conda environment is properly loaded
# run: |
# chmod +x scripts/compute_morphometrics_spine_generic.sh
# source scripts/compute_morphometrics_spine_generic.sh
# - name: Run model script
# run: ./scripts/run_model.sh