Update ASReview Makita from 0.10.x to 1.0.x #540
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: [windows-latest, ubuntu-latest] | |
python-version: ['3.8', '3.12'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: 'x64' | |
- name: Cache Python packages | |
uses: actions/cache@v4 | |
with: | |
path: | | |
${{ runner.os == 'Windows' && 'C:\users\runneradmin\appdata\local\pip\cache' || '~/.cache/pip' }} | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
pip install . ruff scitree asreview-datatools asreview-insights synergy-dataset | |
- name: Lint python with ruff | |
run: | | |
ruff check . | |
- name: Render makita templates | |
run: | | |
asreview makita template basic -p basic -d .github/workflows/test_data/ --classifier nb --feature_extractor tfidf --query_strategy max --n_runs 1 --init_seed 1 --model_seed 2 --skip_wordclouds --overwrite --instances_per_query 2 --stop_if min --balance_strategy double | tee output_basic.txt | |
grep -q "ERROR" output_basic.txt && exit 1 || true | |
asreview makita template arfi -p arfi -d .github/workflows/test_data/ | tee output_arfi.txt | |
grep -q "ERROR" output_arfi.txt && exit 1 || true | |
asreview makita template prior -p prior -d .github/workflows/test_data/ | tee output_prior.txt | |
grep -q "ERROR" output_prior.txt && exit 1 || true | |
asreview makita template multimodel -p multimodel -d .github/workflows/test_data/ | tee output_multimodel.txt | |
grep -q "ERROR" output_multimodel.txt && exit 1 || true | |
- name: Render makita scripts | |
run: | | |
asreview makita add-script --all -o ./tmp/scripts | tee output_scripts.txt | |
grep -q "ERROR" output_scripts.txt && exit 1 || true | |
- name: Run SciTree | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: | | |
cd ./tmp/ | |
scitree | |
- name: Execute basic template jobs file | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: | | |
mkdir basic_run | |
cd basic_run | |
asreview makita template basic -d ../.github/workflows/test_data/ --instances_per_query 100 --skip_wordclouds --overwrite --n_runs 1 | |
scitree | |
sh jobs.sh | |
scitree | |
- name: Upload output files | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: output-files | |
path: | | |
output_basic.txt | |
output_arfi.txt | |
output_prior.txt | |
output_multimodel.txt | |
output_scripts.txt |