Skip to content

Commit

Permalink
properly include and load migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
snopoke committed Jan 25, 2018
1 parent 77d0c2c commit 8b3d2e3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion commcare_export/checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
import logging
import uuid

import os

from commcare_export.writers import SqlMixin

logger = logging.getLogger(__name__)
repo_root = os.path.abspath(os.path.join(__file__, os.pardir, os.pardir))


class CheckpointManager(SqlMixin):
table_name = 'commcare_export_runs'
migrations_repository = 'migrations'
migrations_repository = os.path.join(repo_root, 'migrations')

def set_checkpoint(self, query, query_md5, checkpoint_time=None, run_complete=False):
logger.info('Setting checkpoint')
Expand Down
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ def run_tests(self):
author_email = '[email protected]',
url = "https://github.com/dimagi/commcare-export",
entry_points = { 'console_scripts': ['commcare-export = commcare_export.cli:entry_point'] },
packages = ['commcare_export'],
data_files = [(os.path.join('share', 'commcare-export', 'examples'), glob.glob('examples/*.json') + glob.glob('examples/*.xlsx'))],
package_data = {'': ['VERSION']},
packages = setuptools.find_packages(exclude=['tests*']),
data_files = [
(os.path.join('share', 'commcare-export', 'examples'), glob.glob('examples/*.json') + glob.glob('examples/*.xlsx')),
],
include_package_data=True,
license = 'MIT',
install_requires = [
'alembic',
Expand Down

0 comments on commit 8b3d2e3

Please sign in to comment.