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

[Waste] Factor out garden costs to single package. #5324

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dracos
Copy link
Member

@dracos dracos commented Jan 13, 2025

Moves all garden costs/discount stuff to its own package which can then be queried for costs.
And adds a 'different price for first bin'
[skip changelog]

@dracos dracos requested a review from MorayMySoc January 13, 2025 09:53
Copy link

codecov bot commented Jan 13, 2025

Codecov Report

Attention: Patch coverage is 94.01198% with 10 lines in your changes missing coverage. Please review.

Project coverage is 82.47%. Comparing base (fbbb05a) to head (3698b3d).

Files with missing lines Patch % Lines
perllib/WasteWorks/Costs.pm 93.96% 3 Missing and 4 partials ⚠️
perllib/FixMyStreet/Cobrand/Sutton.pm 60.00% 0 Missing and 2 partials ⚠️
perllib/FixMyStreet/Cobrand/Kingston.pm 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                       Coverage Diff                       @@
##           bexley-ww-pre-work-refactor    #5324      +/-   ##
===============================================================
+ Coverage                        82.43%   82.47%   +0.03%     
===============================================================
  Files                              416      417       +1     
  Lines                            32904    32939      +35     
  Branches                          5278     5282       +4     
===============================================================
+ Hits                             27125    27166      +41     
+ Misses                            4221     4217       -4     
+ Partials                          1558     1556       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@MorayMySoc MorayMySoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left a couple of incidental comments that are just very minor queries of style, but this seems to work according to the tests. As you say, direct tests on the new package would help confirm its reliability.

perllib/WasteWorks/Costs.pm Show resolved Hide resolved
perllib/FixMyStreet/App/Controller/Waste.pm Outdated Show resolved Hide resolved
@dracos dracos force-pushed the bexley-ww-pre-work-refactor branch from 96aa17f to fbbb05a Compare January 14, 2025 09:44
@dracos dracos force-pushed the bexley-ww-pre-work-refactor-2 branch from d6cf430 to 3698b3d Compare January 14, 2025 15:04
@dracos dracos force-pushed the bexley-ww-pre-work-refactor-2 branch from 3698b3d to 63b570e Compare January 14, 2025 17:55
@dracos
Copy link
Member Author

dracos commented Jan 14, 2025

Moved service inside Costs.pm; then made some small additional changes - moved _get_costs into the Costs.pm as well, small wording changes, put all the cobrand bits together. Then noticed end date could be taken from the service as well mostly, so moved that out of some calls. And added a tests file. Probably worth a re-review, check my tests look as you'd expect :)

@dracos dracos requested a review from MorayMySoc January 14, 2025 17:55
@dracos dracos changed the base branch from bexley-ww-pre-work-refactor to master January 14, 2025 17:57
Copy link
Contributor

@MorayMySoc MorayMySoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants