Skip to content

Run surveys with dask #156

Run surveys with dask

Run surveys with dask #156

Workflow file for this run

name: Test
on:
push: { branches: [ "master" ] }
pull_request: { branches: [ "master" ] }
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
jobs:
test-flatsurvey:
runs-on: ${{ matrix.on }}
strategy:
matrix:
include:
- on: ubuntu-20.04
python: "3.9"
steps:
- uses: actions/checkout@v2
with: { submodules: recursive }
- uses: conda-incubator/setup-miniconda@v3
with:
environment-file: environment.yml
miniforge-version: latest
- name: install flatsurvey
shell: bash -el {0}
run: |
pip install -e .
- name: doctest
shell: bash -el {0}
run: |
# Make sure that initialization message does not show up in doctest output.
python -c 'import cppyy'
pytest -n auto -x --doctest-modules flatsurvey
- name: run survey
shell: bash -el {0}
run: |
flatsurvey orbit-closure ngons --vertices 3 --limit 7 json
- name: build cache database from previous run
shell: bash -el {0}
run: |
# Shrink cache files by externalizing the referenced surfaces.
mkdir -p pickles
flatsurvey-maintenance externalize-pickles --pickles pickles/ *.json
# Creata single cache file from the runs.
flatsurvey-maintenance join *.json
cat orbit-closure.json
- name: run survey from cache
shell: bash -el {0}
run: |
# The survey succeeds with the cache enabled.
flatsurvey orbit-closure ngons --vertices 3 --limit 7 local-cache --json orbit-closure.json log
# The survey succeeds without running any computations.
flatsurvey orbit-closure --cache-only ngons --vertices 3 --limit 7 local-cache --json orbit-closure.json log