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
4 changes: 2 additions & 2 deletions .github/workflows/core_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
pull_request:
branches:
- '*'

workflow_dispatch:

env:
Expand Down Expand Up @@ -455,7 +455,7 @@ jobs:

develop-docbuild:
needs: foundation
if: github.ref_name == 'main'
if: github.ref_name == 'main' || github.ref_name == 'docs-fix'
name: develop-docbuild
runs-on: ubuntu-latest
permissions:
Expand Down
3 changes: 0 additions & 3 deletions activitysim/abm/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

@workflow.cached_object
def households_sample_size(state: workflow.State, override_hh_ids) -> int:

if override_hh_ids is None:
return state.settings.households_sample_size
else:
Expand All @@ -27,7 +26,6 @@ def households_sample_size(state: workflow.State, override_hh_ids) -> int:

@workflow.cached_object
def override_hh_ids(state: workflow.State) -> np.ndarray | None:

hh_ids_filename = state.settings.hh_ids
if hh_ids_filename is None:
return None
Expand Down Expand Up @@ -65,7 +63,6 @@ def override_hh_ids(state: workflow.State) -> np.ndarray | None:

@workflow.cached_object
def trace_od(state: workflow.State) -> tuple[int, int] | None:

od = state.settings.trace_od

if od and not (
Expand Down
1 change: 0 additions & 1 deletion activitysim/abm/models/auto_ownership.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def auto_ownership_simulate(
# - preprocessor
preprocessor_settings = model_settings.preprocessor
if preprocessor_settings:

locals_d = {}
if constants is not None:
locals_d.update(constants)
Expand Down
1 change: 0 additions & 1 deletion activitysim/abm/models/initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ def initialize_households(
model_settings_file_name: str = "initialize_households.yaml",
trace_label: str = "initialize_households",
) -> None:

with chunk.chunk_log(state, trace_label, base=True) as chunk_sizer:
chunk_sizer.log_rss(f"{trace_label}.inside-yield")

Expand Down
1 change: 0 additions & 1 deletion activitysim/abm/models/input_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ class HouseholdValidator(pydantic.BaseModel) list_of_households...


def report_errors(state, input_checker_settings, v_warnings, v_errors):

# logging overall statistics first before printing details
for table_settings in input_checker_settings["table_list"]:
table_name = table_settings["name"]
Expand Down
1 change: 0 additions & 1 deletion activitysim/abm/models/non_mandatory_tour_frequency.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ def non_mandatory_tour_frequency(
# - preprocessor
preprocessor_settings = model_settings.preprocessor
if preprocessor_settings:

locals_dict = {
"person_max_window": lambda x: person_max_window(state, x),
"person_available_periods": lambda persons, start_bin, end_bin, continuous: person_available_periods(
Expand Down
1 change: 0 additions & 1 deletion activitysim/abm/models/trip_purpose_and_destination.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ def trip_purpose_and_destination(
model_settings_file_name: str = "trip_purpose_and_destination.yaml",
trace_label: str = "trip_purpose_and_destination",
) -> None:

if model_settings is None:
model_settings = TripPurposeAndDestinationSettings.read_settings_file(
state.filesystem,
Expand Down
2 changes: 0 additions & 2 deletions activitysim/abm/models/trip_scheduling_choice.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ def trip_scheduling_choice(
model_settings_file_name: str = "trip_scheduling_choice.yaml",
trace_label: str = "trip_scheduling_choice",
) -> None:

if model_settings is None:
model_settings = TripSchedulingChoiceSettings.read_settings_file(
state.filesystem,
Expand Down Expand Up @@ -416,7 +415,6 @@ def trip_scheduling_choice(
}

if preprocessor_settings:

simulate.set_skim_wrapper_targets(tours_df, skims)

expressions.assign_columns(
Expand Down
4 changes: 0 additions & 4 deletions activitysim/abm/models/util/cdap.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ def cached_joint_spec_name(hhsize):


def get_cached_spec(state: workflow.State, hhsize):

spec_name = cached_spec_name(hhsize)

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


def get_cached_joint_spec(state: workflow.State, hhsize):

spec_name = cached_joint_spec_name(hhsize)

spec = state.get_injectable(spec_name, None)
Expand Down Expand Up @@ -625,7 +623,6 @@ def build_cdap_joint_spec(
# N_p1 0.0 0.0 0.0 1.0 1.0 1.0 0.0 0.0 0.0
for pnum in range(1, hhsize + 1):
for activity in ["M", "N", "H"]:

new_row_index = len(spec)
spec.loc[new_row_index, expression_name] = add_pn(activity, pnum)

Expand All @@ -638,7 +635,6 @@ def build_cdap_joint_spec(

# for each row in the joint util table
for row in joint_tour_coefficients.itertuples():

# if there is no dependencies
if row.dependency is np.nan:
expression = row.Expression
Expand Down
4 changes: 0 additions & 4 deletions activitysim/abm/models/util/overlap.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ def p2p_time_window_overlap(state: workflow.State, p1_ids, p2_ids):


def person_pairs(persons):

p = persons[["household_id", "adult"]].reset_index()
p2p = pd.merge(p, p, left_on="household_id", right_on="household_id", how="outer")

Expand Down Expand Up @@ -166,7 +165,6 @@ def person_pairs(persons):


def hh_time_window_overlap(state: workflow.State, households, persons):

p2p = person_pairs(persons)

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


def person_time_window_overlap(state: workflow.State, persons):

p2p = person_pairs(persons)

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


def person_max_window(state: workflow.State, persons):

timetable = state.get_injectable("timetable")

# ndarray with one row per person and one column per time period
Expand Down
5 changes: 0 additions & 5 deletions activitysim/abm/models/util/probabilistic_scheduling.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ def _report_bad_choices(
# log the indexes of the first MAX_PRINT offending rows
MAX_PRINT = 0
for idx in df.index[:MAX_PRINT].values:

row_msg = "%s : failed %s = %s (hh_id = %s)" % (
trace_label,
df.index.name,
Expand All @@ -113,7 +112,6 @@ def _preprocess_departure_probs(
depart_alt_base,
first_trip_in_leg,
):

# zero out probs outside earliest-latest window if one exists
probs_cols = [c for c in probs_spec.columns if c not in probs_join_cols]
if clip_earliest_latest:
Expand All @@ -129,7 +127,6 @@ def _preprocess_departure_probs(


def _preprocess_stop_duration_probs(choosers):

# convert wide to long. duration probs are stored in long format so that
# inbound/outbound duration probs, which both have a 0 alternative, can be
# stored in a single config file. open to better suggestions here.
Expand Down Expand Up @@ -203,7 +200,6 @@ def _preprocess_scheduling_probs(
def _postprocess_scheduling_choices(
scheduling_mode, depart_alt_base, choices, choice_cols, choosers
):

"""
This method just converts the choice column indexes returned by the
logit.make_choices() method into actual departure time values that are
Expand All @@ -222,7 +218,6 @@ def _postprocess_scheduling_choices(
# get applied to trip-specific departure and arrival times, so depart_alt_base
# is a column/series rather than a scalar.
if scheduling_mode == "stop_duration":

# for outbound trips, offsets get added to the departure time constraint
if choosers.outbound.all():
depart_alt_base = choosers["earliest"]
Expand Down
8 changes: 2 additions & 6 deletions activitysim/abm/models/util/test/test_input_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

import pandas as pd
import pandas.testing as pdt
import pandera as pa
import pytest
import yaml
import pandera as pa

from activitysim.abm.models.input_checker import validate_with_pandera, TABLE_STORE
from activitysim.abm.models.input_checker import TABLE_STORE, validate_with_pandera


@pytest.fixture(scope="class")
Expand Down Expand Up @@ -56,7 +56,6 @@ def households():


def test_passing_dataframe(households, v_errors, v_warnings, validation_settings):

TABLE_STORE["households"] = households

class input_checker:
Expand All @@ -83,7 +82,6 @@ def dummy_example(cls, households: pd.DataFrame):


def test_error_dataframe(households, v_errors, v_warnings, validation_settings):

TABLE_STORE["households"] = households

class input_checker:
Expand All @@ -107,7 +105,6 @@ class Household(pa.DataFrameModel):


def test_warning_dataframe(households, v_errors, v_warnings, validation_settings):

TABLE_STORE["households"] = households

class input_checker:
Expand All @@ -132,7 +129,6 @@ class Household(pa.DataFrameModel):
def test_custom_check_failure_dataframe(
households, v_errors, v_warnings, validation_settings
):

TABLE_STORE["households"] = households

class input_checker:
Expand Down
1 change: 0 additions & 1 deletion activitysim/abm/models/util/trip.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@


def failed_trip_cohorts(trips, failed):

# outbound trips in a tour with a failed outbound trip
bad_outbound_trips = trips.outbound & (
trips.tour_id.isin(trips.tour_id[failed & trips.outbound])
Expand Down
1 change: 0 additions & 1 deletion activitysim/abm/tables/households.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ def households_merged(
land_use: pd.DataFrame,
accessibility: pd.DataFrame,
) -> pd.DataFrame:

households = simple_table_join(
households,
land_use,
Expand Down
2 changes: 0 additions & 2 deletions activitysim/abm/tables/table_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@

@workflow.cached_object
def rng_channels(state: workflow.State):

return cid.RANDOM_CHANNELS


@workflow.cached_object
def traceable_tables(state: workflow.State):

# names of all traceable tables ordered by dependency on household_id
# e.g. 'persons' has to be registered AFTER 'households'

Expand Down
4 changes: 2 additions & 2 deletions activitysim/abm/test/run_multi_zone_mp.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

# ActivitySim
# See full license in LICENSE.txt.
import os
Expand All @@ -13,7 +15,6 @@


def test_mp_run():

configs_dir = [example_path("configs_3_zone"), example_path("configs")]
data_dir = example_path("data_3")

Expand All @@ -34,5 +35,4 @@ def test_mp_run():


if __name__ == "__main__":

test_mp_run()
2 changes: 0 additions & 2 deletions activitysim/abm/test/test_misc/setup_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def example_path(dirname):


def setup_dirs(ancillary_configs_dir=None, data_dir=None):

# ancillary_configs_dir is used by run_mp to test multiprocess

# test_pipeline_configs_dir = os.path.join(os.path.dirname(__file__), "configs")
Expand Down Expand Up @@ -69,7 +68,6 @@ def setup_dirs(ancillary_configs_dir=None, data_dir=None):


def close_handlers():

loggers = logging.Logger.manager.loggerDict
for name in loggers:
logger = logging.getLogger(name)
Expand Down
Loading
Loading