ucsb-cs156-f23 / proj-happycows-f23-5pm-1

https://ucsb-cs156-f23.github.io/proj-happycows-f23-5pm-1/
0 stars 0 forks source link

FEATURE: Set default values for Commons fields in application.properties / env variables #1

Closed github-actions[bot] closed 10 months ago

github-actions[bot] commented 11 months ago

Priority issue

Worth 20 points when fully complete.

User Story

Discussion

Currently the following values for a new commons have defaults that are hard coded:

These fields don't have default values, but should:

We would like, instead, for those default values to be settable in application.properties, and overridable by environment variables.

Value property name env variable
Starting Balance app.commons.default.startingBalance HAPPYCOWS_STARTING_BALANCE
Cow Price app.commons.default.cowPrice HAPPYCOWS_COW_PRICE
Milk Price app.commons.default.milkPrice HAPPYCOWS_MILK_PRICE
Degradation Rate app.commons.default.degradationRate HAPPYCOWS_MILK_PRICE
Carrying Capacity app.commons.default.carryingCapacity HAPPYCOWS_CARRYING_CAPACITY
Capacity Per User app.commons.default.capacityPerUser HAPPYCOWS_CAPACITY_PER_USER
Health Update Formula When Above Capacity app.commons.default.aboveCapacityHealthUpdateStrategy HAPPYCOWS_ABOVE_CAPACITY_HEALTH_UPDATE_STRATEGY
Health Update Formula When Below Capacity app.commons.default.belowCapacityHealthUpdateStrategy HAPPYCOWS_BELOW_CAPACITY_HEALTH_UPDATE_STRATEGY

Acceptance Criteria

Implementation

I strongly encourage you to break this into two separate PRs

First PR: Backend only (10 points)

Second PR: Frontend Only (10 points)

Frontend: