Skip to content

Commit

Permalink
Merge pull request #5 from liquidata-inc/oscarbatori/fix-merge-semantics
Browse files Browse the repository at this point in the history
Update commit semantics for empty commits
  • Loading branch information
Oscar Batori authored Dec 4, 2019
2 parents 8a64444 + 9587be5 commit 726354d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 9 additions & 5 deletions doltpy/etl/loaders.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Callable, List
import io
from doltpy.core.dolt import UPDATE, Dolt
from doltpy.core.dolt import UPDATE, Dolt, DoltException
import pandas as pd
import hashlib
import importlib
Expand Down Expand Up @@ -171,10 +171,14 @@ def inner(repo: Dolt):
tables_updated = [writer(repo) for writer in table_writers]

if commit:
logger.info('Committing to repo located in {} for tables:\n{}'.format(repo.repo_dir, tables_updated))
for table in tables_updated:
repo.add_table_to_next_commit(table)
repo.commit(message)
if not repo.repo_is_clean():
logger.info('Committing to repo located in {} for tables:\n{}'.format(repo.repo_dir, tables_updated))
for table in tables_updated:
repo.add_table_to_next_commit(table)
repo.commit(message)

else:
logger.warning('No changes to repo in:\n{}'.format(repo.repo_dir))

if original_branch != repo.get_current_branch():
logger.info('Checked out {} from {}, checking out {} to restore state'.format(repo.get_current_branch(),
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from setuptools import setup, find_packages

setup(name='doltpy',
version='0.0.4',
version='0.0.5',
packages=find_packages(),
install_requires=['pandas>=0.25.0', 'pyarrow>=0.14.1', 'mysql-connector-python==8.0.17', 'retry>=0.9.2'],
author='Liquidata',
author_email='oscar@liquidata.co',
description='A Python package for using Dolt database via Python.',
url='https://github.com/liquidata-inc/doltpy',
download_url='https://github.com/liquidata-inc/doltpy/archive/v0.0.4.tar.gz',
download_url='https://github.com/liquidata-inc/doltpy/archive/v0.0.5.tar.gz',
keywords=['Dolt', 'Liquidata', 'DoltHub', 'ETL', 'ELT'],
project_urls={'Bug Tracker': 'https://github.com /liquidata-inc/core/issues'},
entry_points={
Expand Down

0 comments on commit 726354d

Please sign in to comment.