Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] not removing loops in transit #263

Open
i-am-sijia opened this issue Mar 22, 2021 · 1 comment
Open

[BUG] not removing loops in transit #263

i-am-sijia opened this issue Mar 22, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@i-am-sijia
Copy link
Collaborator

Describe the bug

No errors returned, but the result is incorrect. The loop still exists.

Failing tests

MTC transit project cards, example see below:

project: SFMTA Route 336 Edits
tags:
  - 'Minor Transit'
dependencies: ''
changes:
- category: Transit Service Property Change
  facility:
    route_id: '336'
    direction_id: 0
  properties:
  - property: routing
    existing:
    - -1021778
    - 1000715
    - -1002699
    - -1007345
    - -1009452
    - 1000062
    - -1017085
    - -1017427
    - -1009452
    - -1007345
    set:
    - -1021778
    - 1000715
    - 1002699
    - -1007345

Triggering line of code

https://github.com/wsp-sag/network_wrangler/blob/23de6c4ce4c7f0106c41993a4fcff3a76399796e/network_wrangler/transitnetwork.py#L867-L880

Thoughts on resolution

List index() returns the index of the first occurrence of node 1007345, to remove the loop, it should look for the last occurrence of 1007345.

Risk: would the fix break anything?

@i-am-sijia i-am-sijia added the bug Something isn't working label Mar 22, 2021
@i-am-sijia i-am-sijia self-assigned this Mar 22, 2021
@e-lo
Copy link
Collaborator

e-lo commented Oct 28, 2024

@i-am-sijia can you verify this works in 1.0-beta?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants