Skip to content

BeatMyGoal is a new platform to manage and track your goals, and compete with your friends to reach them.

Notifications You must be signed in to change notification settings

BeatMyGoal/beatmygoal

Repository files navigation

Beatmygoal

Local Installation Instructions

  • set up the virtualenv and install packages (see below)
  • To run the app: python manage.py syncdb, followed by python manage.py runserver
  • To run tests: python manage.py test -v2
  • To populate the DB with some test data: python manage.py shell scripts/populate_db.py

To set up and update venv:

Heroku instructions

To update to heroku:

  • make sure you have Heroku Toolbelt
  • heroku login
  • heroku git:remote --app beatmygoal
  • git push heroku master

Heroku and database:

  • The environment variable "ON_HEROKU" is used to determine whether to use PostGres or SQLite (settings.py)
    • If for some reason this stops working, reset it with heroku config:set ON_HEROKU=1
  • To delete the heroku database: heroku pg:reset DATABASE_URL
  • Then, to create a new one: heroku run python manage.py syncdb
  • Then, populate with data in any way. For example: heroku run python manage.py shell < scripts/populate_db.py
  • Alternatively, for "automatic changes" you can migrate using South

Coverage.py instructions

  • Install coverage.py by typing pip install coverage
  • To confirm that the coverage is installed correctly, command coverage --version
  • Run the test with the coverage command, coverage run --branch --source='core','beatmygoal' manage.py test
    • (Since we are using unit-test and functional-test, we only need to check the files in ‘core’ and ‘beatmygoal’, which contain url, models, and views.)
  • Then, call the report, coverage report -m
    • (‘-m flag’ shows the line numbers of missing statements)
  • The missing columns tell us which lines are not covered by our unit-test and functional-test
  • To delete the previous report, type coverage erase

Testing instruction (via django-nose)

  • Django's test runner won't allow you to run a specific test case
  • Using django-nose, you can now test specific test suite, or even specific test method
  • Install django-nose by typing 'pip install django-nose'
  • Example usage:
    • Say you want to test 'testUnitGoal.py' only
    • On command line, run 'python manage.py test tests.testUnitGoal'
    • If you want to test specific method in 'testUnitGoal.py', say 'testCreateGoalWithValidData1',
    • run 'python manage.py test tests.testUnitGoal:GoalTest.testCreateGoalWithValidData1'

git tag instructions

  • do git log to find the most recent commit hash
  • git tag iteration3
  • git push --tags
  • if it works, you'll see the release here
  • also handy is git tag -d <tag> to delete a tag

About

BeatMyGoal is a new platform to manage and track your goals, and compete with your friends to reach them.

Resources

Stars

Watchers

Forks

Packages

No packages published