Skip to content

Commit

Permalink
v0.8.10 (tableau#388)
Browse files Browse the repository at this point in the history
* added anvoa to supported pre-deployed models in tabpy (tableau#350)

* added anvoa to supported pre-deployed models in tabpy

* fixed pep8 issue

* fixed md

* Add Ctrl+C handler (tableau#348)

* Add Ctrl+C handler

* Fix unit tests warnings for genson

* Add test to increase code coverage

* Add

* Change default from 10Mb to 100Mb for request size

* Increase code coverage

* Increase code coverage

* Convert buffer size to int

* Add Ctrl+C test

* Delete test added to the wrong folder

* Update CHANGELOG

* Update test_app.py

* Remove dead code

* Don't count coverage for multiline expressions

* Add test case for invalid protocol

* Add test case for _check_endpoint_name

* Remove dead code

* Fix vulnerabilities found by LGTM (tableau#361)

* Fix vulnerabilities found by LGTM

* Fix test failures

* Dev improvements (tableau#384)

* Fix flake8 warnings

* Merge from master

* Fix pycodestyle

* Fix more flake8 warnings

* Fix tests to pass again

* Create test_coveralls_codestyle.yml (tableau#382)

* Use github actions

* Documentation improvements (tableau#385)

* Delete .travis.yml

* Fix Ctrl+C failing on extra parameter in signal handler

* Remove outdated documentation for how to configure connection

* tabpy.py to use docopt

* Update tabpy-user with docopt

* Update CHANGELOG

* Fix code style

* Change regex, add remove method, and edit qeury_timeout (tableau#375)

* Added Client.remove method to delete deployed model

* Fix bug for query_timeout types

* Update CHANGELOG

* Fix missing script result/return bug

* Fix github workflow for push

* Code improvement: app._parse_config (tableau#391)

* Update app.py

* v0.8.10 (tableau#392)

* Collect test coverage with scrutinizer instead of coveralls

* Restore coverage collecting with coveralls

* Update scrutinizer settings

* Add support for Python 3.8

* Fix static page and add unit test for it

* Delete obsolete test

* Dev cov (tableau#394)

* Collect test coverage with scrutinizer instead of coveralls

* Restore coverage collecting with coveralls

* Update scrutinizer settings

* Add support for Python 3.8

* Fix static page and add unit test for it

* Delete obsolete test

* Restore scrutinizer configuration

* Linting as separate build step

* Restore scrutinizer configuration

* Update .scrutinizer.yml

* Update .scrutinizer.yml

* Restore scrutinizer configuration

* Update pull_request.yml

* Code style improvements

* Code style improvements

* Code style improvements

Co-authored-by: sbabayan <[email protected]>
Co-authored-by: Brennan Bugbee <[email protected]>
  • Loading branch information
3 people authored Jan 14, 2020
1 parent 53016e7 commit 38fde42
Show file tree
Hide file tree
Showing 59 changed files with 743 additions and 454 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Lint

on: [push, pull_request]

jobs:
lint:
name: ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
matrix:
python-version: [3.7]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v1

- 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
pip install -r requirements_test.txt
pip install -r requirements_dev.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Markdownlint
uses: nosborn/[email protected]
with:
files: .
89 changes: 89 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Test Run on Pull Request

on: [pull_request]

jobs:
ubuntu-build:
name: ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v1

- 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
pip install -r requirements_test.txt
pip install -r requirements_dev.txt
- name: Test with pytest
run: |
pytest tests --cov=tabpy
coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

windows-build:
name: ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
matrix:
python-version: [3.7, 3.8]
os: [windows-latest]

steps:
- uses: actions/checkout@v1

- 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
pip install -r requirements_test.txt
- name: Test with pytest
run: |
pytest tests
mac-build:
name: ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
matrix:
python-version: [3.7, 3.8]
os: [macos-latest]

steps:
- uses: actions/checkout@v1

- 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
pip install -r requirements_test.txt
- name: Test with pytest
run: |
pytest tests
89 changes: 89 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Test Run on Push

on: [push]

jobs:
ubuntu-build:
name: ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v1

- 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
pip install -r requirements_test.txt
pip install -r requirements_dev.txt
- name: Test with pytest
run: |
pytest tests --cov=tabpy
coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

windows-build:
name: ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
matrix:
python-version: [3.7, 3.8]
os: [windows-latest]

steps:
- uses: actions/checkout@v1

- 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
pip install -r requirements_test.txt
- name: Test with pytest
run: |
pytest tests
mac-build:
name: ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
matrix:
python-version: [3.7, 3.8]
os: [macos-latest]

steps:
- uses: actions/checkout@v1

- 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
pip install -r requirements_test.txt
- name: Test with pytest
run: |
pytest tests
2 changes: 1 addition & 1 deletion .pep8speaks.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File : .pep8speaks.yml

flake8:
max-line-length: 88
max-line-length: 98
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
"python.testing.unittestEnabled": false,
"python.testing.nosetestsEnabled": false,
"python.testing.pytestEnabled": true,
"python.linting.pep8Enabled": true
"python.linting.pycodestyleEnabled": true
}
17 changes: 17 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## v0.8.10

### Improvements

- TabPy works with Python 3.8 now.
- Documentation updates with referencing Tableau Help pages.
- Added Client.remove() method for deleting deployed models.


### Bug Fixes

- Fixed failing Ctrl+C handler.
- Fixed query_timeout bug.
- Fixed None in result collection bug.
- Fixed script evaluation with missing result/return bug.
- Fixed startup failure on Windows for Python 3.8.

## v0.8.9

### Improvements
Expand Down
39 changes: 9 additions & 30 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,9 @@ and run it locally.
These are prerequisites for an environment required for a contributor to
be able to work on TabPy changes:

- Python 3.6.5:
- Python 3.6 or 3.7:
- To see which version of Python you have installed, run `python --version`.
- git
- TabPy repo:
- Get the latest TabPy repository with
`git clone https://github.com/tableau/TabPy.git`.
- Create a new branch for your changes.
- When changes are ready push them on github and create merge request.
- PIP packages - install all with
`pip install pytest pycodestyle autopep8 twine coverage --upgrade` command
- Node.js for npm packages - install from <https://nodejs.org>.
- NPM packages - install all with
`npm install markdown-toc markdownlint` command.
Expand All @@ -57,16 +50,13 @@ be able to work on TabPy changes:
cd TabPy
```

4. Register TabPy repo as a pip package:

```sh
pip install -e .
```

5. Install all dependencies:
4. Install all dependencies:

```sh
python setup.py install
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements_dev.txt
pip install -r requirements_test.txt
```

## Tests
Expand Down Expand Up @@ -99,7 +89,7 @@ You can run unit tests to collect code coverage data. To do so run `pytest`
either for server or tools test, or even combined:

```sh
pytest tests --cov=tabpy-server/tabpy_server --cov=tabpy-tools/tabpy_tools --cov-append
pytest tests --cov=tabpy
```

## TabPy in Python Virtual Environment
Expand Down Expand Up @@ -151,21 +141,10 @@ Access-Control-Allow-Methods = GET, OPTIONS, POST

## Code styling

`pycodestyle` is used to check Python code against our style conventions:

```sh
pycodestyle .
```

For reported errors and warnings either fix them manually or auto-format files with
`autopep8`.

Run the tool for a file. In the example below `-i`
option tells `autopep8` to update the file. Without the option it
outputs formatted code to the console.
`flake8` is used to check Python code against our style conventions:

```sh
autopep8 -i tabpy-server/server_tests/test_pwd_file.py
flake8 .
```

## Publishing TabPy Package
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/tableau/TabPy/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/tableau/TabPy/?branch=master)

[![Python 3.6](https://img.shields.io/badge/python-3.6-blue.svg)](https://www.python.org/downloads/release/python-360/)
[![Python 3.7](https://img.shields.io/badge/python-3.7-blue.svg)](https://www.python.org/downloads/release/python-370/)

![Release](https://img.shields.io/github/release/tableau/TabPy.svg)

Expand Down
Loading

0 comments on commit 38fde42

Please sign in to comment.