-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from bxparks/develop
Initial release of version 0.1 to PyPI.
- Loading branch information
Showing
9 changed files
with
95 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from setuptools import setup | ||
|
||
# Convert README.md to README.rst because PyPI does not support Markdown. | ||
try: | ||
import pypandoc | ||
long_description = pypandoc.convert('README.md', 'rst') | ||
except OSError: | ||
with open('README.md', encoding="utf-8") as f: | ||
long_description = f.read() | ||
|
||
setup(name='bigquery-schema-generator', | ||
version='0.1', | ||
description='BigQuery schema generator', | ||
long_description=long_description, | ||
url='https://github.com/bxparks/bigquery-schema-generator', | ||
author='Brian T. Park', | ||
author_email='brian@xparks.net', | ||
license='Apache 2.0', | ||
packages=['bigquery_schema_generator'], | ||
python_requires='~=3.5') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Tests | ||
|
||
Instead of embedding the input data records and the expected schema into | ||
the `test_generate_schema.py` file, we placed them into the `testdata.txt` | ||
file which is parsed by the unit test program. This has two advantages: | ||
|
||
* we can more easily update the input and output data records, and | ||
* the `testdata.txt` data can be reused for versions written in other languages | ||
|
||
The output of `test_generate_schema.py` should look something like this: | ||
``` | ||
---------------------------------------------------------------------- | ||
Ran 4 tests in 0.002s | ||
OK | ||
Test chunk 1: First record: { "s": null, "a": [], "m": {} } | ||
Test chunk 2: First record: { "s": null, "a": [], "m": {} } | ||
Test chunk 3: First record: { "s": "string", "b": true, "i": 1, "x": 3.1, "t": "2017-05-22T17:10:00-07:00" } | ||
Test chunk 4: First record: { "a": [1, 2], "r": { "r0": "r0", "r1": "r1" } } | ||
Test chunk 5: First record: { "s": "string", "x": 3.2, "i": 3, "b": true, "a": [ "a", 1] } | ||
Test chunk 6: First record: { "a": [1, 2] } | ||
Test chunk 7: First record: { "r" : { "a": [1, 2] } } | ||
Test chunk 8: First record: { "i": 1 } | ||
Test chunk 9: First record: { "i": null } | ||
Test chunk 10: First record: { "i": 3 } | ||
Test chunk 11: First record: { "i": [1, 2] } | ||
Test chunk 12: First record: { "r" : { "i": 3 } } | ||
Test chunk 13: First record: { "r" : [{ "i": 4 }] } | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.