Skip to content

Commit 4abb86f

Browse files
authored
Use pandas 2 for docbuild environment (#928)
* fix link * allow failure to import larch * workflow * blacken * try some pins * speed up docbuild * use pandas 2 for docs * oops wrong file * restore foundation
1 parent 9991fce commit 4abb86f

114 files changed

Lines changed: 212 additions & 286 deletions

File tree

Some content is hidden

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

.github/workflows/core_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
pull_request:
99
branches:
1010
- '*'
11-
11+
1212
workflow_dispatch:
1313

1414
env:
@@ -455,7 +455,7 @@ jobs:
455455
456456
develop-docbuild:
457457
needs: foundation
458-
if: github.ref_name == 'main'
458+
if: github.ref_name == 'main' || github.ref_name == 'docs-fix'
459459
name: develop-docbuild
460460
runs-on: ubuntu-latest
461461
permissions:

activitysim/abm/misc.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
@workflow.cached_object
2020
def households_sample_size(state: workflow.State, override_hh_ids) -> int:
21-
2221
if override_hh_ids is None:
2322
return state.settings.households_sample_size
2423
else:
@@ -27,7 +26,6 @@ def households_sample_size(state: workflow.State, override_hh_ids) -> int:
2726

2827
@workflow.cached_object
2928
def override_hh_ids(state: workflow.State) -> np.ndarray | None:
30-
3129
hh_ids_filename = state.settings.hh_ids
3230
if hh_ids_filename is None:
3331
return None
@@ -65,7 +63,6 @@ def override_hh_ids(state: workflow.State) -> np.ndarray | None:
6563

6664
@workflow.cached_object
6765
def trace_od(state: workflow.State) -> tuple[int, int] | None:
68-
6966
od = state.settings.trace_od
7067

7168
if od and not (

activitysim/abm/models/auto_ownership.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ def auto_ownership_simulate(
7272
# - preprocessor
7373
preprocessor_settings = model_settings.preprocessor
7474
if preprocessor_settings:
75-
7675
locals_d = {}
7776
if constants is not None:
7877
locals_d.update(constants)

activitysim/abm/models/initialize.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ def initialize_households(
148148
model_settings_file_name: str = "initialize_households.yaml",
149149
trace_label: str = "initialize_households",
150150
) -> None:
151-
152151
with chunk.chunk_log(state, trace_label, base=True) as chunk_sizer:
153152
chunk_sizer.log_rss(f"{trace_label}.inside-yield")
154153

activitysim/abm/models/input_checker.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ class HouseholdValidator(pydantic.BaseModel) list_of_households...
209209

210210

211211
def report_errors(state, input_checker_settings, v_warnings, v_errors):
212-
213212
# logging overall statistics first before printing details
214213
for table_settings in input_checker_settings["table_list"]:
215214
table_name = table_settings["name"]

activitysim/abm/models/non_mandatory_tour_frequency.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ def non_mandatory_tour_frequency(
236236
# - preprocessor
237237
preprocessor_settings = model_settings.preprocessor
238238
if preprocessor_settings:
239-
240239
locals_dict = {
241240
"person_max_window": lambda x: person_max_window(state, x),
242241
"person_available_periods": lambda persons, start_bin, end_bin, continuous: person_available_periods(

activitysim/abm/models/trip_purpose_and_destination.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ def trip_purpose_and_destination(
6969
model_settings_file_name: str = "trip_purpose_and_destination.yaml",
7070
trace_label: str = "trip_purpose_and_destination",
7171
) -> None:
72-
7372
if model_settings is None:
7473
model_settings = TripPurposeAndDestinationSettings.read_settings_file(
7574
state.filesystem,

activitysim/abm/models/trip_scheduling_choice.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,6 @@ def trip_scheduling_choice(
358358
model_settings_file_name: str = "trip_scheduling_choice.yaml",
359359
trace_label: str = "trip_scheduling_choice",
360360
) -> None:
361-
362361
if model_settings is None:
363362
model_settings = TripSchedulingChoiceSettings.read_settings_file(
364363
state.filesystem,
@@ -416,7 +415,6 @@ def trip_scheduling_choice(
416415
}
417416

418417
if preprocessor_settings:
419-
420418
simulate.set_skim_wrapper_targets(tours_df, skims)
421419

422420
expressions.assign_columns(

activitysim/abm/models/util/cdap.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ def cached_joint_spec_name(hhsize):
297297

298298

299299
def get_cached_spec(state: workflow.State, hhsize):
300-
301300
spec_name = cached_spec_name(hhsize)
302301

303302
spec = state.get_injectable(spec_name, None)
@@ -319,7 +318,6 @@ def get_cached_spec(state: workflow.State, hhsize):
319318

320319

321320
def get_cached_joint_spec(state: workflow.State, hhsize):
322-
323321
spec_name = cached_joint_spec_name(hhsize)
324322

325323
spec = state.get_injectable(spec_name, None)
@@ -625,7 +623,6 @@ def build_cdap_joint_spec(
625623
# N_p1 0.0 0.0 0.0 1.0 1.0 1.0 0.0 0.0 0.0
626624
for pnum in range(1, hhsize + 1):
627625
for activity in ["M", "N", "H"]:
628-
629626
new_row_index = len(spec)
630627
spec.loc[new_row_index, expression_name] = add_pn(activity, pnum)
631628

@@ -638,7 +635,6 @@ def build_cdap_joint_spec(
638635

639636
# for each row in the joint util table
640637
for row in joint_tour_coefficients.itertuples():
641-
642638
# if there is no dependencies
643639
if row.dependency is np.nan:
644640
expression = row.Expression

activitysim/abm/models/util/overlap.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ def p2p_time_window_overlap(state: workflow.State, p1_ids, p2_ids):
138138

139139

140140
def person_pairs(persons):
141-
142141
p = persons[["household_id", "adult"]].reset_index()
143142
p2p = pd.merge(p, p, left_on="household_id", right_on="household_id", how="outer")
144143

@@ -166,7 +165,6 @@ def person_pairs(persons):
166165

167166

168167
def hh_time_window_overlap(state: workflow.State, households, persons):
169-
170168
p2p = person_pairs(persons)
171169

172170
p2p["max_overlap"] = p2p_time_window_overlap(state, p2p.person1, p2p.person2)
@@ -189,7 +187,6 @@ def hh_time_window_overlap(state: workflow.State, households, persons):
189187

190188

191189
def person_time_window_overlap(state: workflow.State, persons):
192-
193190
p2p = person_pairs(persons)
194191

195192
p2p["max_overlap"] = p2p_time_window_overlap(state, p2p.person1, p2p.person2)
@@ -224,7 +221,6 @@ def person_time_window_overlap(state: workflow.State, persons):
224221

225222

226223
def person_max_window(state: workflow.State, persons):
227-
228224
timetable = state.get_injectable("timetable")
229225

230226
# ndarray with one row per person and one column per time period

0 commit comments

Comments
 (0)