Refactor of template files #373
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test-suite | |
on: [push, pull_request] | |
jobs: | |
test-template-and-lint: | |
strategy: | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
architecture: 'x64' | |
- name: Install makita | |
run: | | |
pip install . | |
- name: Install ruff | |
run: | | |
pip install ruff | |
- name: set up environment | |
run: | | |
mkdir tmp | |
cd tmp | |
mkdir -p basic/data | |
mkdir -p basic/data-test | |
mkdir -p arfi/data | |
mkdir -p multimodel/data | |
cp ../.github/workflows/test_data/labels.csv basic/data/labels.csv | |
cp ../.github/workflows/test_data/labels.csv basic/data-test/labels.csv | |
cp ../.github/workflows/test_data/labels.csv arfi/data/labels.csv | |
cp ../.github/workflows/test_data/labels.csv multimodel/data/labels.csv | |
- name: Render makita templates | |
run: | | |
cd tmp/basic | |
asreview makita template basic | tee output.txt | |
asreview makita template basic --classifier nb --feature_extractor tfidf --query_strategy max --n_runs 1 -s data-test -o output-test --init_seed 1 --model_seed 2 --skip_wordclouds --overwrite --instances_per_query 2 --stop_if min --balance_strategy double | tee output.txt | |
grep -q "ERROR" output.txt && exit 1 || true | |
cd ../arfi | |
asreview makita template arfi | tee output.txt | |
grep -q "ERROR" output.txt && exit 1 || true | |
cd ../multimodel | |
asreview makita template multimodel | tee output.txt | |
grep -q "ERROR" output.txt && exit 1 || true | |
cd .. | |
- name: Run scitree on output | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
pip install scitree | |
cd tmp | |
scitree | |
- name: Run ShellCheck | |
if: ${{ matrix.os != 'windows-latest' }} | |
uses: ludeeus/action-shellcheck@master | |
with: | |
scandir: './tmp' | |
env: | |
SHELLCHECK_OPTS: -e SC2148 | |
- name: Generate makita scripts | |
run: | | |
asreview makita add-script --all | |
- name: Lint python with ruff | |
run: | | |
ruff check . | |
- name: Execute basic template jobs file | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
pip install asreview-datatools asreview-insights synergy-dataset | |
mkdir -p tmp/synergy/data | |
cd tmp/synergy | |
synergy_dataset get -d van_de_Schoot_2018 -o ./data -l | |
asreview makita template basic --instances_per_query 100 --no_wordclouds --overwrite --n_runs 2 | |
sh jobs.sh | |
scitree |