Skip to content

Commit

Permalink
add ELIFs in project building when network or changes are given
Browse files Browse the repository at this point in the history
  • Loading branch information
i-am-sijia committed Jun 10, 2020
1 parent 8fdda49 commit 9e3c717
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lasso/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ def create_project(
A Project instance.
"""

if base_transit_source and base_transit_network:
msg = "Method takes only one of 'base_transit_source' and 'base_transit_network' but both given"
WranglerLogger.error(msg)
raise ValueError(msg)
if base_transit_source:
base_transit_network = CubeTransit.create_from_cube(base_transit_source)
WranglerLogger.debug(
Expand All @@ -153,6 +157,8 @@ def create_project(
"\n - ".join(base_transit_network.lines)
)
)
elif base_transit_network:
pass
else:
msg = "No base transit network."
WranglerLogger.info(msg)
Expand All @@ -174,6 +180,8 @@ def create_project(
"\n - ".join(build_transit_network.lines)
)
)
elif transit_changes:
pass
else:
msg = "No transit changes given or processed."
WranglerLogger.info(msg)
Expand Down Expand Up @@ -212,6 +220,8 @@ def create_project(
elif roadway_csv_file:
roadway_changes = pd.read_csv(roadway_csv_file)
roadway_changes["model_node_id"] = 0
elif roadway_changes:
pass
else:
msg = "No roadway changes given or processed."
WranglerLogger.info(msg)
Expand All @@ -233,6 +243,8 @@ def create_project(
base_roadway_network.fill_na()
base_roadway_network.convert_int()
base_roadway_network.split_properties_by_time_period_and_category()
elif base_roadway_network:
pass
else:
msg = "No base roadway network."
WranglerLogger.info(msg)
Expand Down

1 comment on commit 9e3c717

@i-am-sijia
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#82

Please sign in to comment.