Skip to content

Commit 81121b7

Browse files
authored
Merge pull request #33 from ActivitySim/pandas2
Updates for Pandas 2
2 parents b99b2e1 + e36e7da commit 81121b7

File tree

194 files changed

+1818
-40
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+1818
-40
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,62 +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 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: 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
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
5853
run: |
59-
mamba env update -n asim-test -f activitysim/conda-environments/github-actions-tests.yml
60-
if: steps.cache.outputs.cache-hit != 'true'
54+
uv pip install --no-deps ./cloned/activitysim
6155
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-
- name: Conda checkup
69-
run: |
70-
mamba info -a
71-
mamba list
7256
- name: Test this implementation
7357
run: |
74-
cd activitysim-sandag-abm3/test
75-
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+
]
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)