Giter Site home page Giter Site logo

donut's Introduction

donut Build Status

The repository for Donut. Written using Python/Flask and powered by MariaDB.

Setting up your environment

  • Gain SSH access to the server:

    AWS Domain:

    1. https://help.github.com/articles/generating-an-ssh-key/

    2. Email the public key to the Directly Responsible Individual for the Getting Started section of the Site rewrite project.

    3. Ask for the Domain. (i.e. ec2-35-162-204-135.us-west-2.compute.amazonaws.com for user dqu). The .ssh config file lets you configure a ssh connection so you don't have to Example ~/.ssh/config on your personal machine:

      Host donut-dqu
          HostName ec2-35-162-204-135.us-west-2.compute.amazonaws.com
          User dqu
          IdentityFile ~/.ssh/id_rsa
          LocalForward 9000 127.0.0.1:50XX
              (Where 50XX is a unique port number on the server we should each use)
      
    4. Now to SSH into the server, we can type from terminal ssh donut-dqu

  • Clone the repository:

git clone https://github.com/ASCIT/donut.git ~/donut
  • Set up your virtualenv and install requirements in that virtualenv
make fresh-install

This (see Makefile)

  1. Creates a virtualenv in ~/virtualenvs/donut-py3

  2. Installs the requirements given in requirements.txt into the virtualenv.

  3. Adds a line to your ~/.profile to automatically activate the virtualenv when you login.

    To deactivate the virtualenv (which you shouldn't need to do), simply type deactivate

  • You will also need a separate config file that we will give you in order to access the database.

Testing

Linting

  • make lint

Unit Testing

  • make test

Test Site

The easiest way to set up a test site is to use SSH port forwarding, so that requests to your local computer are forwarded to the development server. For example:

ssh -L 9000:localhost:5000 <host>

This will forward your local port 9000 so that visiting localhost:9000 on your local computer is equivalent to visiting localhost:5000 on the remote server. Flask's debugging environment defaults to port 5000, but you can change that in your config.py file (multiple people cannot simultaneously bind to the same port through SSH port forwarding).

To start the test site:

python run_server.py -e dev -p 50XX

You can visit the test site by going to localhost:9000 (or whichever port you decided to forward) in your local browser.

donut's People

Contributors

calebsander avatar moziyan98 avatar thought-weaver avatar tjleing avatar rlin0 avatar dqu123 avatar davistardif avatar majesticfish avatar roberteng avatar kushaltirumala avatar epelz avatar alphaz99 avatar allisonkong avatar ootks avatar mvgiambrone avatar joshc avatar periodic1236 avatar zplizzi 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.