From d8f8fcbc2bb8bfb0a0004bf65e6d27b74354fe81 Mon Sep 17 00:00:00 2001 From: Jeff Newman Date: Tue, 25 Jul 2023 09:05:50 -0500 Subject: [PATCH] remove leftover references to ORCA from docstrings and now-unused imports --- activitysim/abm/models/tour_mode_choice.py | 1 - activitysim/abm/models/tour_od_choice.py | 12 +++++------- activitysim/abm/models/util/tour_od.py | 1 - activitysim/abm/models/vehicle_allocation.py | 13 ++++++------- activitysim/abm/models/vehicle_type_choice.py | 8 ++++---- activitysim/benchmarking/componentwise.py | 2 +- activitysim/cli/benchmark.py | 3 ++- activitysim/core/test/utils_testing.py | 3 --- activitysim/core/workflow/checkpoint.py | 4 ++-- activitysim/core/workflow/runner.py | 2 +- activitysim/core/workflow/state.py | 6 +++--- .../parking_location_choice_at_university.py | 2 +- .../extensions/stop_frequency_university_parking.py | 2 +- .../extensions/university_location_zone_override.py | 4 ++-- test/cdap/test_cdap.py | 2 +- test/joint_tours/test_joint_tours.py | 2 +- .../test_non_mandatory_tour_frequency.py | 2 +- test/parking_location/test_parking_location.py | 4 +--- test/summarize/test_summarize.py | 4 +++- 19 files changed, 35 insertions(+), 42 deletions(-) diff --git a/activitysim/abm/models/tour_mode_choice.py b/activitysim/abm/models/tour_mode_choice.py index c56547b26..36e678617 100644 --- a/activitysim/abm/models/tour_mode_choice.py +++ b/activitysim/abm/models/tour_mode_choice.py @@ -6,7 +6,6 @@ import numpy as np import pandas as pd -from orca import orca from activitysim.abm.models.util import annotate, school_escort_tours_trips, trip from activitysim.abm.models.util.mode import run_tour_mode_choice_simulate diff --git a/activitysim/abm/models/tour_od_choice.py b/activitysim/abm/models/tour_od_choice.py index 41f1593c0..c55af9af0 100644 --- a/activitysim/abm/models/tour_od_choice.py +++ b/activitysim/abm/models/tour_od_choice.py @@ -33,17 +33,15 @@ def tour_od_choice( Parameters ---------- - tours : orca.DataFrameWrapper + tours : pd.DataFrame lazy-loaded tours table - persons : orca.DataFrameWrapper + persons : pd.DataFrame lazy-loaded persons table - households : orca.DataFrameWrapper + households : pd.DataFrame lazy-loaded households table - land_use : orca.DataFrameWrapper + land_use : pd.DataFrame lazy-loaded land use data table - stop_frequency_alts : orca.DataFrameWrapper - lazy-loaded table of stop frequency alternatives, e.g. "1out2in" - network_los : orca._InjectableFuncWrapper + network_los : los.Network_LOS lazy-loaded activitysim.los.Network_LOS object chunk_size simulation chunk size, set in main settings.yaml diff --git a/activitysim/abm/models/util/tour_od.py b/activitysim/abm/models/util/tour_od.py index 26eefd735..ba1208b47 100644 --- a/activitysim/abm/models/util/tour_od.py +++ b/activitysim/abm/models/util/tour_od.py @@ -7,7 +7,6 @@ import numpy as np import pandas as pd -from orca import orca from activitysim.abm.models.util import logsums as logsum from activitysim.abm.models.util import trip diff --git a/activitysim/abm/models/vehicle_allocation.py b/activitysim/abm/models/vehicle_allocation.py index 372ed464d..fe2acd090 100644 --- a/activitysim/abm/models/vehicle_allocation.py +++ b/activitysim/abm/models/vehicle_allocation.py @@ -105,13 +105,12 @@ def vehicle_allocation( Parameters ---------- state : workflow.State - persons : orca.DataFrameWrapper - households : orca.DataFrameWrapper - vehicles : orca.DataFrameWrapper - vehicles_merged : orca.DataFrameWrapper - tours : orca.DataFrameWrapper - tours_merged : orca.DataFrameWrapper - chunk_size : orca.injectable + persons : pd.DataFrame + households : pd.DataFrame + vehicles : pd.DataFrame + tours : pd.DataFrame + tours_merged : pd.DataFrame + network_los : los.Network_LOS """ trace_label = "vehicle_allocation" model_settings_file_name = "vehicle_allocation.yaml" diff --git a/activitysim/abm/models/vehicle_type_choice.py b/activitysim/abm/models/vehicle_type_choice.py index c674ed62b..57273e977 100644 --- a/activitysim/abm/models/vehicle_type_choice.py +++ b/activitysim/abm/models/vehicle_type_choice.py @@ -316,7 +316,7 @@ def iterate_vehicle_type_choice( locals_dict : dict additional variables available when writing expressions estimator : Estimator object - chunk_size : orca.injectable + chunk_size : int trace_label : str Returns @@ -516,9 +516,9 @@ def vehicle_type_choice( Parameters ---------- - persons : orca.DataFrameWrapper - households : orca.DataFrameWrapper - vehicles : orca.DataFrameWrapper + persons : pd.DataFrame + households : pd.DataFrame + vehicles : pd.DataFrame vehicles_merged : DataFrame """ trace_label = "vehicle_type_choice" diff --git a/activitysim/benchmarking/componentwise.py b/activitysim/benchmarking/componentwise.py index ea34d8153..86fecea5c 100644 --- a/activitysim/benchmarking/componentwise.py +++ b/activitysim/benchmarking/componentwise.py @@ -181,7 +181,7 @@ def run_component(state, component_name): def teardown_component(state, component_name): logger.info("teardown_component: %s", component_name) - # use the pipeline module to clear out all the orca tables, so + # use the pipeline module to clear out all the tables, so # the next benchmark run has a clean slate. # anything needed should be reloaded from the pipeline checkpoint file pipeline_tables = state.registered_tables() diff --git a/activitysim/cli/benchmark.py b/activitysim/cli/benchmark.py index af46766aa..31b920011 100644 --- a/activitysim/cli/benchmark.py +++ b/activitysim/cli/benchmark.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import json import os import shutil @@ -43,7 +45,6 @@ "pyyaml": [], "pytables": [], "toolz": [], - "orca": [], "psutil": [], "requests": [], "numba": ["0.54"], diff --git a/activitysim/core/test/utils_testing.py b/activitysim/core/test/utils_testing.py index 223ae4cf2..22cfd20bd 100644 --- a/activitysim/core/test/utils_testing.py +++ b/activitysim/core/test/utils_testing.py @@ -1,6 +1,3 @@ -# Orca -# Copyright (C) 2016 UrbanSim Inc. -# See full license in LICENSE. from __future__ import annotations import numpy as np diff --git a/activitysim/core/workflow/checkpoint.py b/activitysim/core/workflow/checkpoint.py index 3aa4c3250..b553460a2 100644 --- a/activitysim/core/workflow/checkpoint.py +++ b/activitysim/core/workflow/checkpoint.py @@ -817,7 +817,7 @@ def load(self, checkpoint_name: str, store=None): table_name, checkpoint_name=last_checkpoint[table_name], store=store ) logger.info("load_checkpoint table %s %s" % (table_name, df.shape)) - # register it as an orca table + # register it as an workflow table self._obj.add_table(table_name, df) loaded_tables[table_name] = df if table_name == "land_use" and "_original_zone_id" in df.columns: @@ -1144,7 +1144,7 @@ def load_dataframe(self, table_name, checkpoint_name=None): Return pandas dataframe corresponding to table_name if checkpoint_name is None, return the current (most recent) version of the table. - The table can be a checkpointed table or any registered orca table (e.g. function table) + The table can be a checkpointed table or any registered table (e.g. function table) if checkpoint_name is specified, return table as it was at that checkpoint (the most recently checkpointed version of the table at or before checkpoint_name) diff --git a/activitysim/core/workflow/runner.py b/activitysim/core/workflow/runner.py index f4b72cb41..8ba37a314 100644 --- a/activitysim/core/workflow/runner.py +++ b/activitysim/core/workflow/runner.py @@ -314,7 +314,7 @@ def by_name(self, model_name, **kwargs): Parameters ---------- model_name : str - model_name is assumed to be the name of a registered orca step + model_name is assumed to be the name of a registered workflow step """ self.t0 = time.time() try: diff --git a/activitysim/core/workflow/state.py b/activitysim/core/workflow/state.py index 550b33935..22bbbf045 100644 --- a/activitysim/core/workflow/state.py +++ b/activitysim/core/workflow/state.py @@ -986,7 +986,7 @@ def get_table(self, table_name, checkpoint_name=None): Return pandas dataframe corresponding to table_name if checkpoint_name is None, return the current (most recent) version of the table. - The table can be a checkpointed table or any registered orca table (e.g. function table) + The table can be a checkpointed table or any registered table (e.g. function table) if checkpoint_name is specified, return table as it was at that checkpoint (the most recently checkpointed version of the table at or before checkpoint_name) @@ -1058,7 +1058,7 @@ def extend_table(self, table_name, df, axis=0): Parameters ---------- table_name : str - orca/inject table name + potentially existing table name df : pandas DataFrame """ assert axis in [0, 1] @@ -1095,7 +1095,7 @@ def extend_table(self, table_name, df, axis=0): def drop_table(self, table_name): if self.is_table(table_name): - logger.debug("drop_table dropping orca table '%s'" % table_name) + logger.debug("drop_table dropping table '%s'" % table_name) self._context.pop(table_name, None) self.existing_table_status.pop(table_name) diff --git a/activitysim/examples/production_semcog/extensions/parking_location_choice_at_university.py b/activitysim/examples/production_semcog/extensions/parking_location_choice_at_university.py index ce71108c9..49edf8d37 100644 --- a/activitysim/examples/production_semcog/extensions/parking_location_choice_at_university.py +++ b/activitysim/examples/production_semcog/extensions/parking_location_choice_at_university.py @@ -69,7 +69,7 @@ def parking_location_choice_at_university( the tour mode is auto. Parking locations are sampled weighted by the number of parking spots. The main interface to this model is the parking_location_choice_at_university() function. - This function is registered as an orca step in the example Pipeline. + This function is registered as a step in the example Pipeline. """ trace_label = "parking_location_choice_at_university" diff --git a/activitysim/examples/production_semcog/extensions/stop_frequency_university_parking.py b/activitysim/examples/production_semcog/extensions/stop_frequency_university_parking.py index 1d6dcda6d..7264fed35 100644 --- a/activitysim/examples/production_semcog/extensions/stop_frequency_university_parking.py +++ b/activitysim/examples/production_semcog/extensions/stop_frequency_university_parking.py @@ -24,7 +24,7 @@ def stop_frequency_university_parking( and after groups of trips that are on campus zones. The main interface to this model is the stop_frequency_university_parking() function. - This function is registered as an orca step in the example Pipeline. + This function is registered as a step in the example Pipeline. """ trace_label = "stop_frequency_university_parking" diff --git a/activitysim/examples/production_semcog/extensions/university_location_zone_override.py b/activitysim/examples/production_semcog/extensions/university_location_zone_override.py index cc4354c41..37c1b96e7 100644 --- a/activitysim/examples/production_semcog/extensions/university_location_zone_override.py +++ b/activitysim/examples/production_semcog/extensions/university_location_zone_override.py @@ -108,7 +108,7 @@ def university_location_zone_override( done to replicate the fact that university students can have classes all over campus. The main interface to this model is the university_location_zone_override() function. - This function is registered as an orca step in the example Pipeline. + This function is registered as a step in the example Pipeline. """ trace_label = "university_location_zone_override" @@ -171,7 +171,7 @@ def trip_destination_univ_zone_override( already handled in university_location_zone_override. The main interface to this model is the trip_destination_univ_zone_override() function. - This function is registered as an orca step in the example Pipeline. + This function is registered as a step in the example Pipeline. """ trace_label = "trip_destination_univ_zone_override" diff --git a/test/cdap/test_cdap.py b/test/cdap/test_cdap.py index 8847b591b..c48a4f1ac 100644 --- a/test/cdap/test_cdap.py +++ b/test/cdap/test_cdap.py @@ -11,7 +11,7 @@ from numpy import dot from numpy.linalg import norm -# import models is necessary to initalize the model steps with orca +# import models is necessary to initalize the model steps from activitysim.abm import models # noqa: F401 from activitysim.core import config, tracing, workflow from activitysim.core.util import read_csv, to_csv diff --git a/test/joint_tours/test_joint_tours.py b/test/joint_tours/test_joint_tours.py index fe4ffad2c..40c022240 100644 --- a/test/joint_tours/test_joint_tours.py +++ b/test/joint_tours/test_joint_tours.py @@ -9,7 +9,7 @@ from numpy import dot from numpy.linalg import norm -# import models is necessary to initalize the model steps with orca +# import models is necessary to initalize the model steps from activitysim.abm import models # noqa: F401 from activitysim.core import workflow from activitysim.core.util import read_csv, to_csv diff --git a/test/non_mandatory_tour_frequency/test_non_mandatory_tour_frequency.py b/test/non_mandatory_tour_frequency/test_non_mandatory_tour_frequency.py index b7a7676b2..135ea3454 100644 --- a/test/non_mandatory_tour_frequency/test_non_mandatory_tour_frequency.py +++ b/test/non_mandatory_tour_frequency/test_non_mandatory_tour_frequency.py @@ -11,7 +11,7 @@ from numpy import dot from numpy.linalg import norm -# import models is necessary to initalize the model steps with orca +# import models is necessary to initalize the model steps from activitysim.abm import models # noqa: F401 from activitysim.core import config, tracing, workflow from activitysim.core.util import read_csv, to_csv diff --git a/test/parking_location/test_parking_location.py b/test/parking_location/test_parking_location.py index c6e960b54..3062c3a9d 100644 --- a/test/parking_location/test_parking_location.py +++ b/test/parking_location/test_parking_location.py @@ -6,16 +6,14 @@ from pathlib import Path import numpy as np -import orca import pandas as pd import pytest import yaml from numpy import dot from numpy.linalg import norm -# import models is necessary to initalize the model steps with orca +# import models is necessary to initalize the model steps from activitysim.abm import models -from activitysim.abm.models.util import estimation from activitysim.core import config, simulate, tracing, workflow from activitysim.core.util import read_csv, to_csv diff --git a/test/summarize/test_summarize.py b/test/summarize/test_summarize.py index 6943fe41e..1faf73719 100644 --- a/test/summarize/test_summarize.py +++ b/test/summarize/test_summarize.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import logging import os from pathlib import Path @@ -5,7 +7,7 @@ import pandas as pd import pytest -# import models is necessary to initalize the model steps with orca +# import models is necessary to initalize the model steps from activitysim.abm import models from activitysim.core import los, workflow