yifattih / bmr_calculator

Basal Metabolic Rate Calculator
MIT License
0 stars 1 forks source link

Story: Perform Calculations on Input Data #19

Open yifattih opened 2 weeks ago

yifattih commented 2 weeks ago

Title

Story: Perform Calculations on Input Data

Description

As a user, I want the app to perform calculations on the submitted data so that I can receive useful insights.

Acceptance Criteria

juan-chocolon commented 6 days ago

I can implement the Mifflin equation for BMR calculation and propose the following changes:

Suggested changes to implement the Mifflin equation

  1. The Mifflin class should be implemented in app/src/bmr/helpers/equations.py
  2. A new test script should be created for Mifflin class unit tests: tests/test_mifflin_eqs.py
  3. Unit conversions should be implemented using the pint package.
  4. Modified requirement file to include pint package: app/requirements.txt

Sources:

  1. Pint https://github.com/hgrecco/pint
  2. Mifflin - St Jeor equation Mifflin MD, St Jeor ST, Hill LA, Scott BJ, Daugherty SA, Koh YO. A new predictive equation for resting energy expenditure in healthy individuals. Am J Clin Nutr. 1990 Feb;51(2):241-7. doi: 10.1093/ajcn/51.2.241. PMID: 2305711.

These broad-stroke descriptions should highlight the files to be modified/created. This excludes the front end, but that can be addressed separately after the class is created and all tests are passed.

Feel free to let me know if you have any more suggestions.

yifattih commented 6 days ago

I'd suggest to add a new interface with corresponding methods for the mifflin eqs without removing what the module has; when everything is working we do the cleaning. Also, as a 5th step, consider integrating the new feature to the model.py file which is where the equations module is actually used. Lastly, consider breaking down the story in tasks (your Suggested changes to implement the Mifflin equation serve that purpose) using the task issue template. I know it can be a headache but that will help keep track of progress more accurate.