Skip to content

Commit

Permalink
Bugfix on generation, RC2 prep (#41)
Browse files Browse the repository at this point in the history
* Bugfix on generation, RC2 prep

* Use SCM for install

Co-authored-by: John Myers <john@gretel.ai>
  • Loading branch information
johntmyers and John Myers committed Aug 4, 2020
1 parent deb22ec commit f7cf83b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
with open(path.join(this_dir, 'README.md'), encoding='utf-8') as f:
long_description = f.read()

with open(path.join(this_dir, 'VERSION')) as f:
version = f.read()
# with open(path.join(this_dir, 'VERSION')) as f:
# version = f.read()


setup(
name='gretel-synthetics',
version=version,
use_scm_version=True,
setup_requires=["setuptools_scm"],
description='Synthetic Data Generation with optional Differential Privacy',
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down
4 changes: 3 additions & 1 deletion src/gretel_synthetics/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ def generate_next(self, num_lines: int) -> Iterable[gen_text]:
_valid = True
yield gen_text(text=rec, valid=_valid, explain=None, delimiter=self.delim)
except Exception as err:
# logging.warning(f'Line failed validation: {rec} errored with {str(err)}')
# NOTE: this catches any exception raised by the line validator, which
# also creates an invalid record
lines_generated += 1
self.total_invalid += 1
yield gen_text(text=rec, valid=False, explain=str(err), delimiter=self.delim)
else:
Expand Down

0 comments on commit f7cf83b

Please sign in to comment.