add deadhead trip start end times#67
Conversation
|
I have no idea why the CI check failed. The code runs successfully on my local computer, I don't have this |
|
@YiZoeHe thanks for taking care of this! The mypy check was failing because mypy couldn't tell that (base) dmccabe@dmccabe-41200s routee-transit % pixi run -e dev-py312 mypy .
nrel/routee/transit/predictor.py:456: error: "Properties" has no attribute "total_seconds" [attr-defined]
nrel/routee/transit/predictor.py:606: error: "Properties" has no attribute "total_seconds" [attr-defined]I added an explicit I'm going to double-check the results one more time to make sure things look good but assuming that's good I'll go ahead and merge. |
|
[heart] He, Yi reacted to your message:
…________________________________
From: Dan McCabe ***@***.***>
Sent: Monday, February 2, 2026 7:39:05 PM
To: NatLabRockies/routee-transit ***@***.***>
Cc: He, Yi ***@***.***>; Mention ***@***.***>
Subject: Re: [NatLabRockies/routee-transit] add deadhead trip start end times (PR #67)
CAUTION: This email originated from outside of NLR. Do not click links or open attachments unless you recognize the sender and know the content is safe.
[https://avatars.githubusercontent.com/u/25916826?s=20&v=4]dan-mccabe left a comment (NatLabRockies/routee-transit#67)<#67 (comment)>
@YiZoeHe<https://github.com/YiZoeHe> thanks for taking care of this! The mypy check was failing because mypy couldn't tell that trip_duration_minutes was a timedelta column (I think it gets confused up by the .agg() call, even though the code was fine.
(base) ***@***.*** routee-transit % pixi run -e dev-py312 mypy .
nrel/routee/transit/predictor.py:456: error: "Properties" has no attribute "total_seconds" [attr-defined]
nrel/routee/transit/predictor.py:606: error: "Properties" has no attribute "total_seconds" [attr-defined]
I added an explicit pd.to_timedelta() wrapped around the new column so mypy doesn't get mad. I also updated the output format to just round to 2 decimals instead of converting to int, since the start_time and end_time values were including seconds and not rounded to full minutes.
I'm going to double-check the results one more time to make sure things look good but assuming that's good I'll go ahead and merge.
—
Reply to this email directly, view it on GitHub<#67 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A3ARHDEEGLHKMNVNI5LIZ3T4J6RVTAVCNFSM6AAAAACTMPO42SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTQMZXGIYDSMBYGM>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
All looks good. I fixed a couple separate issues I noticed when checking the results that were not related to this PR: there was a redundant calculation of trip start and end times when estimating trip timestamps along the shape, and |
No description provided.