-
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 #45 from bxparks/develop
merge v1.0 into master
- Loading branch information
Showing
11 changed files
with
233 additions
and
110 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: BigQuery Schema Generator CI | ||
|
||
on: | ||
push: | ||
branches: [ develop ] | ||
pull_request: | ||
branches: [ develop ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
# 3.5 does not support f-strings | ||
python-version: [3.6, 3.7, 3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
# pip install -r requirements.txt | ||
- name: Lint with flake8 | ||
run: | | ||
pip install flake8 | ||
# Stop the build for most python errors. | ||
# W503 and W504 are both enabled by default and contradictory, so we | ||
# have to suppress one of them. | ||
# E501 complains that 80 > 79 columns, but 80 is the default line wrap | ||
# in vim. | ||
flake8 . --count --ignore E501,W503 --show-source --statistics | ||
# Exit-zero treats all errors as warnings. Vim editor defaults to 80. | ||
# The complexity warning is not useful... in fact the whole thing is | ||
# not useful, so turn it off. | ||
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=80 | ||
# --statistics | ||
- name: Test with unittest | ||
run: | | ||
python -m unittest |
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,4 @@ | ||
.PHONY: tests | ||
|
||
tests: | ||
python3 -m unittest |
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
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 |
---|---|---|
|
@@ -4,28 +4,29 @@ | |
try: | ||
import pypandoc | ||
long_description = pypandoc.convert('README.md', 'rst', format='md') | ||
except: | ||
except: # noqa: E722 | ||
# If unable to convert, try inserting the raw README.md file. | ||
try: | ||
with open('README.md', encoding="utf-8") as f: | ||
long_description = f.read() | ||
except: | ||
except: # noqa: E722 | ||
# If all else fails, use some reasonable string. | ||
long_description = 'BigQuery schema generator.' | ||
|
||
setup(name='bigquery-schema-generator', | ||
version='0.5.1', | ||
description='BigQuery schema generator from JSON or CSV data', | ||
long_description=long_description, | ||
url='https://github.com/bxparks/bigquery-schema-generator', | ||
author='Brian T. Park', | ||
author_email='[email protected]', | ||
license='Apache 2.0', | ||
packages=['bigquery_schema_generator'], | ||
python_requires='~=3.5', | ||
entry_points={ | ||
'console_scripts': [ | ||
setup( | ||
name='bigquery-schema-generator', | ||
version='1.0', | ||
description='BigQuery schema generator from JSON or CSV data', | ||
long_description=long_description, | ||
url='https://github.com/bxparks/bigquery-schema-generator', | ||
author='Brian T. Park', | ||
author_email='[email protected]', | ||
license='Apache 2.0', | ||
packages=['bigquery_schema_generator'], | ||
python_requires='~=3.6', | ||
entry_points={ | ||
'console_scripts': [ | ||
'generate-schema = bigquery_schema_generator.generate_schema:main' | ||
] | ||
} | ||
}, | ||
) |
Oops, something went wrong.