File tree Expand file tree Collapse file tree 4 files changed +17
-17
lines changed
Expand file tree Collapse file tree 4 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -135,9 +135,9 @@ class IdGenerationConfig(ConfigItem):
135135 TRANSIT_SHAPE_ID_SCALAR : int = 1000000
136136 ROAD_SHAPE_ID_METHOD : Literal ["scalar" ] = "scalar"
137137 ROAD_SHAPE_ID_SCALAR : int = 1000
138- ML_LINK_ID_METHOD : Literal ["range" , "scalar" ] = "range "
138+ ML_LINK_ID_METHOD : Literal ["range" , "scalar" ] = "scalar "
139139 ML_LINK_ID_RANGE : tuple [int , int ] = (950000 , 999999 )
140- ML_LINK_ID_SCALAR : int = 15000
140+ ML_LINK_ID_SCALAR : int = 2000000
141141 ML_NODE_ID_METHOD : Literal ["range" , "scalar" ] = "range"
142142 ML_NODE_ID_RANGE : tuple [int , int ] = (950000 , 999999 )
143143 ML_NODE_ID_SCALAR : int = 15000
Original file line number Diff line number Diff line change @@ -60,19 +60,19 @@ class LinkOfTypeAccessor:
6060 def __init__ (self , links_df : DataFrame [RoadLinksTable ]):
6161 """LinkOfTypeAccessor for RoadLinksTable."""
6262 self ._links_df = links_df
63- try :
64- links_df .attrs ["name" ] == "road_links"
65- except AttributeError :
66- WranglerLogger .warning (
67- "`of_type` should only be used on 'road_links' dataframes. \
68- No attr['name'] not found."
69- )
70- except AssertionError :
71- WranglerLogger .warning (
72- f"`of_type` should only be used on 'road_links' dataframes. \
73- Found type: { links_df .attr ['name' ]} "
74- )
75- raise NotLinksError ("`of_type` is only available to network_links dataframes." )
63+ # try:
64+ # links_df.attrs["name"] == "road_links"
65+ # except AttributeError:
66+ # WranglerLogger.warning(
67+ # "`of_type` should only be used on 'road_links' dataframes. \
68+ # No attr['name'] not found."
69+ # )
70+ # except AssertionError:
71+ # WranglerLogger.warning(
72+ # f"`of_type` should only be used on 'road_links' dataframes. \
73+ # Found type: {links_df.attr['name']}"
74+ # )
75+ # raise NotLinksError("`of_type` is only available to network_links dataframes.")
7676
7777 @property
7878 def managed (self ):
Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ def _perform_selection(self):
261261 WranglerLogger .info (f"Final selected links: { len (_selected_links_df )} " )
262262 if len (_selected_links_df ) < 10 :
263263 WranglerLogger .debug (
264- f"\n { _selected_links_df [ _selected_links_df . attrs [ 'display_cols' ]] } "
264+ f"\n { _selected_links_df } "
265265 )
266266
267267 return _selected_links_df
Original file line number Diff line number Diff line change @@ -956,7 +956,7 @@ def extract_base_scenario_metadata(base_scenario: dict) -> dict:
956956 _skip_copy = ["road_net" , "transit_net" , "config" ]
957957 out_dict = {k : v for k , v in base_scenario .items () if k not in _skip_copy }
958958 if isinstance (base_scenario .get ("road_net" ), RoadwayNetwork ):
959- nodes_file_path = base_scenario ["road_net" ].nodes_df .attrs [ "source_file" ]
959+ nodes_file_path = base_scenario ["road_net" ].nodes_df .attrs . get ( "source_file" , None )
960960 if nodes_file_path is not None :
961961 out_dict ["roadway" ] = {
962962 "dir" : str (Path (nodes_file_path ).parent ),
You can’t perform that action at this time.
0 commit comments