Skip to content

Commit 86bd7e3

Browse files
authored
Unparallel Runner (#65)
* test activitysim canonical examples * optional unparallel runner and dotter have their own settings, so the user can adjust parallelization for complexity. * test sequencing * array_maker * test array_maker * add use_array_maker to docs * add array maker to doc test
1 parent c18481c commit 86bd7e3

File tree

4 files changed

+434
-135
lines changed

4 files changed

+434
-135
lines changed

.github/workflows/run-tests.yml

Lines changed: 87 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ jobs:
8484
- name: Install Python and Dependencies
8585
uses: conda-incubator/setup-miniconda@v3
8686
with:
87-
miniforge-variant: Mambaforge
8887
miniforge-version: latest
89-
use-mamba: true
9088
environment-file: envs/testing.yml
9189
python-version: ${{ matrix.python-version }}
9290
activate-environment: testing-env
@@ -169,3 +167,90 @@ jobs:
169167
with:
170168
user: __token__
171169
password: ${{ secrets.PYPI_API_TOKEN }}
170+
activitysim-examples:
171+
# test that updates to sharrow will not break the activitysim canonical examples
172+
needs: fmt
173+
env:
174+
python-version: "3.10"
175+
label: linux-64
176+
strategy:
177+
matrix:
178+
include:
179+
- region: ActivitySim 1-Zone Example (MTC)
180+
region-org: ActivitySim
181+
region-repo: activitysim-prototype-mtc
182+
region-branch: extended
183+
- region: ActivitySim 2-Zone Example (SANDAG)
184+
region-org: ActivitySim
185+
region-repo: sandag-abm3-example
186+
region-branch: main
187+
fail-fast: false
188+
defaults:
189+
run:
190+
shell: bash -l {0}
191+
name: ${{ matrix.region }}
192+
runs-on: ubuntu-latest
193+
steps:
194+
- name: Checkout Sharrow
195+
uses: actions/checkout@v4
196+
with:
197+
path: 'sharrow'
198+
199+
- name: Checkout ActivitySim
200+
uses: actions/checkout@v4
201+
with:
202+
repository: 'ActivitySim/activitysim'
203+
ref: 'main'
204+
path: 'activitysim'
205+
206+
- name: Setup Miniforge
207+
uses: conda-incubator/setup-miniconda@v3
208+
with:
209+
miniforge-version: latest
210+
activate-environment: asim-test
211+
python-version: ${{ env.python-version }}
212+
213+
- name: Set cache date for year and month
214+
run: echo "DATE=$(date +'%Y%m')" >> $GITHUB_ENV
215+
216+
- uses: actions/cache@v4
217+
with:
218+
path: |
219+
${{ env.CONDA }}/envs
220+
~/.cache/ActivitySim
221+
key: ${{ env.label }}-conda-${{ hashFiles('activitysim/conda-environments/github-actions-tests.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
222+
id: cache
223+
224+
- name: Update environment
225+
run: |
226+
conda env update -n asim-test -f activitysim/conda-environments/github-actions-tests.yml
227+
if: steps.cache.outputs.cache-hit != 'true'
228+
229+
- name: Install sharrow
230+
# installing from source
231+
run: |
232+
python -m pip install ./sharrow
233+
234+
- name: Install activitysim
235+
# installing without dependencies is faster, we trust that all needed dependencies
236+
# are in the conda environment defined above. Also, this avoids pip getting
237+
# confused and reinstalling tables (pytables).
238+
run: |
239+
python -m pip install ./activitysim --no-deps
240+
241+
- name: Conda checkup
242+
run: |
243+
conda info -a
244+
conda list
245+
246+
- name: Checkout Example
247+
uses: actions/checkout@v4
248+
with:
249+
repository: '${{ matrix.region-org }}/${{ matrix.region-repo }}'
250+
ref: '${{ matrix.region-branch }}'
251+
path: '${{ matrix.region-repo }}'
252+
253+
- name: Test ${{ matrix.region }}
254+
run: |
255+
cd ${{ matrix.region-repo }}/test
256+
python -m pytest .

0 commit comments

Comments
 (0)