Skip to content
Powering openhumans.org
Python HTML CSS JavaScript Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Update pull_request_template.md Nov 1, 2018
bin 🔥 remove deprecated syncdb command Feb 18, 2016
common Add tests for activity pages May 24, 2019
data_import DataType features (#1078) Nov 8, 2019
docs 🔧 document S3 CORS setup; closes #370 Feb 6, 2016
gulp use more idiomatic gulp; remove bundle- prefix Jan 13, 2016
open_humans Fix google button image Nov 8, 2019
private_sharing "any datatypes" to enable generic file uploader Nov 5, 2019
public_data updates for public data sharing and datafiles May 30, 2019
scripts Blacken project files Feb 14, 2019
static DataType features (#1078) Nov 8, 2019
.buildpacks Change buildpack order so node goes first Jul 30, 2014
.checkignore
.coveragerc ignore pass Mar 13, 2016
.eslintrc 👕 update eslintrc Sep 20, 2016
.gitignore Use celery to send project emails to members Feb 13, 2019
.jscsrc
.pre-commit-config.yaml add black pre-commit Feb 14, 2019
.pydocstyle 👕 fix all linter warnings Oct 1, 2016
.pylintrc 👕 fix all linter warnings Oct 1, 2016
.scss-lint.yml 👕 fix linter warnings in scss files Jan 27, 2015
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Jan 17, 2018
EXTERNALS.md 📝 remove outdated reference Dec 15, 2015
LICENSE.txt Make GitHub recognize the LICENSE Jul 18, 2018
Procfile Use celery to send project emails to members Feb 13, 2019
README.md add black pre-commit Feb 14, 2019
codecov.yml add codecov.yml Aug 3, 2016
dev-requirements.in add black pre-commit Feb 14, 2019
dev-requirements.txt Update requirements Jun 11, 2019
env.example Remove python-social-auth #864 (#871) Sep 18, 2018
gulpfile.js Update to gulp 4 Jun 14, 2019
manage.py Blacken project files Feb 14, 2019
package.json Update to gulp 4 Jun 14, 2019
pyproject.toml add pyproject.toml for black config Feb 14, 2019
requirements.in Update packages Dec 2, 2019
requirements.txt Update packages Dec 2, 2019
runtime.txt Bump python version due to vulnerabilities (#984) Feb 14, 2019

README.md

open-humans

Codeship Status for OpenHumans/open-humans codecov.io

This repository contains the code for the Open Humans Website.

The local development environment

dependencies

  • python >=3.6
  • pip3
  • virtualenv (pip3 install virtualenv)
  • nodejs 6.x
  • npm 3.x
  • libffi (apt-get install libffi-dev in Debian/Ubuntu or brew install libffi in OSX)
  • libpq (apt-get install libpq in Debian/Ubuntu or brew install libpq in OSX)
  • postgres (apt-get install libpq-dev python3-dev and apt-get install postgresql postgresql-contrib in Debian/Ubuntu)
  • memcached (apt-get install memcached libmemcached-dev or brew install memcached)
  • ChromeDriver for Selenium tests

virtualenv

For the following commands, you'll also want to set up virtualenvwrapper:

Create a virtualenv for Python 3.6, e.g.:

  • mkvirtualenv open-humans --python=/usr/bin/python3.6
  • pip3 install -r requirements.txt -r dev-requirements.txt

In the future, start the virtual environment with:

  • workon open-humans

And update it after pulling updated code by repeating:

  • pip3 install -r requirements.txt -r dev-requirements.txt

node.js dependencies (primarily for gulp)

  • npm install -g gulp
  • npm install

Update after pulling updated code by repeating:

  • npm install

create your postgres database

Running this site requires a PostgreSQL database (even for local development).

  • In Debian/Ubuntu
    • Become the postgres user: sudo su - postgres
    • Create a database (example name 'mydb'): createdb mydb
    • Create a user (example user 'jdoe'): createuser -P jdoe
    • Enter the password at prompt (example password: 'pa55wd')
    • run PostgreSQL command line: psql
      • Give this user privileges on this database, e.g.:
        GRANT ALL PRIVILEGES ON DATABASE mydb TO jdoe;
      • Also allow this user to create new databases (needed for running tests), e.g.:
        ALTER USER jdoe CREATEDB;
      • Quit: \q
    • Exit postgres user login: exit

Set up environment settings

Use env.example as a starting point. Copy this to .env and modify with your own settings.

Initialize or update the database

Do this at the beginning, and update when pulling updated code by running:

  • ./manage.py migrate

Additional setup

For additional setup information see docs/SETUP.md.

Running the development server

  • ./manage.py runserver

Running tests

You need to process static files before you can run tests.

  1. ./manage.py collectstatic
  2. ./manage.py test

Linting & formatting

Please use black to format code prior to commits. Set up a pre-commit hook by running the following:

  1. pre-commit install
You can’t perform that action at this time.