Skip to content

Commit

Permalink
add transit addition and deletion change types
Browse files Browse the repository at this point in the history
  • Loading branch information
yueshuaing committed Aug 19, 2024
1 parent cb07971 commit b284deb
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
2 changes: 2 additions & 0 deletions projectcard/projectcard.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
"roadway_deletion",
"transit_property_change",
"transit_routing_change",
"transit_route_addition",
"transit_service_deletion",
"pycode",
]

Expand Down
11 changes: 11 additions & 0 deletions projectcard/schema/changes/transit_service_deletion.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": [
"service"
],
"additionalProperties" : false,
"properties": {
"service": {"$ref": "../transit/selection/select_trips.json"}
}
}
15 changes: 10 additions & 5 deletions projectcard/schema/projectcard.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"change_roadway_property_change": { "$ref": "changes/roadway_property_change.json"},
"transit_property_change": { "$ref": "changes/transit_property_change.json"},
"transit_routing_change": { "$ref": "changes/transit_routing_change.json"},
"transit_add_new_route": { "$ref": "changes/transit_add_new_route.json"},
"transit_route_addition": { "$ref": "changes/transit_route_addition.json"},
"transit_service_deletion": { "$ref": "changes/transit_service_deletion.json"},
"pycode":{ "type": "string" },
"change": {
"type":"object",
Expand All @@ -17,7 +18,8 @@
"roadway_property_change": { "$ref": "#/$defs/change_roadway_property_change"},
"transit_property_change": { "$ref": "#/$defs/transit_property_change"},
"transit_routing_change": { "$ref": "#/$defs/transit_routing_change"},
"transit_add_new_route:": { "$ref": "#/$defs/transit_add_new_route"},
"transit_route_addition": { "$ref": "#/$defs/transit_route_addition"},
"transit_service_deletion": { "$ref": "#/$defs/transit_service_deletion"},
"pycode": { "$ref": "#/$defs/pycode"}
},
"oneOf": [
Expand All @@ -26,7 +28,8 @@
{"required":["roadway_property_change"]},
{"required":["transit_property_change"]},
{"required":["transit_routing_change"]},
{"required":["transit_add_new_route"]},
{"required":["transit_route_addition"]},
{"required":["transit_service_deletion"]},
{"required":["pycode"]}
]
}
Expand All @@ -42,7 +45,8 @@
{"required":["roadway_managed_lanes"]},
{"required":["transit_property_change"]},
{"required":["transit_routing_change"]},
{"required":["transit_add_new_route"]},
{"required":["transit_route_addition"]},
{"required":["transit_service_deletion"]},
{"required":["pycode"]},
{"required":["changes"]}
],
Expand All @@ -57,7 +61,8 @@
"roadway_managed_lanes": { "$ref": "#/$defs/change_roadway_property_change"},
"transit_property_change":{ "$ref": "#/$defs/transit_property_change"},
"transit_routing_change":{ "$ref": "#/$defs/transit_routing_change"},
"transit_add_new_route":{ "$ref": "#/$defs/transit_add_new_route"},
"transit_route_addition":{ "$ref": "#/$defs/transit_route_addition"},
"transit_service_deletion": { "$ref": "#/$defs/transit_service_deletion"},
"pycode":{ "$ref": "#/$defs/pycode"},
"changes": {"type": "array","items":{"$ref": "#/$defs/change"}},
"self_obj_type": {"type": "string","enum": ["RoadwayNetwork","TransitNetwork"],"description":"For calculated project cards, must refer to the object to perform the calculation on. "},
Expand Down

0 comments on commit b284deb

Please sign in to comment.