Skip to content

Update .readthedocs.yml #120

Update .readthedocs.yml

Update .readthedocs.yml #120

Workflow file for this run

name: Unit test
on:
push:
branches: [master, development]
pull_request:
branches: [master]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [3.7]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install -r requirements.txt
- name: Additional dependency for MaxOSX for XGBoost
run: |
brew install libomp
if: matrix.os == 'macos-latest'
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=WORC_config.py
# exit-zero treats all errors as warnings.
flake8 . --count --exit-zero --statistics --max-line-length=1000 --exclude=WORC_config.py,*elastixtools*
- name: Install WORC package itself
run: python setup.py -q install
- name: Clone the WORC Tutorial and run as test
run: |
git clone --single-branch --branch develop https://github.com/MStarmans91/WORCTutorial
python WORCTutorial/WORCTutorialSimple.py
env:
WORCDEBUG: true
- name: Debugging on Linux
run: |
fastr trace /tmp/WORC_Example_STWStrategyHN/__sink_data__.json --sinks features_train_CT_0_predict --samples HN1331
fastr trace /tmp/WORC_Example_STWStrategyHN/__sink_data__.json --sinks classification --samples all
fastr trace /tmp/WORC_Example_STWStrategyHN/__sink_data__.json --sinks performance --samples all
fastr trace /tmp/GS/DEBUG_0/tmp/__sink_data__.json --sinks output --samples id_0__0000__0000
if: matrix.os == 'ubuntu-latest'
- name: Debugging on Windows
run: |
fastr trace "C:\Users\RUNNER~1\AppData\Local\Temp\WORC_Example_STWStrategyHN\__sink_data__.json" --sinks features_train_CT_0_predict --samples HN1331
fastr trace "C:\Users\RUNNER~1\AppData\Local\Temp\WORC_Example_STWStrategyHN\__sink_data__.json" --sinks classification --samples all
fastr trace "C:\Users\RUNNER~1\AppData\Local\Temp\WORC_Example_STWStrategyHN\__sink_data__.json" --sinks performance --samples all
fastr trace "C:\Users\RUNNER~1\AppData\Local\Temp\GS\DEBUG_0\tmp\__sink_data__.json" --sinks output --samples id_0__0000__0000
if: matrix.os == 'windows-latest'
- name: Debugging on MaxOSX
run: |
fastr trace WORCTutorial/WORC_Example_STWStrategyHN/__sink_data__.json --sinks features_train_CT_0_predict --samples HN1331
fastr trace WORCTutorial/WORC_Example_STWStrategyHN/__sink_data__.json --sinks classification --samples all
fastr trace WORCTutorial/WORC_Example_STWStrategyHN/__sink_data__.json --sinks performance --samples all
fastr trace WORCTutorial/GS/DEBUG_0/tmp/__sink_data__.json --sinks output --samples id_0__0000__0000
if: matrix.os == 'macos-latest'
- name: Run additional test for regression on Linux
run: |
rm -r /tmp/GS/DEBUG_0
python WORC/tests/WORCTutorialSimple_unittest_regression.py
fastr trace /tmp/WORC_Example_STWStrategyHN_Regression/__sink_data__.json --sinks classification --samples all
fastr trace /tmp/WORC_Example_STWStrategyHN_Regression/__sink_data__.json --sinks performance --samples all
fastr trace /tmp/GS/DEBUG_0/tmp/__sink_data__.json --sinks output --samples id_0__0000__0000
env:
WORCDEBUG: true
if: matrix.os == 'ubuntu-latest'
- name: Run additional tests for multiclass on Linux
run: |
rm -r /tmp/GS/DEBUG_0
python WORC/tests/WORCTutorialSimple_unittest_multiclass.py
fastr trace /tmp/WORC_Example_STWStrategyHN_Multiclass/__sink_data__.json --sinks classification --samples all
fastr trace /tmp/WORC_Example_STWStrategyHN_Multiclass/__sink_data__.json --sinks performance --samples all
fastr trace /tmp/GS/DEBUG_0/tmp/__sink_data__.json --sinks output --samples id_0__0000__0000
env:
WORCDEBUG: true
if: matrix.os == 'ubuntu-latest'