Skip to content

Commit

Permalink
Merge pull request #9 from camsys/extended-testing
Browse files Browse the repository at this point in the history
GitHub Actions testing
  • Loading branch information
jpn-- authored Apr 23, 2024
2 parents e7e0737 + 4654af5 commit ed327c6
Show file tree
Hide file tree
Showing 32 changed files with 277 additions and 48,876 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Implementation Testing

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'

env:
CACHE_NUMBER: 0 # increase to reset cache manually

jobs:
foundation:

strategy:
matrix:
python-version: ["3.10"]
defaults:
run:
shell: bash -l {0}
name: linux-64-py${{ matrix.python-version }}
runs-on: ubuntu-latest
steps:
# checkout the code in this repository
- uses: actions/checkout@v4
with:
path: 'activitysim-prototype-mtc'

# checkout the main branch of ActivitySim itself
- uses: actions/checkout@v4
with:
repository: 'ActivitySim/activitysim'
ref: main
path: 'activitysim'
fetch-depth: 0 # get all tags, lets setuptools_scm do its thing

- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: asim-test
use-mamba: true
python-version: ${{ matrix.python-version }}

- name: Set cache date for year and month
run: echo "DATE=$(date +'%Y%m')" >> $GITHUB_ENV

- uses: actions/cache@v4
with:
path: /usr/share/miniconda3/envs/asim-test
key: linux-64-conda-${{ hashFiles('activitysim/conda-environments/github-actions-tests.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
id: cache

- name: Update environment
run: |
mamba env update -n asim-test -f activitysim/conda-environments/github-actions-tests.yml
if: steps.cache.outputs.cache-hit != 'true'

- name: Install activitysim
# installing without dependencies is faster, we trust that all needed dependencies
# are in the conda environment defined above. Also, this avoids pip getting
# confused and reinstalling tables (pytables).
run: |
python -m pip install ./activitysim --no-deps
- name: Conda checkup
run: |
mamba info -a
mamba list
- name: Test this implementation
run: |
python -m pytest activitysim-prototype-mtc/test
4 changes: 2 additions & 2 deletions configs/network_los.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# read cached skims (using numpy memmap) from output directory (memmap is faster than omx )
read_skim_cache: False
# write memmapped cached skims to output directory after reading from omx, for use in subsequent runs
write_skim_cache: True
write_skim_cache: False

zone_system: 1
name: prototype_mtc

taz_skims:
omx: skims.omx
zarr: skims.zarr
# zarr: skims.zarr
zarr-digital-encoding:
- regex: ".*_BOARDS"
joint_dict: joined_board
Expand Down
3 changes: 3 additions & 0 deletions configs/non_mandatory_tour_scheduling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ SIMULATE_CHOOSER_COLUMNS:
- num_escort_tours
- num_non_escort_tours
- adult

compute_settings:
use_numexpr: True
1 change: 1 addition & 0 deletions configs/trip_scheduling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ MAX_ITERATIONS: 100
#FAILFIX: drop_and_cleanup
FAILFIX: choose_most_initial

logic_version: 2
35,497 changes: 0 additions & 35,497 deletions data/example_hwy_data.csv

This file was deleted.

Binary file added data/example_hwy_data.parquet
Binary file not shown.
5,001 changes: 0 additions & 5,001 deletions data/households.csv

This file was deleted.

Binary file added data/households.parquet
Binary file not shown.
26 changes: 0 additions & 26 deletions data/land_use.csv

This file was deleted.

Binary file added data/land_use.parquet
Binary file not shown.
11 changes: 0 additions & 11 deletions data/override_hh_ids.csv

This file was deleted.

Binary file added data/override_hh_ids.parquet
Binary file not shown.
Loading

0 comments on commit ed327c6

Please sign in to comment.