tabpy 2.12.1__tar.gz → 2.13.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tabpy-2.13.0/.github/ISSUE_TEMPLATE/tabpy-issue-report.md +28 -0
- tabpy-2.13.0/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +36 -0
- tabpy-2.13.0/.github/workflows/coverage.yml +39 -0
- tabpy-2.13.0/.github/workflows/docker-publish.yml +47 -0
- tabpy-2.13.0/.github/workflows/lint.yml +39 -0
- tabpy-2.13.0/.github/workflows/pull_request.yml +32 -0
- tabpy-2.13.0/.github/workflows/push.yml +33 -0
- tabpy-2.13.0/.gitignore +131 -0
- tabpy-2.13.0/.pep8speaks.yml +4 -0
- tabpy-2.13.0/.scrutinizer.yml +41 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/CHANGELOG +7 -0
- tabpy-2.13.0/CONTRIBUTING.md +146 -0
- tabpy-2.13.0/Dockerfile +14 -0
- {tabpy-2.12.1/tabpy.egg-info → tabpy-2.13.0}/PKG-INFO +33 -1
- tabpy-2.13.0/_config.yml +1 -0
- tabpy-2.13.0/app.json +19 -0
- tabpy-2.13.0/codeql-analysis.yml +71 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/docs/tabpy-tools.md +10 -0
- tabpy-2.13.0/start.sh +23 -0
- tabpy-2.13.0/tabpy/VERSION +1 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/handlers/endpoint_handler.py +4 -2
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/management/state.py +2 -2
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_tools/client.py +87 -1
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_tools/custom_query_object.py +11 -5
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_tools/query_object.py +2 -2
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_tools/rest_client.py +2 -0
- {tabpy-2.12.1 → tabpy-2.13.0/tabpy.egg-info}/PKG-INFO +33 -1
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy.egg-info/SOURCES.txt +17 -0
- tabpy-2.13.0/tests/integration/resources/data.csv +47 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/unit/tools_tests/test_client.py +28 -3
- tabpy-2.12.1/tabpy/VERSION +0 -1
- {tabpy-2.12.1 → tabpy-2.13.0}/LICENSE +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/MANIFEST.in +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/Procfile +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/README.md +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/docs/TableauConfiguration.md +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/docs/about.md +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/docs/deploy-to-heroku.md +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/docs/img/Example1-SimpleFunctionCall.png +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/docs/img/Example2-MultipleFunctionCalls.png +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/docs/img/python-calculated-field.png +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/docs/security.md +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/docs/server-config.md +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/docs/server-install.md +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/docs/server-rest.md +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/docs/tabpy-virtualenv.md +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/misc/TabPy.postman_collection.json +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/misc/TabPy.yml +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/requirements.txt +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/requirements_dev.txt +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/setup.cfg +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/setup.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/__init__.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/models/__init__.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/models/deploy_models.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/models/scripts/ANOVA.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/models/scripts/PCA.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/models/scripts/SentimentAnalysis.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/models/scripts/__init__.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/models/scripts/tTest.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/models/utils/__init__.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/models/utils/setup_utils.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/__init__.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/app/__init__.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/app/app.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/app/app_parameters.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/app/arrow_server.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/app/util.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/common/__init__.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/common/default.conf +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/common/endpoint_file_mgr.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/common/messages.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/common/util.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/handlers/__init__.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/handlers/base_handler.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/handlers/basic_auth_server_middleware_factory.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/handlers/endpoints_handler.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/handlers/evaluation_plane_handler.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/handlers/management_handler.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/handlers/no_op_auth_handler.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/handlers/query_plane_handler.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/handlers/service_info_handler.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/handlers/status_handler.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/handlers/upload_destination_handler.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/handlers/util.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/management/__init__.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/management/util.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/psws/__init__.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/psws/callbacks.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/psws/python_service.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/state.ini.template +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/static/TabPy_logo.png +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/static/index.html +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_server/static/tableau.png +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_tools/__init__.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_tools/rest.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/tabpy_tools/schema.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/utils/__init__.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy/utils/tabpy_user.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy.egg-info/dependency_links.txt +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy.egg-info/entry_points.txt +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy.egg-info/requires.txt +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tabpy.egg-info/top_level.txt +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/__init__.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/__init__.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/integ_test_base.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/resources/2019_04_24_to_3018_08_25.crt +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/resources/2019_04_24_to_3018_08_25.key +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/resources/deploy_and_evaluate_model.conf +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/resources/deploy_and_evaluate_model_auth.conf +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/resources/pwdfile.txt +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/test_arrow_server.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/test_auth.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/test_custom_evaluate_timeout.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/test_deploy_and_evaluate_model.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/test_deploy_and_evaluate_model_auth_on.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/test_deploy_and_evaluate_model_ssl.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/test_deploy_model_ssl_off_auth_off.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/test_deploy_model_ssl_off_auth_on.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/test_deploy_model_ssl_on_auth_off.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/test_deploy_model_ssl_on_auth_on.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/test_evaluate.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/test_gzip.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/test_minimum_tls_version.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/test_url.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/integration/test_url_ssl.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/unit/__init__.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/unit/server_tests/__init__.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/unit/server_tests/resources/expired.crt +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/unit/server_tests/resources/future.crt +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/unit/server_tests/resources/valid.crt +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/unit/server_tests/test_config.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/unit/server_tests/test_endpoint_file_manager.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/unit/server_tests/test_endpoint_handler.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/unit/server_tests/test_endpoints_handler.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/unit/server_tests/test_evaluation_plane_handler.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/unit/server_tests/test_pwd_file.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/unit/server_tests/test_service_info_handler.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/unit/tools_tests/__init__.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/unit/tools_tests/test_rest.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/unit/tools_tests/test_rest_object.py +0 -0
- {tabpy-2.12.1 → tabpy-2.13.0}/tests/unit/tools_tests/test_schema.py +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: TabPy Issue Report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: ''
|
|
5
|
+
labels: question
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Environment information:**
|
|
11
|
+
- OS: [Windows, Linux, Mac] and version
|
|
12
|
+
- Python version: [e.g. 3.6.5]
|
|
13
|
+
- TabPy release: [e.g. 0.4.1]
|
|
14
|
+
|
|
15
|
+
**Describe the issue**
|
|
16
|
+
A clear and concise description of what the issue is.
|
|
17
|
+
|
|
18
|
+
**To Reproduce**
|
|
19
|
+
Steps to reproduce the behavior: what commands to run, what files to modify, where to look for an error.
|
|
20
|
+
|
|
21
|
+
**Expected behavior**
|
|
22
|
+
A clear and concise description of what you expected to happen.
|
|
23
|
+
|
|
24
|
+
**Screenshots**
|
|
25
|
+
If applicable, add screenshots to help explain your problem.
|
|
26
|
+
|
|
27
|
+
**Additional context**
|
|
28
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Description
|
|
2
|
+
|
|
3
|
+
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
|
|
4
|
+
|
|
5
|
+
Fixes # (issue)
|
|
6
|
+
|
|
7
|
+
## Type of change
|
|
8
|
+
|
|
9
|
+
Please delete options that are not relevant.
|
|
10
|
+
|
|
11
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
12
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
|
13
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
14
|
+
- [ ] This change requires a documentation update
|
|
15
|
+
|
|
16
|
+
# How Has This Been Tested?
|
|
17
|
+
|
|
18
|
+
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
|
|
19
|
+
|
|
20
|
+
- [ ] Test A
|
|
21
|
+
- [ ] Test B
|
|
22
|
+
|
|
23
|
+
**Test Configuration**:
|
|
24
|
+
* OS and version:
|
|
25
|
+
* Python version:
|
|
26
|
+
|
|
27
|
+
# Checklist:
|
|
28
|
+
|
|
29
|
+
- [ ] My code follows the style guidelines of this project
|
|
30
|
+
- [ ] I have performed a self-review of my own code
|
|
31
|
+
- [ ] I have commented my code, particularly in hard-to-understand areas
|
|
32
|
+
- [ ] I have made corresponding changes to the documentation
|
|
33
|
+
- [ ] My changes generate no new warnings
|
|
34
|
+
- [ ] I have added tests that prove my fix is effective or that my feature works
|
|
35
|
+
- [ ] New and existing unit tests pass locally with my changes
|
|
36
|
+
- [ ] Any dependent changes have been merged and published in downstream modules
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Code coverage
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
name: ${{ matrix.python-version }} on ${{ matrix.os }}
|
|
8
|
+
runs-on: ${{ matrix.os }}
|
|
9
|
+
|
|
10
|
+
strategy:
|
|
11
|
+
matrix:
|
|
12
|
+
python-version: [3.12]
|
|
13
|
+
os: [ubuntu-latest]
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v1
|
|
17
|
+
|
|
18
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
19
|
+
uses: actions/setup-python@v1
|
|
20
|
+
with:
|
|
21
|
+
python-version: ${{ matrix.python-version }}
|
|
22
|
+
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: |
|
|
25
|
+
python -m pip install --upgrade pip
|
|
26
|
+
pip install -r requirements.txt
|
|
27
|
+
pip install -r requirements_dev.txt
|
|
28
|
+
|
|
29
|
+
- name: Test with pytest
|
|
30
|
+
run:
|
|
31
|
+
pytest tests --cov=tabpy --cov-config=setup.cfg
|
|
32
|
+
env:
|
|
33
|
+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
|
34
|
+
|
|
35
|
+
- name: Run coveralls
|
|
36
|
+
run:
|
|
37
|
+
coveralls --service=github
|
|
38
|
+
env:
|
|
39
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: Publish Docker Image for Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
env:
|
|
8
|
+
IMAGE_NAME: tabpy
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
# Push image to GitHub Packages.
|
|
12
|
+
# See also https://docs.docker.com/docker-hub/builds/
|
|
13
|
+
push:
|
|
14
|
+
name: Push Docker image to GitHub Packages
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout the repo
|
|
19
|
+
uses: actions/checkout@v2
|
|
20
|
+
|
|
21
|
+
- name: Build image
|
|
22
|
+
run: docker build . --file Dockerfile --tag $IMAGE_NAME
|
|
23
|
+
|
|
24
|
+
- name: Log into GitHub Container Registry
|
|
25
|
+
run: echo "${{ secrets.CR_PAT }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
|
|
26
|
+
|
|
27
|
+
- name: Push image to GitHub Container Registry
|
|
28
|
+
run: |
|
|
29
|
+
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
|
|
30
|
+
|
|
31
|
+
# Change all uppercase to lowercase
|
|
32
|
+
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
|
|
33
|
+
|
|
34
|
+
# Strip git ref prefix from version
|
|
35
|
+
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
|
36
|
+
|
|
37
|
+
# Strip "v" prefix from tag name
|
|
38
|
+
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
|
|
39
|
+
|
|
40
|
+
# Use Docker `latest` tag convention
|
|
41
|
+
[ "$VERSION" == "master" ] && VERSION=latest
|
|
42
|
+
|
|
43
|
+
echo IMAGE_ID=$IMAGE_ID
|
|
44
|
+
echo VERSION=$VERSION
|
|
45
|
+
|
|
46
|
+
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
|
|
47
|
+
docker push $IMAGE_ID:$VERSION
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Lint
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
lint:
|
|
7
|
+
name: ${{ matrix.python-version }} on ${{ matrix.os }}
|
|
8
|
+
runs-on: ${{ matrix.os }}
|
|
9
|
+
|
|
10
|
+
strategy:
|
|
11
|
+
matrix:
|
|
12
|
+
python-version: [3.12]
|
|
13
|
+
os: [ubuntu-latest]
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v1
|
|
17
|
+
|
|
18
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
19
|
+
uses: actions/setup-python@v1
|
|
20
|
+
with:
|
|
21
|
+
python-version: ${{ matrix.python-version }}
|
|
22
|
+
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: |
|
|
25
|
+
python -m pip install --upgrade pip
|
|
26
|
+
pip install -r requirements.txt
|
|
27
|
+
pip install -r requirements_dev.txt
|
|
28
|
+
|
|
29
|
+
- name: Lint with flake8
|
|
30
|
+
run: |
|
|
31
|
+
# stop the build if there are Python syntax errors or undefined names
|
|
32
|
+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
|
33
|
+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
|
34
|
+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
|
35
|
+
|
|
36
|
+
- name: Markdownlint
|
|
37
|
+
uses: nosborn/github-action-markdown-cli@v1.1.1
|
|
38
|
+
with:
|
|
39
|
+
files: .
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Test Run on Pull Request
|
|
2
|
+
|
|
3
|
+
on: [pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
name: ${{ matrix.python-version }} on ${{ matrix.os }}
|
|
8
|
+
runs-on: ${{ matrix.os }}
|
|
9
|
+
|
|
10
|
+
strategy:
|
|
11
|
+
matrix:
|
|
12
|
+
python-version: ['3.9', '3.10', '3.11', '3.12']
|
|
13
|
+
# TODO: switch macos-13 to macos-latest
|
|
14
|
+
os: [ubuntu-latest, windows-latest, macos-13]
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v1
|
|
18
|
+
|
|
19
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
20
|
+
uses: actions/setup-python@v1
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: |
|
|
26
|
+
python -m pip install --upgrade pip
|
|
27
|
+
pip install -r requirements.txt
|
|
28
|
+
pip install -r requirements_dev.txt
|
|
29
|
+
|
|
30
|
+
- name: Test with pytest
|
|
31
|
+
run: |
|
|
32
|
+
pytest tests
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Test Run on Push
|
|
2
|
+
|
|
3
|
+
on: [push]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
name: ${{ matrix.python-version }} on ${{ matrix.os }}
|
|
8
|
+
runs-on: ${{ matrix.os }}
|
|
9
|
+
|
|
10
|
+
strategy:
|
|
11
|
+
matrix:
|
|
12
|
+
python-version: ['3.9', '3.10', '3.11', '3.12']
|
|
13
|
+
# TODO: switch macos-13 to macos-latest
|
|
14
|
+
os: [ubuntu-latest, windows-latest, macos-13]
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v1
|
|
18
|
+
|
|
19
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
20
|
+
uses: actions/setup-python@v1
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: |
|
|
26
|
+
python -m pip install --upgrade pip
|
|
27
|
+
pip install -r requirements.txt
|
|
28
|
+
pip install -r requirements_dev.txt
|
|
29
|
+
|
|
30
|
+
- name: Test with pytest
|
|
31
|
+
run: |
|
|
32
|
+
pytest tests
|
|
33
|
+
|
tabpy-2.13.0/.gitignore
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.pyc
|
|
6
|
+
|
|
7
|
+
# C extensions
|
|
8
|
+
*.so
|
|
9
|
+
|
|
10
|
+
# Distribution / packaging
|
|
11
|
+
.Python
|
|
12
|
+
build/
|
|
13
|
+
develop-eggs/
|
|
14
|
+
dist/
|
|
15
|
+
downloads/
|
|
16
|
+
eggs/
|
|
17
|
+
.eggs/
|
|
18
|
+
lib/
|
|
19
|
+
lib64/
|
|
20
|
+
parts/
|
|
21
|
+
sdist/
|
|
22
|
+
var/
|
|
23
|
+
wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.coverage
|
|
43
|
+
.coverage.*
|
|
44
|
+
.cache
|
|
45
|
+
nosetests.xml
|
|
46
|
+
coverage.xml
|
|
47
|
+
*.cover
|
|
48
|
+
.hypothesis/
|
|
49
|
+
.pytest_cache/
|
|
50
|
+
*_trial_temp*
|
|
51
|
+
|
|
52
|
+
# Translations
|
|
53
|
+
*.mo
|
|
54
|
+
*.pot
|
|
55
|
+
|
|
56
|
+
# Django stuff:
|
|
57
|
+
*.log
|
|
58
|
+
local_settings.py
|
|
59
|
+
db.sqlite3
|
|
60
|
+
|
|
61
|
+
# Flask stuff:
|
|
62
|
+
instance/
|
|
63
|
+
.webassets-cache
|
|
64
|
+
|
|
65
|
+
# Scrapy stuff:
|
|
66
|
+
.scrapy
|
|
67
|
+
|
|
68
|
+
# Sphinx documentation
|
|
69
|
+
docs/_build/
|
|
70
|
+
|
|
71
|
+
# PyBuilder
|
|
72
|
+
target/
|
|
73
|
+
|
|
74
|
+
# Jupyter Notebook
|
|
75
|
+
.ipynb_checkpoints
|
|
76
|
+
|
|
77
|
+
# pyenv
|
|
78
|
+
.python-version
|
|
79
|
+
|
|
80
|
+
# celery beat schedule file
|
|
81
|
+
celerybeat-schedule
|
|
82
|
+
|
|
83
|
+
# SageMath parsed files
|
|
84
|
+
*.sage.py
|
|
85
|
+
|
|
86
|
+
# Environments
|
|
87
|
+
.env
|
|
88
|
+
.venv
|
|
89
|
+
env/
|
|
90
|
+
venv/
|
|
91
|
+
ENV/
|
|
92
|
+
env.bak/
|
|
93
|
+
venv.bak/
|
|
94
|
+
|
|
95
|
+
# Spyder project settings
|
|
96
|
+
.spyderproject
|
|
97
|
+
.spyproject
|
|
98
|
+
|
|
99
|
+
# Rope project settings
|
|
100
|
+
.ropeproject
|
|
101
|
+
|
|
102
|
+
# mkdocs documentation
|
|
103
|
+
/site
|
|
104
|
+
|
|
105
|
+
# mypy
|
|
106
|
+
.mypy_cache/
|
|
107
|
+
|
|
108
|
+
# NodeJS files and folders
|
|
109
|
+
node_modules/
|
|
110
|
+
package.json
|
|
111
|
+
package-lock.json
|
|
112
|
+
|
|
113
|
+
# OS generated
|
|
114
|
+
.DS_Store
|
|
115
|
+
|
|
116
|
+
# PyCharm
|
|
117
|
+
.idea/
|
|
118
|
+
|
|
119
|
+
# TabPy server artifacts
|
|
120
|
+
tabpy/tabpy_server/state.ini
|
|
121
|
+
tabpy/tabpy_server/query_objects
|
|
122
|
+
tabpy/tabpy_server/staging
|
|
123
|
+
|
|
124
|
+
# VS Code
|
|
125
|
+
*.code-workspace
|
|
126
|
+
.vscode/
|
|
127
|
+
|
|
128
|
+
# etc
|
|
129
|
+
setup.bat
|
|
130
|
+
*~
|
|
131
|
+
tabpy_log.log.*
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
build:
|
|
2
|
+
environment:
|
|
3
|
+
python: 3.12.5
|
|
4
|
+
nodes:
|
|
5
|
+
coverage:
|
|
6
|
+
project_setup:
|
|
7
|
+
override:
|
|
8
|
+
- pip install -r requirements.txt
|
|
9
|
+
- pip install -r requirements_dev.txt
|
|
10
|
+
tests:
|
|
11
|
+
override:
|
|
12
|
+
- command: 'pytest tests --cov=tabpy --cov-config=setup.cfg'
|
|
13
|
+
idle_timeout: 600
|
|
14
|
+
coverage:
|
|
15
|
+
file: '.coverage'
|
|
16
|
+
config_file: 'setup.cfg'
|
|
17
|
+
format: 'py-cc'
|
|
18
|
+
analysis:
|
|
19
|
+
project_setup:
|
|
20
|
+
override:
|
|
21
|
+
- pip install -r requirements.txt
|
|
22
|
+
tests:
|
|
23
|
+
override: [py-scrutinizer-run]
|
|
24
|
+
dependencies:
|
|
25
|
+
override:
|
|
26
|
+
- pip install .
|
|
27
|
+
tests:
|
|
28
|
+
before:
|
|
29
|
+
- pip install -r requirements.txt
|
|
30
|
+
override:
|
|
31
|
+
pytest:
|
|
32
|
+
idle_timeout: 600
|
|
33
|
+
checks:
|
|
34
|
+
python:
|
|
35
|
+
code_rating: true
|
|
36
|
+
duplicate_code: true
|
|
37
|
+
filter:
|
|
38
|
+
excluded_paths:
|
|
39
|
+
- '*/tests/*'
|
|
40
|
+
dependency_paths:
|
|
41
|
+
- 'lib/*'
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# TabPy Contributing Guide
|
|
2
|
+
|
|
3
|
+
<!-- markdownlint-disable MD004 -->
|
|
4
|
+
|
|
5
|
+
<!-- toc -->
|
|
6
|
+
|
|
7
|
+
- [Environment Setup](#environment-setup)
|
|
8
|
+
- [Prerequisites](#prerequisites)
|
|
9
|
+
- [Cloning TabPy Repository](#cloning-tabpy-repository)
|
|
10
|
+
- [Tests](#tests)
|
|
11
|
+
* [Unit Tests](#unit-tests)
|
|
12
|
+
* [Integration Tests](#integration-tests)
|
|
13
|
+
- [Code Coverage](#code-coverage)
|
|
14
|
+
- [TabPy in Python Virtual Environment](#tabpy-in-python-virtual-environment)
|
|
15
|
+
- [Documentation Updates](#documentation-updates)
|
|
16
|
+
- [TabPy with Swagger](#tabpy-with-swagger)
|
|
17
|
+
- [Code styling](#code-styling)
|
|
18
|
+
|
|
19
|
+
<!-- tocstop -->
|
|
20
|
+
|
|
21
|
+
<!-- markdownlint-enable MD004 -->
|
|
22
|
+
|
|
23
|
+
## Environment Setup
|
|
24
|
+
|
|
25
|
+
The purpose of this guide is to enable developers of Tabpy to install the project
|
|
26
|
+
and run it locally.
|
|
27
|
+
|
|
28
|
+
## Prerequisites
|
|
29
|
+
|
|
30
|
+
These are prerequisites for an environment required for a contributor to
|
|
31
|
+
be able to work on TabPy changes:
|
|
32
|
+
|
|
33
|
+
- Supported 64-bit Python version (see
|
|
34
|
+
[README](https://github.com/tableau/TabPy) for a list of compatible versions).
|
|
35
|
+
- git
|
|
36
|
+
- Node.js for npm packages - install from <https://nodejs.org>.
|
|
37
|
+
- NPM packages - install all with
|
|
38
|
+
`npm install markdown-toc markdownlint` command.
|
|
39
|
+
|
|
40
|
+
## Cloning TabPy Repository
|
|
41
|
+
|
|
42
|
+
1. Open your OS shell.
|
|
43
|
+
2. Navigate to the folder in which you would like to save
|
|
44
|
+
your local TabPy repository.
|
|
45
|
+
3. In the command prompt, enter the following commands:
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
git clone https://github.com/tableau/TabPy.git
|
|
49
|
+
cd TabPy
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
4. Install all dependencies:
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
python -m pip install --upgrade pip
|
|
56
|
+
pip install -r requirements.txt
|
|
57
|
+
pip install -r requirements_dev.txt
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Tests
|
|
61
|
+
|
|
62
|
+
To run the whole test suite execute the following command:
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
pytest
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Unit Tests
|
|
69
|
+
|
|
70
|
+
Unit tests suite can be executed with the following command:
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
pytest tests/unit
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Integration Tests
|
|
77
|
+
|
|
78
|
+
Integration tests can be executed with the next command:
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
pytest tests/integration
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Code Coverage
|
|
85
|
+
|
|
86
|
+
You can run unit tests to collect code coverage data. To do so run `pytest`
|
|
87
|
+
either for server or tools test, or even combined:
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
pytest tests --cov=tabpy
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## TabPy in Python Virtual Environment
|
|
94
|
+
|
|
95
|
+
It is possible (and recommended) to run TabPy in a virtual environment. More
|
|
96
|
+
details are on
|
|
97
|
+
[TabPy in Python virtual environment](docs/tabpy-virtualenv.md) page.
|
|
98
|
+
|
|
99
|
+
## Documentation Updates
|
|
100
|
+
|
|
101
|
+
For any process, scripts or API changes documentation needs to be updated accordingly.
|
|
102
|
+
Please use markdown validation tools like web-based [markdownlint](https://dlaa.me/markdownlint/)
|
|
103
|
+
or npm [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli).
|
|
104
|
+
|
|
105
|
+
TOC for markdown file is built with [markdown-toc](https://www.npmjs.com/package/markdown-toc):
|
|
106
|
+
|
|
107
|
+
```sh
|
|
108
|
+
markdown-toc -i docs/server-startup.md
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
To check markdown style for all the documentation use `markdownlint`:
|
|
112
|
+
|
|
113
|
+
```sh
|
|
114
|
+
markdownlint .
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
These checks will run as part of the build if you submit a pull request.
|
|
118
|
+
|
|
119
|
+
## TabPy with Swagger
|
|
120
|
+
|
|
121
|
+
You can invoke the TabPy Server API against a running TabPy instance with Swagger.
|
|
122
|
+
|
|
123
|
+
- Make CORS related changes in TabPy configuration file: update `tabpy/tabpy-server/state.ini`
|
|
124
|
+
file in your local repository to have the next settings:
|
|
125
|
+
|
|
126
|
+
```config
|
|
127
|
+
[Service Info]
|
|
128
|
+
Access-Control-Allow-Origin = *
|
|
129
|
+
Access-Control-Allow-Headers = Origin, X-Requested-with, Content-Type
|
|
130
|
+
Access-Control-Allow-Methods = GET, OPTIONS, POST
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
- Start a local instance of TabPy server following [TabPy Server Startup Guide](docs/server-startup.md).
|
|
134
|
+
- Run a local copy of Swagger editor with steps provided at
|
|
135
|
+
[https://github.com/swagger-api/swagger-editor](https://github.com/swagger-api/swagger-editor).
|
|
136
|
+
- Open `misc/TabPy.yml` in Swagger editor.
|
|
137
|
+
- In case your TabPy server does not run on `localhost:9004` update
|
|
138
|
+
`host` value in `TabPy.yml` accordingly.
|
|
139
|
+
|
|
140
|
+
## Code styling
|
|
141
|
+
|
|
142
|
+
`flake8` is used to check Python code against our style conventions:
|
|
143
|
+
|
|
144
|
+
```sh
|
|
145
|
+
flake8 .
|
|
146
|
+
```
|
tabpy-2.13.0/Dockerfile
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
FROM python:3
|
|
2
|
+
|
|
3
|
+
WORKDIR /app
|
|
4
|
+
|
|
5
|
+
# install the latest TabPy
|
|
6
|
+
RUN python3 -m pip install --upgrade pip && python3 -m pip install --upgrade tabpy
|
|
7
|
+
|
|
8
|
+
# start TabPy
|
|
9
|
+
CMD ["sh", "-c", "tabpy"]
|
|
10
|
+
|
|
11
|
+
# run startup script
|
|
12
|
+
ADD start.sh /
|
|
13
|
+
RUN chmod +x /start.sh
|
|
14
|
+
CMD ["/start.sh"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tabpy
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.13.0
|
|
4
4
|
Summary: Web server Tableau uses to run Python scripts.
|
|
5
5
|
Home-page: https://github.com/tableau/TabPy
|
|
6
6
|
Download-URL: https://pypi.org/project/tabpy
|
|
@@ -34,6 +34,31 @@ Classifier: Operating System :: MacOS
|
|
|
34
34
|
Requires-Python: >=3.7
|
|
35
35
|
Description-Content-Type: text/markdown
|
|
36
36
|
License-File: LICENSE
|
|
37
|
+
Requires-Dist: cloudpickle
|
|
38
|
+
Requires-Dist: configparser
|
|
39
|
+
Requires-Dist: coverage
|
|
40
|
+
Requires-Dist: coveralls
|
|
41
|
+
Requires-Dist: docopt
|
|
42
|
+
Requires-Dist: future
|
|
43
|
+
Requires-Dist: genson
|
|
44
|
+
Requires-Dist: hypothesis
|
|
45
|
+
Requires-Dist: jsonschema
|
|
46
|
+
Requires-Dist: mock
|
|
47
|
+
Requires-Dist: nltk
|
|
48
|
+
Requires-Dist: numpy
|
|
49
|
+
Requires-Dist: pandas
|
|
50
|
+
Requires-Dist: pyopenssl
|
|
51
|
+
Requires-Dist: pytest
|
|
52
|
+
Requires-Dist: pytest-cov
|
|
53
|
+
Requires-Dist: requests
|
|
54
|
+
Requires-Dist: scipy
|
|
55
|
+
Requires-Dist: simplejson
|
|
56
|
+
Requires-Dist: scikit-learn
|
|
57
|
+
Requires-Dist: textblob
|
|
58
|
+
Requires-Dist: tornado
|
|
59
|
+
Requires-Dist: twisted
|
|
60
|
+
Requires-Dist: urllib3
|
|
61
|
+
Requires-Dist: pyarrow
|
|
37
62
|
|
|
38
63
|
|
|
39
64
|
TabPy (the Tableau Python Server) is an external service implementation
|
|
@@ -42,6 +67,13 @@ scripts and saved functions via Tableau's table calculations.
|
|
|
42
67
|
|
|
43
68
|
# Changelog
|
|
44
69
|
|
|
70
|
+
## v2.13.0
|
|
71
|
+
|
|
72
|
+
### Improvements
|
|
73
|
+
|
|
74
|
+
- Add support for deploying functions to a remote TabPy server by setting
|
|
75
|
+
`remote_server=True` when creating the Client instance.
|
|
76
|
+
|
|
45
77
|
## v2.12.0
|
|
46
78
|
|
|
47
79
|
### Improvements
|
tabpy-2.13.0/_config.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
theme: jekyll-theme-minimal
|
tabpy-2.13.0/app.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "TabPy",
|
|
3
|
+
"description": "Analytics Extension implementation which expands Tableau's capabilities by allowing users to execute Python scripts and saved functions via Tableau's table calculations.",
|
|
4
|
+
"repository": "https://github.com/tableau/TabPy",
|
|
5
|
+
"logo": "https://raw.githubusercontent.com/tableau/TabPy/master/tabpy/tabpy_server/static/TabPy_logo.png",
|
|
6
|
+
"keywords": ["tableau", "python", "analytics-extension"],
|
|
7
|
+
"env":{
|
|
8
|
+
"USERNAME":{
|
|
9
|
+
"description": "Add your username",
|
|
10
|
+
"value": "gzanolli",
|
|
11
|
+
"required": true
|
|
12
|
+
},
|
|
13
|
+
"PASSWORD":{
|
|
14
|
+
"description": "Define your password",
|
|
15
|
+
"value": "P@ssw0rd",
|
|
16
|
+
"required": true
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|