Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 27 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ jobs:
defaults:
run:
shell: bash -l {0}
name: linux-64
name: linux-64 (${{ matrix.dependencies }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dependencies: [releases, main]
steps:
# checkout the code in this repository
- uses: actions/checkout@v4
Expand All @@ -39,20 +43,32 @@ jobs:
run: |
uv sync --locked

# checkout the main branch of ActivitySim itself
- uses: actions/checkout@v4
- name: Check out ActivitySim main
if: matrix.dependencies == 'main'
uses: actions/checkout@v4
with:
repository: 'ActivitySim/activitysim'
repository: ActivitySim/activitysim
ref: main
path: 'cloned/activitysim'
fetch-depth: 0 # get all tags, lets setuptools_scm do its thing
path: cloned/activitysim
fetch-depth: 0

# install ActivitySim, overriding the one in the workspace,
# as the pre-installed one is the latest release but not the most up-to-date
- name: Install ActivitySim
- name: Check out Sharrow main
if: matrix.dependencies == 'main'
uses: actions/checkout@v4
with:
repository: ActivitySim/sharrow
ref: main
path: cloned/sharrow
fetch-depth: 0

- name: Install ActivitySim and Sharrow main
if: matrix.dependencies == 'main'
run: |
uv pip uninstall activitysim
uv pip install --no-deps ./cloned/activitysim
uv pip install --reinstall-package activitysim --reinstall-package sharrow \
./cloned/activitysim ./cloned/sharrow

- name: Report dependency versions
run: uv pip show activitysim sharrow

- name: Test this implementation
run: |
Expand Down
3 changes: 3 additions & 0 deletions configs/resident/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ output_tables:
TAZ: land_use_taz.TAZ
- disaggregate_accessibility


check_model_settings: True

models:
### mp_init_proto_pop (single process)
- initialize_proto_population # Separate step so proto tables can be split for multiprocess.
Expand Down
4 changes: 3 additions & 1 deletion configs/resident/settings_mp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ memory_profile: False
# (Shadow pricing requires fail_fast setting in multiprocessing mode)
fail_fast: True

resume_after:
resume_after:

check_model_settings: True

models:
### mp_init_proto_pop (single process)
Expand Down
1 change: 1 addition & 0 deletions extensions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
from . import transponder_ownership
from . import airport_returns
from . import adjust_auto_operating_cost
from . import settings_checker
60 changes: 60 additions & 0 deletions extensions/settings_checker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
from .av_ownership import AVOwnershipSettings
from .external_identification import ExternalIdentificationSettings
from .transponder_ownership import TransponderOwnershipSettings

from activitysim.core.configuration.base import PydanticReadable
from activitysim.core.configuration.logit import TourLocationComponentSettings



### SETTINGS FORMAT ###
### {"<model_name>": {"settings_cls": <PydanticSettings Object>, "settings_file": "<name of YAML file"}}
### If a specific Pydantic data model is not defined, map to PydanticReadable to expose .read_settings_file() method
### If required, an alternate set of spec/coefficients to resolve together can be defined for a model using
### "spec_coefficient_keys": [{"spec": "OUTBOUND_SPEC", "coefs": "OUTBOUND_COEFFICIENTS"}, ...]
EXTENSION_CHECKER_SETTINGS = {
"airport_returns": {
"settings_cls": PydanticReadable,
"settings_file": "airport_returns.yaml"
},
"av_ownership": {
"settings_cls": AVOwnershipSettings,
"settings_file": "av_ownership.yaml"
},
"external_worker_identification": {
"settings_cls": ExternalIdentificationSettings,
"settings_file": "external_worker_identification.yaml"
},
"external_student_identification": {
"settings_cls": ExternalIdentificationSettings,
"settings_file": "external_student_identification.yaml"
},
"external_non_mandatory_identification": {
"settings_cls": ExternalIdentificationSettings,
"settings_file": "external_non_mandatory_identification.yaml"
},
"external_joint_tour_identification": {
"settings_cls": ExternalIdentificationSettings,
"settings_file": "external_joint_tour_identification.yaml"
},
"external_school_location": {
"settings_cls": TourLocationComponentSettings,
"settings_file": "external_school_location.yaml"
},
"external_workplace_location": {
"settings_cls": TourLocationComponentSettings,
"settings_file": "external_workplace_location.yaml"
},
"external_non_mandatory_destination": {
"settings_cls": TourLocationComponentSettings,
"settings_file": "external_non_mandatory_destination.yaml"
},
"external_joint_tour_destination": {
"settings_cls": TourLocationComponentSettings,
"settings_file": "external_joint_tour_destination.yaml"
},
"transponder_ownership": {
"settings_cls": TransponderOwnershipSettings,
"settings_file": "transponder_ownership.yaml"
},
}
8 changes: 2 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "User environment for Prototype MTC Model"
readme = "README.md"
requires-python = ">=3.10,<3.12"
dependencies = [
"activitysim>=1.5",
"activitysim>=1.6.0",
"multimethod<2.0",
"numba>=0.57",
"numpy>=2,<3",
Expand All @@ -15,7 +15,7 @@ dependencies = [
"psutil>=4.1",
"pydantic>=2.6",
"setuptools>=80.9.0,<81",
"sharrow>=2.15.0",
"sharrow>=2.16.2",
"tables>=3.9",
]

Expand All @@ -24,7 +24,3 @@ dev = [
"pytest>=8.4.1",
"zstandard>=0.23.0",
]

[tool.uv.sources]
activitysim = { git = "https://github.com/ActivitySim/ActivitySim", branch = "main" }
## TODO: unpin from source once we have a release with the new features we need
4 changes: 1 addition & 3 deletions scripts/run-large-legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
# /// script
# requires-python = ">=3.10,<3.12"
# dependencies = [
# "activitysim >=1.5,<2.0",
# "activitysim >=1.6.0,<2.0",
# "wring >=0.0.6",
# ]
# [tool.uv]
# exclude-newer = "2025-11-01T00:00:00Z"
# ///

"""
Expand Down
Loading
Loading