Skip to content

Python/Django capstone project for Turing's Back End Engineering Program. Foodi allows users to track their eating habits and nutrition. Use the search bar to find calorie and nutrition information for any food. When logged in, you can enter the number of servings and save to your daily diary. Save time by selecting from your frequently eaten fo…

Notifications You must be signed in to change notification settings

lilwillifo/foodi

Repository files navigation

Foodi

Foodi allows users to track their eating habits and nutrition. Use the search bar to find calorie and nutrition information for any food. When logged in, you can enter the number of servings and save to your daily diary. Save time by selecting from your frequently eaten foods. Then head to the analytics page to see a nutritional breakdown. The deployed version can be found here.

Getting Started

  1. Clone this repository.
git clone [email protected]:lilwillifo/foodi.git
  1. Change into the foodi directory

  2. Create a virtualenv

virtualenv -p python3 .venv
source .venv/bin/activate
  1. Updgrade pip and install dependencies
pip3 install --upgrade pip
pip3 install -r requirements/local.txt
  1. Set up the database in psql
CREATE DATABASE foodi;
CREATE DATABASE foodi_test;
  1. Migrate and Seed
python3 manage.py migrate
python3 manage.py populate_db
  1. Run test suite (unit and feature tests). You'll need the server running in a separate tab.
  python3 manage.py runserver
  python3 manage.py test
  python3 manage.py behave

Prerequisites

You'll need Django and Python3 installed

Running the Server Locally

To see your code in action locally, you need to fire up a development server. Use the command:

python3 manage.py runserver

Once the server is running, create an account to start tracking your food.

  • http://localhost:8000/ to run the application.

Deployment

Deployed project is here

Contributing

Please follow the Getting Started guide to set up your local dev environment.

This guide assumes that the git remote name of the main repo is upstream and that your fork is named origin.

Create a new branch on your local machine to make your changes against (based on upstream/master):

git checkout -b branch-name-here --no-track upstream/master

Make sure the tests pass on your new branch:

`python3 manage.py test`
`python3 manage.py behave`

Making a change

Make your changes to the codebase. I recommend using TDD. Add a test, make changes and get the test suite back to green.

`python3 manage.py test`

Once the tests are passing you can commit your changes. See How to Write a Good Commit Message for more tips.

git add .
git commit -m "Add a concise commit message describing your change here"

Push your changes to a branch on your fork:

git push origin branch-name-here

Submitting a Pull Request

Use the GitHub UI to submit a new pull request against upstream/master. To increase the chances that your pull request is swiftly accepted please have a look at this guide to making a great pull request

TL;DR:

  • Write tests
  • Make sure the whole test suite is passing
  • Keep your PR small, with a single focus
  • Maintain a clean commit history
  • Use a style consistent with the rest of the codebase
  • Before submitting, rebase on the current master branch

Built With

Authors

  • Margaret Williford

Acknowledgments

  • A huge shoutout to Vitor Freitas. For nearly every Django issue I ran into, he had written a blog post to solve my problem.

About

Python/Django capstone project for Turing's Back End Engineering Program. Foodi allows users to track their eating habits and nutrition. Use the search bar to find calorie and nutrition information for any food. When logged in, you can enter the number of servings and save to your daily diary. Save time by selecting from your frequently eaten fo…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published