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

chore: calculate landToTotalRatio once and pass it to relevant classes #157

Merged
merged 3 commits into from
Dec 6, 2024

Conversation

zz-hh-aa
Copy link
Collaborator

@zz-hh-aa zz-hh-aa commented Dec 5, 2024

What's new in this PR?

  • Removes averagePrice and landPrice from tenure classes MarketRent and FairholdLandRent because they were only there to be used to calculate landToTotalRatio, which gets calculated in Property` anyway
  • Pass landToTotalRatio to MarketRent and FairholdLandRent
  • Update tests accordingly (to fit the new params shape)

Why?

  • landToTotalRatio was being calculated multiple times and could just be calculated once and passed where needed.

Closes #150

and remove landPrice and averagePrice
because landToTotalRatio can be passed instead of calculated anew
to MarketRent and FairholdLandRent
instead of calculating anew
Copy link

vercel bot commented Dec 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fairhold-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 5, 2024 2:14pm

@zz-hh-aa zz-hh-aa requested a review from a team December 5, 2024 14:14
Copy link
Contributor

@DafyddLlyr DafyddLlyr left a comment

Choose a reason for hiding this comment

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

Nice!

@zz-hh-aa zz-hh-aa merged commit cb32f66 into main Dec 6, 2024
5 checks passed
@zz-hh-aa zz-hh-aa deleted the oz/landToTotalRatio branch December 6, 2024 09:17
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.

Calculate landToTotalRatio once
2 participants