Skip to content

adaptive-learning/anatomy

Repository files navigation

anatomy

An intelligent application for practicing human anatomy.

Development

Initial setup

Install pip

Install virtualenvwrapper

$ pip install virtualenvwrapper

Setup your local virtual environment:

mkvirtualenv anatomy
workon anatomy

Install python dependencies

cd <path_to_your_local_git_repo>
pip install -r requirements.txt

It might require to install (with yum, apt-get or whatever) the following:

To setup database run

sudo -i -u postgres
psql

and in the postgreSQL shell opened by psql command run

CREATE DATABASE anatomy;
CREATE USER anatomy WITH PASSWORD 'anatomy';
GRANT ALL PRIVILEGES ON DATABASE "anatomy" to anatomy;

Add this line

export DATABASE_URL=postgres://anatomy:anatomy@localhost/anatomy

to

~/.virtualenvs/anatomy/bin/postactivate

and run again

workon anatomy

apply migrations

./manage.py migrate

Install client dependencies

cd anatomy
npm install
grunt

On Ubuntu you might need also the following to make grunt work

sudo apt-get install nodejs-legacy

When developing

Run the server on localhost:8003

cd <path_to_your_local_git_repo>
workon anatomy
./manage.py runserver 8003

In order to see the changes when editing client files (e.g. *.sass and *.js) you need to run also

cd  anatomy
grunt watch

Manage translations

To update translations on transifex.com/adaptive-learning/anatomcz set up your ~/.transifexrc and use Transifex client

tx push -s

To pull translated stings

tx pull -a

End-2-end tests

Initial setup

Install dependencies from package.json

npm install

Install Google Chrome (if not already) https://www.google.com/chrome/browser/desktop/index.html

Install Webdriver Manager

see https://www.npmjs.com/package/webdriver-manager

or run

sudo npm install -g webdriver-manager
webdriver-manager update

Daily bread'n'butter

Start up a Selenium Server in a separate terminal or in background

webdriver-manager start --standalone

Run end-to-end tests

grunt protractor