arup-group / pam

Generate and modify transport demand scenarios via a Python API.
MIT License
55 stars 21 forks source link

fix for issue #241 #242

Closed fredshone closed 1 year ago

fredshone commented 1 year ago

Fixes #241.

bug fix - incorrect break statement for cropping plans.

Checklist

Any checks which are not relevant to the PR can be pre-checked by the PR creator. All others should be checked by the reviewer(s). You can add extra checklist items here if required by the PR.

codecov-commenter commented 1 year ago

Codecov Report

Merging #242 (f9db606) into main (07813c8) will increase coverage by 0.17%. Report is 22 commits behind head on main. The diff coverage is 89.89%.

@@            Coverage Diff             @@
##             main     #242      +/-   ##
==========================================
+ Coverage   86.84%   87.02%   +0.17%     
==========================================
  Files          49       49              
  Lines        5496     5602     +106     
  Branches     1372     1403      +31     
==========================================
+ Hits         4773     4875     +102     
- Misses        462      464       +2     
- Partials      261      263       +2     
Files Changed Coverage Δ
pam/activity.py 90.62% <ø> (-0.15%) :arrow_down:
pam/read/__init__.py 100.00% <ø> (ø)
pam/write/__init__.py 100.00% <ø> (ø)
pam/write/matsim.py 76.08% <59.25%> (-2.58%) :arrow_down:
pam/core.py 88.72% <87.69%> (+0.68%) :arrow_up:
pam/read/matsim.py 87.57% <93.33%> (-0.85%) :arrow_down:
pam/vehicles.py 94.97% <94.97%> (ø)
pam/report/summary.py 93.12% <100.00%> (ø)

... and 2 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

divyasharma-arup commented 1 year ago

Thanks @fredshone, this will now fix plans such that if all of an agent's legs & activities extend beyond a day, the .crop() function will only reflect their first activity. This is the functionality I expected.