Skip to content

Commit ed327c6

Browse files
authored
Merge pull request #9 from camsys/extended-testing
GitHub Actions testing
2 parents e7e0737 + 4654af5 commit ed327c6

32 files changed

+277
-48876
lines changed

.github/workflows/ci.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Implementation Testing
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
pull_request:
8+
branches:
9+
- '*'
10+
11+
env:
12+
CACHE_NUMBER: 0 # increase to reset cache manually
13+
14+
jobs:
15+
foundation:
16+
17+
strategy:
18+
matrix:
19+
python-version: ["3.10"]
20+
defaults:
21+
run:
22+
shell: bash -l {0}
23+
name: linux-64-py${{ matrix.python-version }}
24+
runs-on: ubuntu-latest
25+
steps:
26+
# checkout the code in this repository
27+
- uses: actions/checkout@v4
28+
with:
29+
path: 'activitysim-prototype-mtc'
30+
31+
# checkout the main branch of ActivitySim itself
32+
- uses: actions/checkout@v4
33+
with:
34+
repository: 'ActivitySim/activitysim'
35+
ref: main
36+
path: 'activitysim'
37+
fetch-depth: 0 # get all tags, lets setuptools_scm do its thing
38+
39+
- name: Setup Mambaforge
40+
uses: conda-incubator/setup-miniconda@v3
41+
with:
42+
miniforge-variant: Mambaforge
43+
miniforge-version: latest
44+
activate-environment: asim-test
45+
use-mamba: true
46+
python-version: ${{ matrix.python-version }}
47+
48+
- name: Set cache date for year and month
49+
run: echo "DATE=$(date +'%Y%m')" >> $GITHUB_ENV
50+
51+
- uses: actions/cache@v4
52+
with:
53+
path: /usr/share/miniconda3/envs/asim-test
54+
key: linux-64-conda-${{ hashFiles('activitysim/conda-environments/github-actions-tests.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
55+
id: cache
56+
57+
- name: Update environment
58+
run: |
59+
mamba env update -n asim-test -f activitysim/conda-environments/github-actions-tests.yml
60+
if: steps.cache.outputs.cache-hit != 'true'
61+
62+
- name: Install activitysim
63+
# installing without dependencies is faster, we trust that all needed dependencies
64+
# are in the conda environment defined above. Also, this avoids pip getting
65+
# confused and reinstalling tables (pytables).
66+
run: |
67+
python -m pip install ./activitysim --no-deps
68+
69+
- name: Conda checkup
70+
run: |
71+
mamba info -a
72+
mamba list
73+
74+
- name: Test this implementation
75+
run: |
76+
python -m pytest activitysim-prototype-mtc/test

configs/network_los.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# read cached skims (using numpy memmap) from output directory (memmap is faster than omx )
22
read_skim_cache: False
33
# write memmapped cached skims to output directory after reading from omx, for use in subsequent runs
4-
write_skim_cache: True
4+
write_skim_cache: False
55

66
zone_system: 1
77
name: prototype_mtc
88

99
taz_skims:
1010
omx: skims.omx
11-
zarr: skims.zarr
11+
# zarr: skims.zarr
1212
zarr-digital-encoding:
1313
- regex: ".*_BOARDS"
1414
joint_dict: joined_board

configs/non_mandatory_tour_scheduling.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ SIMULATE_CHOOSER_COLUMNS:
1919
- num_escort_tours
2020
- num_non_escort_tours
2121
- adult
22+
23+
compute_settings:
24+
use_numexpr: True

configs/trip_scheduling.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ MAX_ITERATIONS: 100
1313
#FAILFIX: drop_and_cleanup
1414
FAILFIX: choose_most_initial
1515

16+
logic_version: 2

data/example_hwy_data.csv

Lines changed: 0 additions & 35497 deletions
This file was deleted.

data/example_hwy_data.parquet

971 KB
Binary file not shown.

data/households.csv

Lines changed: 0 additions & 5001 deletions
This file was deleted.

data/households.parquet

105 KB
Binary file not shown.

data/land_use.csv

Lines changed: 0 additions & 26 deletions
This file was deleted.

data/land_use.parquet

19.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)