Skip to content

Commit acccdda

Browse files
authored
Merge branch 'main' into tracing_fix
2 parents c633d39 + 171f172 commit acccdda

File tree

11 files changed

+66
-67
lines changed

11 files changed

+66
-67
lines changed

.github/workflows/branch-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
run:
1616
shell: bash -l {0}
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0 # get all tags, lets setuptools_scm do its thing
2121

.github/workflows/build_installer.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
steps:
2828
- name: Checkout code
29-
uses: actions/checkout@v3
29+
uses: actions/checkout@v4
3030

3131
- uses: conda-incubator/setup-miniconda@v3
3232
with:
@@ -47,7 +47,7 @@ jobs:
4747
shell: bash
4848

4949
- name: Upload installer to Github artifact
50-
uses: actions/upload-artifact@v3
50+
uses: actions/upload-artifact@v4
5151
with:
5252
path: build/Activitysim-${{ inputs.version }}-${{ matrix.OS_NAME }}-${{ matrix.ARCH }}*
5353
name: Activitysim-${{ inputs.version }}-${{ matrix.OS_NAME }}-${{ matrix.ARCH }}

.github/workflows/core_tests.yml

Lines changed: 26 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@ jobs:
2626
steps:
2727
- uses: actions/checkout@v4
2828

29-
- name: Setup Mambaforge
29+
- name: Setup Miniforge
3030
uses: conda-incubator/setup-miniconda@v3
3131
with:
32-
miniforge-variant: Mambaforge
3332
miniforge-version: latest
3433
activate-environment: asim-test
35-
use-mamba: true
3634
python-version: ${{ matrix.python-version }}
3735

3836
- name: Set cache date for year and month
@@ -46,7 +44,7 @@ jobs:
4644

4745
- name: Update environment
4846
run: |
49-
mamba env update -n asim-test -f conda-environments/github-actions-tests.yml
47+
conda env update -n asim-test -f conda-environments/github-actions-tests.yml
5048
if: steps.cache.outputs.cache-hit != 'true'
5149

5250
- name: Install activitysim
@@ -58,8 +56,8 @@ jobs:
5856
5957
- name: Conda checkup
6058
run: |
61-
mamba info -a
62-
mamba list
59+
conda info -a
60+
conda list
6361
6462
- name: Lint with Black
6563
run: |
@@ -111,13 +109,11 @@ jobs:
111109
steps:
112110
- uses: actions/checkout@v4
113111

114-
- name: Setup Mambaforge
112+
- name: Setup Miniforge
115113
uses: conda-incubator/setup-miniconda@v3
116114
with:
117-
miniforge-variant: Mambaforge
118115
miniforge-version: latest
119116
activate-environment: asim-test
120-
use-mamba: true
121117
python-version: ${{ matrix.python-version }}
122118

123119
- name: Set cache date for year and month
@@ -131,7 +127,7 @@ jobs:
131127

132128
- name: Update environment
133129
run: |
134-
mamba env update -n asim-test -f conda-environments/github-actions-tests.yml
130+
conda env update -n asim-test -f conda-environments/github-actions-tests.yml
135131
if: steps.cache.outputs.cache-hit != 'true'
136132

137133
- name: Install activitysim
@@ -143,8 +139,8 @@ jobs:
143139
144140
- name: Conda checkup
145141
run: |
146-
mamba info -a
147-
mamba list
142+
conda info -a
143+
conda list
148144
149145
- name: Lint with Black
150146
run: |
@@ -194,13 +190,11 @@ jobs:
194190
steps:
195191
- uses: actions/checkout@v4
196192

197-
- name: Setup Mambaforge
193+
- name: Setup Miniforge
198194
uses: conda-incubator/setup-miniconda@v3
199195
with:
200-
miniforge-variant: Mambaforge
201196
miniforge-version: latest
202197
activate-environment: asim-test
203-
use-mamba: true
204198
python-version: ${{ env.python-version }}
205199

206200
- name: Set cache date for year and month
@@ -214,7 +208,7 @@ jobs:
214208

215209
- name: Update environment
216210
run: |
217-
mamba env update -n asim-test -f conda-environments/github-actions-tests.yml
211+
conda env update -n asim-test -f conda-environments/github-actions-tests.yml
218212
if: steps.cache.outputs.cache-hit != 'true'
219213

220214
- name: Install activitysim
@@ -226,8 +220,8 @@ jobs:
226220
227221
- name: Conda checkup
228222
run: |
229-
mamba info -a
230-
mamba list
223+
conda info -a
224+
conda list
231225
232226
# TODO: Cache sharrow compiled flows? The contents of __pycache__ appear to
233227
# be ignored, so this is not working as expected right now
@@ -282,13 +276,11 @@ jobs:
282276
- name: Checkout ActivitySim
283277
uses: actions/checkout@v4
284278

285-
- name: Setup Mambaforge
279+
- name: Setup Miniforge
286280
uses: conda-incubator/setup-miniconda@v3
287281
with:
288-
miniforge-variant: Mambaforge
289282
miniforge-version: latest
290283
activate-environment: asim-test
291-
use-mamba: true
292284
python-version: ${{ env.python-version }}
293285

294286
- name: Set cache date for year and month
@@ -304,7 +296,7 @@ jobs:
304296

305297
- name: Update environment
306298
run: |
307-
mamba env update -n asim-test -f conda-environments/github-actions-tests.yml
299+
conda env update -n asim-test -f conda-environments/github-actions-tests.yml
308300
if: steps.cache.outputs.cache-hit != 'true'
309301

310302
- name: Install activitysim
@@ -316,8 +308,8 @@ jobs:
316308
317309
- name: Conda checkup
318310
run: |
319-
mamba info -a
320-
mamba list
311+
conda info -a
312+
conda list
321313
322314
- name: Checkout Example
323315
uses: actions/checkout@v4
@@ -345,13 +337,11 @@ jobs:
345337
steps:
346338
- uses: actions/checkout@v4
347339

348-
- name: Setup Mambaforge
340+
- name: Setup Miniforge
349341
uses: conda-incubator/setup-miniconda@v3
350342
with:
351-
miniforge-variant: Mambaforge
352343
miniforge-version: latest
353344
activate-environment: asim-test
354-
use-mamba: true
355345
python-version: ${{ env.python-version }}
356346

357347
- name: Set cache date for year and month
@@ -365,7 +355,7 @@ jobs:
365355

366356
- name: Update environment
367357
run: |
368-
mamba env update -n asim-test -f conda-environments/github-actions-tests.yml
358+
conda env update -n asim-test -f conda-environments/github-actions-tests.yml
369359
if: steps.cache.outputs.cache-hit != 'true'
370360

371361
- name: Install activitysim
@@ -377,8 +367,8 @@ jobs:
377367
378368
- name: Conda checkup
379369
run: |
380-
mamba info -a
381-
mamba list
370+
conda info -a
371+
conda list
382372
383373
- name: Test Random Seed Generation
384374
run: |
@@ -392,18 +382,16 @@ jobs:
392382
defaults:
393383
run:
394384
shell: bash -l {0}
395-
name: estimation_mode_test
385+
name: Estimation Mode Unit Tests
396386
runs-on: ubuntu-latest
397387
steps:
398388
- uses: actions/checkout@v4
399389

400-
- name: Setup Mambaforge
390+
- name: Setup Miniforge
401391
uses: conda-incubator/setup-miniconda@v3
402392
with:
403-
miniforge-variant: Mambaforge
404393
miniforge-version: latest
405394
activate-environment: asim-test
406-
use-mamba: true
407395
python-version: ${{ env.python-version }}
408396

409397
- name: Set cache date for year and month
@@ -417,7 +405,7 @@ jobs:
417405

418406
- name: Update environment
419407
run: |
420-
mamba env update -n asim-test -f conda-environments/github-actions-tests.yml
408+
conda env update -n asim-test -f conda-environments/github-actions-tests.yml
421409
if: steps.cache.outputs.cache-hit != 'true'
422410

423411
- name: Install Larch
@@ -432,8 +420,8 @@ jobs:
432420
433421
- name: Conda checkup
434422
run: |
435-
mamba info -a
436-
mamba list
423+
conda info -a
424+
conda list
437425
438426
- name: Test Estimation Mode
439427
run: |
@@ -452,15 +440,13 @@ jobs:
452440
with:
453441
fetch-depth: 0 # get all tags, lets setuptools_scm do its thing
454442
- name: Set up Python 3.10
455-
uses: actions/setup-python@v2
443+
uses: actions/setup-python@v5
456444
with:
457445
python-version: "3.10"
458446
- name: Install dependencies
459447
uses: conda-incubator/setup-miniconda@v3
460448
with:
461-
miniforge-variant: Mambaforge
462449
miniforge-version: latest
463-
use-mamba: true
464450
environment-file: conda-environments/docbuild.yml
465451
python-version: "3.10"
466452
activate-environment: docbuild

.github/workflows/deployment.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
runs-on: ubuntu-latest
1414
if: github.repository == 'ActivitySim/activitysim'
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
19-
- uses: actions/setup-python@v4
19+
- uses: actions/setup-python@v5
2020
name: Install Python
2121
with:
2222
python-version: "3.10"
@@ -39,7 +39,7 @@ jobs:
3939
else
4040
echo "✅ Looks good"
4141
fi
42-
- uses: actions/upload-artifact@v3
42+
- uses: actions/upload-artifact@v4
4343
with:
4444
name: releases
4545
path: dist
@@ -48,11 +48,11 @@ jobs:
4848
needs: build-artifacts
4949
runs-on: ubuntu-latest
5050
steps:
51-
- uses: actions/setup-python@v4
51+
- uses: actions/setup-python@v5
5252
name: Install Python
5353
with:
5454
python-version: "3.10"
55-
- uses: actions/download-artifact@v4.1.7
55+
- uses: actions/download-artifact@v4
5656
with:
5757
name: releases
5858
path: dist
@@ -84,13 +84,13 @@ jobs:
8484
run:
8585
shell: bash -l {0}
8686
steps:
87-
- uses: actions/checkout@v3
88-
- uses: actions/download-artifact@v4.1.7
87+
- uses: actions/checkout@v4
88+
- uses: actions/download-artifact@v4
8989
with:
9090
name: releases
9191
path: dist
9292
- name: Set up Python 3.10
93-
uses: actions/setup-python@v2
93+
uses: actions/setup-python@v5
9494
with:
9595
python-version: "3.10"
9696
- name: Install dependencies
@@ -132,7 +132,7 @@ jobs:
132132
if: github.event_name == 'release'
133133
runs-on: ubuntu-latest
134134
steps:
135-
- uses: actions/download-artifact@v4.1.7
135+
- uses: actions/download-artifact@v4
136136
with:
137137
name: releases
138138
path: dist

.github/workflows/test-deploy.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
build-artifacts:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616
with:
1717
fetch-depth: 0
18-
- uses: actions/setup-python@v4
18+
- uses: actions/setup-python@v5
1919
name: Install Python
2020
with:
2121
python-version: "3.10"
@@ -43,7 +43,7 @@ jobs:
4343
else
4444
echo "✅ Looks good"
4545
fi
46-
- uses: actions/upload-artifact@v3
46+
- uses: actions/upload-artifact@v4
4747
with:
4848
name: releases
4949
path: dist
@@ -52,11 +52,11 @@ jobs:
5252
needs: build-artifacts
5353
runs-on: ubuntu-latest
5454
steps:
55-
- uses: actions/setup-python@v4
55+
- uses: actions/setup-python@v5
5656
name: Install Python
5757
with:
5858
python-version: "3.10"
59-
- uses: actions/download-artifact@v4.1.7
59+
- uses: actions/download-artifact@v4
6060
with:
6161
name: releases
6262
path: dist

activitysim/abm/models/util/logsums.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,10 @@ def compute_location_choice_logsums(
167167
)
168168

169169
nest_spec = config.get_logit_model_settings(logsum_settings)
170-
nest_spec = simulate.eval_nest_coefficients(nest_spec, coefficients, trace_label)
170+
if nest_spec is not None: # nest_spec is None for MNL
171+
nest_spec = simulate.eval_nest_coefficients(
172+
nest_spec, coefficients, trace_label
173+
)
171174

172175
locals_dict = {}
173176
# model_constants can appear in expressions

activitysim/core/configuration/filesystem.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,18 @@ def _parse_arg(name, x):
134134

135135
return self
136136

137+
def parse_settings(self, settings):
138+
def _parse_setting(name, x):
139+
v = getattr(settings, x, None)
140+
if v is not None:
141+
setattr(self, name, v)
142+
143+
_parse_setting("cache_dir", "cache_dir")
144+
_parse_setting("sharrow_cache_dir", "sharrow_cache_dir")
145+
_parse_setting("profile_dir", "profile_dir")
146+
_parse_setting("pipeline_file_name", "pipeline_file_name")
147+
return
148+
137149
def get_working_subdir(self, subdir) -> Path:
138150
if self.working_dir:
139151
return self.working_dir.joinpath(subdir)

activitysim/core/mp_tasks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,7 @@ def setup_injectables_and_logging(injectables, locutor: bool = True) -> workflow
887887
state = workflow.State()
888888
state = state.initialize_filesystem(**injectables)
889889
state.settings = injectables.get("settings", Settings())
890+
state.filesystem.parse_settings(state.settings)
890891

891892
# register abm steps and other abm-specific injectables
892893
# by default, assume we are running activitysim.abm

0 commit comments

Comments
 (0)