Skip to content

Commit 7ef5fc9

Browse files
authored
Merge branch 'main' into abm3_v15.2.1
2 parents 94c84ad + 81121b7 commit 7ef5fc9

File tree

5 files changed

+1818
-42
lines changed

5 files changed

+1818
-42
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -14,64 +14,46 @@ env:
1414
jobs:
1515
foundation:
1616

17-
strategy:
18-
matrix:
19-
python-version: ["3.10"]
2017
defaults:
2118
run:
2219
shell: bash -l {0}
23-
name: linux-64-py${{ matrix.python-version }}
20+
name: linux-64
2421
runs-on: ubuntu-latest
2522
steps:
2623
# checkout the code in this repository
2724
- uses: actions/checkout@v4
25+
26+
- name: Install uv
27+
uses: astral-sh/setup-uv@v5
28+
with:
29+
version: "0.8.8"
30+
enable-cache: true
31+
cache-dependency-glob: "uv.lock"
32+
33+
- name: "Set up Python"
34+
uses: actions/setup-python@v5
2835
with:
29-
path: 'activitysim-sandag-abm3'
36+
python-version-file: ".python-version"
37+
38+
- name: Install everything
39+
run: |
40+
uv sync --locked
3041
3142
# checkout the main branch of ActivitySim itself
3243
- uses: actions/checkout@v4
3344
with:
3445
repository: 'ActivitySim/activitysim'
3546
ref: main
36-
path: 'activitysim'
47+
path: 'cloned/activitysim'
3748
fetch-depth: 0 # get all tags, lets setuptools_scm do its thing
3849

39-
- name: Setup Miniforge
40-
uses: conda-incubator/setup-miniconda@v3
41-
with:
42-
auto-update-conda: true
43-
miniforge-version: latest
44-
mamba-version: "2.0.5"
45-
conda-solver: classic
46-
conda-remove-defaults: true
47-
activate-environment: asim-test
48-
python-version: ${{ matrix.python-version }}
49-
50-
- name: Set cache date for year and month
51-
run: echo "DATE=$(date +'%Y%m')" >> $GITHUB_ENV
52-
53-
- uses: actions/cache@v4
54-
with:
55-
path: miniconda3/envs/asim-test
56-
key: linux-64-conda-${{ hashFiles('activitysim/conda-environments/github-actions-tests.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
57-
id: cache
58-
59-
- name: Update environment
50+
# install ActivitySim, overriding the one in the workspace,
51+
# as the pre-installed one is the latest release but not the most up-to-date
52+
- name: Install ActivitySim
6053
run: |
61-
conda env update -n asim-test -f activitysim/conda-environments/github-actions-tests.yml
62-
if: steps.cache.outputs.cache-hit != 'true'
54+
uv pip install --no-deps ./cloned/activitysim
6355
64-
- name: Install activitysim
65-
# installing without dependencies is faster, we trust that all needed dependencies
66-
# are in the conda environment defined above. Also, this avoids pip getting
67-
# confused and reinstalling tables (pytables).
68-
run: |
69-
python -m pip install ./activitysim --no-deps
70-
- name: Conda checkup
71-
run: |
72-
conda info -a
73-
conda list
7456
- name: Test this implementation
7557
run: |
76-
cd activitysim-sandag-abm3/test
77-
python -m pytest test_sandag_abm3.py::test_sandag_abm3_progressive
58+
uv run pytest ./test
59+

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.11

pyproject.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[project]
2+
name = "sandag-abm3-example"
3+
version = "1.4"
4+
description = "User environment for Prototype MTC Model"
5+
readme = "README.md"
6+
requires-python = ">=3.10,<3.12"
7+
dependencies = [
8+
"activitysim==1.4",
9+
"multimethod<2.0",
10+
"numba>=0.57",
11+
"numpy>=1.16.1,<1.26",
12+
"openmatrix>=0.3.5.0",
13+
"pandas>=2.1.0",
14+
"pandera>=0.15,<0.18.1",
15+
"psutil>=4.1",
16+
"pydantic>=2.6",
17+
"setuptools>=80.9.0,<81",
18+
"sharrow>=2.14.0",
19+
"tables>=3.9",
20+
]
21+
22+
[dependency-groups]
23+
dev = [
24+
"pytest>=8.4.1",
25+
"zstandard>=0.23.0",
26+
]

test/test_sandag_abm3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def test_sandag_abm3_progressive(use_sharrow):
124124
output_dir=out_dir,
125125
settings=settings,
126126
)
127-
state.import_extensions("../extensions")
127+
state.import_extensions("extensions")
128128
state.filesystem.persist_sharrow_cache()
129129
state.logging.config_logger()
130130

0 commit comments

Comments
 (0)