Giter Site home page Giter Site logo

weatheremail's Introduction

WeatherEmail

For notes on some technical ideas about scaling this app please, see this doc.

What follows is a living document on setting up this app.

NOTE about emails:

I've set up an app using my personal email and obviously have not committed the password to it:

EMAIL_HOST_PASSWORD = 'YOU_WISH_YOU_KNEW'

Pre-reqs - be sure to have 'virtualenv' available from the command line:

virtualenv --version If not install using: pip install virtualenv

  1. Clone repo.
  2. CD into repo directory.
  3. Run (to note the 'venv' virtualenv name is ignored in .gitignore):
virtualenv venv
source venv/bin/activate

To install requirements:

(inside VM) pip install -r requirements.txt OR pip install -r requirements_dev.txt

Before running the app do the needed DB migrations:

In virtualenv (venv) cd into app: cd weatheremail Then run: ./manage.py migrate

Also you can create a superuser (not currently used for this app though): ./manage.py createsuperuser You can use this to log in to: http://127.0.0.1:8000/admin/

To run unit tests:

In virtualenv (venv) cd into app: cd weatheremail Then run: ./manage.py test

Also to get test coverage run: coverage run --source='.' ./manage.py test coverage report

To run:

In virtualenv (venv) cd into app: cd weatheremail Then run: ./manage.py runserver_plus (To be in virtualenv run source venv/bin/activate in the repo dir.)

To run celery task(s) - We'll be running celery as well as celery beat (each in their own terminal tab/window):

Pre-Req. - RabbitMQ installed (I used: brew install rabbitmq - for Mac)

Run rabbitmq (in terminal): brew services start rabbitmq

Run each of these inside the VM (venv) in its own terminal tab/window: (cd into app for each command) cd weatheremail celery -A weatheremail worker -l info

cd weatheremail celery -A weatheremail beat

* To note, the periodic task that queues up the email tasks per each user is set currently to run at 10am

weatheremail's People

Contributors

c-h-russell-walker avatar cwalkersp avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.