Skip to content

Commit

Permalink
Merge from master
Browse files Browse the repository at this point in the history
  • Loading branch information
ogolovatyi authored and ogolovatyi committed Feb 15, 2020
2 parents 48c3e22 + 4f11a29 commit 49d0f9c
Show file tree
Hide file tree
Showing 21 changed files with 124 additions and 207 deletions.
15 changes: 0 additions & 15 deletions .coveragerc

This file was deleted.

61 changes: 2 additions & 59 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: Test Run on Pull Request
on: [pull_request]

jobs:
ubuntu-build:
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]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v1
Expand All @@ -27,63 +27,6 @@ jobs:
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
62 changes: 3 additions & 59 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: Test Run on Push
on: [push]

jobs:
ubuntu-build:
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]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v1
Expand All @@ -27,63 +27,7 @@ jobs:
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
55 changes: 34 additions & 21 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,37 @@
build:
environment:
python: 3.6
nodes:
analysis:
project_setup:
override:
- pip install sklearn pandas numpy textblob nltk scipy
tests:
override:
- py-scrutinizer-run
-
command: pylint-run
use_website_config: true
tests: true
environment:
python: 3.7.6
nodes:
coverage:
project_setup:
override:
- pip install -r requirements.txt
- pip install -r requirements_test.txt
- pip install -r requirements_dev.txt
tests:
override:
- command: 'pytest tests --cov=tabpy --cov-config=setup.cfg'
coverage:
file: '.coverage'
config_file: 'setup.cfg'
format: 'py-cc'
analysis:
project_setup:
override:
- pip install -r requirements_test.txt
tests:
override:
- py-scrutinizer-run
-
command: pylint-run
use_website_config: true
tests: true
checks:
python:
code_rating: true
duplicate_code: true
python:
code_rating: true
duplicate_code: true
filter:
excluded_paths:
- '*/test/*'
dependency_paths:
- 'lib/*'
excluded_paths:
- '*/tests/*'
dependency_paths:
- 'lib/*'
22 changes: 20 additions & 2 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
# Changelog

## v0.8.10
## v1.0.0

### Improvements

- Minor: feature name changed to analytics extensions.
- Startup script files deleted.
- Index page updated.

### Other

- TabPy is now Tableau Supported (used to be Community Supported).

## v0.9.0

### Improvements

- Models deployment doesn't depend on pip._internal anymore.
- Package size reduced.

## v0.8.13

### 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.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,5 @@ python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
To install package from TestPyPi use the command:

```sh
pip install -i https://test.pypi.org/simple/ tabpy
pip install --upgrade -i https://test.pypi.org/simple/ tabpy
```
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
exclude \
tabpy/tabpy_server/state.ini

include \
CHANGELOG \
LICENSE \
Expand Down
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
# TabPy

[![Community Supported](https://img.shields.io/badge/Support%20Level-Community%20Supported-457387.svg)](https://www.tableau.com/support-levels-it-and-developer-tools)
[![Tableau Supported](https://img.shields.io/badge/Support%20Level-Tableau%20Supported-53bd92.svg)](https://www.tableau.com/support-levels-it-and-developer-tools)
[![GitHub](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://raw.githubusercontent.com/Tableau/TabPy/master/LICENSE)
[![Build Status](https://img.shields.io/travis/com/tableau/TabPy.svg?branch=master)](https://travis-ci.com/tableau/TabPy)
[![Coverage Status](https://img.shields.io/coveralls/github/tableau/TabPy.svg)](https://coveralls.io/github/tableau/TabPy)

[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/tableau/tabpy/Test%20Run%20on%20Push)](https://github.com/tableau/TabPy/actions?query=workflow%3A%22Test+Run+on+Push%22)
![Scrutinizer coverage](https://img.shields.io/scrutinizer/coverage/g/tableau/tabpy)
[![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/)

[![Python 3.8](https://img.shields.io/badge/python-3.8-blue.svg)](https://www.python.org/downloads/release/python-380/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tabpy?label=PyPI%20Python%20versions)
![PyPI - Wheel](https://img.shields.io/pypi/wheel/tabpy)
[![PyPI version](https://badge.fury.io/py/tabpy.svg)](https://pypi.python.org/pypi/tabpy/)
![Release](https://img.shields.io/github/release/tableau/TabPy.svg)

TabPy (the Tableau Python Server) is an external service implementation which expands
Tableau's capabilities by allowing users to execute Python scripts and saved functions
via Tableau's table calculations.
TabPy (the Tableau Python Server) is an Analytices Extension implementation which
expands Tableau's capabilities by allowing users to execute Python scripts and
saved functions via Tableau's table calculations.

Consider reading TabPy documentation in the following order:

Expand All @@ -36,9 +40,13 @@ More technical topics:

Other useful resources:

* [Tableau Sci-Fi Blog](http://tabscifi.com/) provides tips, tricks, under
the hood, useful resources, and technical details for how to extend
Tableau with data science.
* [Known Issues for the Tableau Analytics Extensions API](https://tableau.github.io/analytics-extensions-api/docs/ae_known_issues.html).
* For all questions not related to the TabPy code (installation, deployment,
connections, Python issues, etc.) and requests use the
[External Services Forum](https://community.tableau.com/community/forums/externalservices)
[Analytics Extensions Forum](https://community.tableau.com/community/forums/analyticsextensions)
on [Tableau Community](https://community.tableau.com).
* [Building advanced analytics applications with TabPy](https://www.tableau.com/about/blog/2017/1/building-advanced-analytics-applications-tabpy-64916)
* [Building Data Science Applications with TabPy Video Tutorial](https://youtu.be/nRtOMTnBz_Y)
Expand Down
1 change: 1 addition & 0 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ TabPy uses Tornado 5.1.1. To it to your Python environment run

Check your Python version (`python -V` command) - TabPy doesn't work with
Python 3.8. It is recommended to use Python 3.6 or 3.7 for now.
The root cause for the failure - [Tornado issue](https://github.com/tornadoweb/tornado/issues/2608).
4 changes: 2 additions & 2 deletions docs/TableauConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ configure Tableau to use this service for evaluating Python code.

To configure Tableau Desktop version 10.1 or later to connect to TabPy server
follow steps at Tableau
[Configure an external service connection](https://help.tableau.com/current/pro/desktop/en-us/r_connection_manage.htm#configure-an-external-service-connection)
[Configure an Analytics Extension connection](https://help.tableau.com/current/pro/desktop/en-us/r_connection_manage.htm#configure-an-external-service-connection)
documentation page.

### Tableau Server 2018.2 and Newer Versions

To configure Tableau Server 2018.2 and newer versions to connect to TabPy server
follow instructions on Tableau
[Configure Connections to External Services](https://onlinehelp.tableau.com/current/server/en-us/tsm.htm)
[Configure Connections to Analytics Extensions](https://onlinehelp.tableau.com/current/server/en-us/tsm.htm)
page.

Specific details about how to configure a secure connection to TabPy, enable or
Expand Down
17 changes: 3 additions & 14 deletions docs/server-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* [Deleting an Account](#deleting-an-account)
- [Logging](#logging)
* [Request Context Logging](#request-context-logging)
- [Custom Script Timeout](#custom-script-timeout)

<!-- tocstop -->

Expand Down Expand Up @@ -89,7 +88,9 @@ at [`logging.config` documentation page](https://docs.python.org/3.6/library/log
in Megabytes. All requests of exceeding size are rejected. Default value is
100 Mb.
- `TABPY_EVALUATE_TIMEOUT` - script evaluation timeout in seconds. Default
value - `30`.
value - `30`. This timeout does not apply when evaluating models either
through the `/query` method, or using the `tabpy.query(...)` syntax with
the `/evaluate` method.

### Configuration File Example

Expand Down Expand Up @@ -294,15 +295,3 @@ arg1, _arg2):
No passwords are logged.

NOTE the request context details are logged with INFO level.

## Custom Script Timeout

By default, all custom scripts executed through `POST /evaluate` may run for up
to 30.0 s before being terminated. To configure this timeout, uncomment
`TABPY_EVALUATE_TIMEOUT = 30` in the default config under
`tabpy-server/tabpy_server/common/default.conf` and replace `30` with the float
value of your choice representing the timeout time in seconds, or add such an
entry to your custom config.

This timeout does not apply when evaluating models either through the `/query`
method, or using the `tabpy.query(...)` syntax with the `/evaluate` method.
Loading

0 comments on commit 49d0f9c

Please sign in to comment.