Skip to content

Commit

Permalink
Adding basic integration with data loader
Browse files Browse the repository at this point in the history
  • Loading branch information
pwalsh committed Oct 2, 2013
1 parent 65df09b commit 624690b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ docs/_templates
openbudget/commons/search
static/media/referencesource
static/media/auxsource
tmp/dataset
10 changes: 8 additions & 2 deletions fabfile/local.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from fabric.api import task, local
from fabric.api import task, local, lcd
from fabric.contrib import django
from utilities import notify, warn, alert
from config import CONFIG
Expand Down Expand Up @@ -83,6 +83,12 @@ def init_data():
#local('python manage.py loaddata dev/sources')


@task
def clone_data():
with lcd(settings.OPENBUDGETS_DATA['directory']):
local('git clone ' + settings.OPENBUDGETS_DATA['repo'] + ' dataset')


@task
def pip_update():
local('pip install -U -r requirements.txt')
Expand Down Expand Up @@ -146,7 +152,7 @@ def test_project_js():


@task
def mock_db(amount=1000):
def mock(amount=1000):
notify(u'Creating some mock objects for the database.')

domain = Domain.create(name='Example Domain')
Expand Down
6 changes: 6 additions & 0 deletions openbudget/settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,12 @@

OPENBUDGETS_COMPARABLE_ACROSS_ENTITIES = True

OPENBUDGETS_DATA = {
'repo': 'https://github.com/prjts/open-budgets-data-israel',
'branch': 'master',
'directory': OPENBUDGETS_TEMP_DIR
}


# if we are on production, we should have a settings.production module to load.
try:
Expand Down

0 comments on commit 624690b

Please sign in to comment.