Skip to content

Commit

Permalink
Merge pull request #74 from nextmv-io/chore/naming-fixes
Browse files Browse the repository at this point in the history
Fixes typo with duration groups
  • Loading branch information
merschformann authored Oct 31, 2024
2 parents 37870d5 + 998c13c commit 9465b92
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
pip install -r requirements.txt
- name: lint with ruff
run: ruff check --output-format=github .
run: ruff check --output-format=github -v .
14 changes: 12 additions & 2 deletions src/nextroute/schema/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ class DurationGroup(BaseModel):
group: List[str]
"""Stop IDs contained in the group."""


class MatrixTimeFrame(BaseModel):
"""Represents a time-dependent duration matrix or scaling factor."""

start_time: datetime
"""Start time of the time frame."""
end_time: datetime
Expand All @@ -41,8 +43,10 @@ class MatrixTimeFrame(BaseModel):
scaling_factor: Optional[float] = None
"""Scaling factor for the time frame."""


class TimeDependentMatrix(BaseModel):
"""Represents time-dependent duration matrices."""

vehicle_ids: Optional[List[str]] = None
"""Vehicle IDs for which the duration matrix is defined."""
default_matrix: List[List[float]]
Expand All @@ -67,9 +71,15 @@ class Input(BaseModel):
"""Default values for vehicles and stops."""
distance_matrix: Optional[List[List[float]]] = None
"""Matrix of travel distances in meters between stops."""
duratrion_groups: Optional[List[DurationGroup]] = None
duration_groups: Optional[List[DurationGroup]] = None
"""Duration in seconds added when approaching the group."""
duration_matrix: Optional[Union[List[List[float]], TimeDependentMatrix, List[TimeDependentMatrix]]] = None
duration_matrix: Optional[
Union[
List[List[float]],
TimeDependentMatrix,
List[TimeDependentMatrix],
]
] = None
"""Matrix of travel durations in seconds between stops as a single matrix or duration matrices."""
options: Optional[Any] = None
"""Arbitrary options."""
Expand Down

0 comments on commit 9465b92

Please sign in to comment.