tabpy 2.7.0__tar.gz → 2.7.1__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.
Files changed (142) hide show
  1. tabpy-2.7.1/.github/ISSUE_TEMPLATE/tabpy-issue-report.md +28 -0
  2. tabpy-2.7.1/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +36 -0
  3. tabpy-2.7.1/.github/workflows/coverage.yml +39 -0
  4. tabpy-2.7.1/.github/workflows/docker-publish.yml +47 -0
  5. tabpy-2.7.1/.github/workflows/lint.yml +39 -0
  6. tabpy-2.7.1/.github/workflows/pull_request.yml +31 -0
  7. tabpy-2.7.1/.github/workflows/push.yml +32 -0
  8. tabpy-2.7.1/.gitignore +131 -0
  9. tabpy-2.7.1/.pep8speaks.yml +4 -0
  10. tabpy-2.7.1/.scrutinizer.yml +35 -0
  11. tabpy-2.7.1/CONTRIBUTING.md +146 -0
  12. tabpy-2.7.1/Dockerfile +14 -0
  13. {tabpy-2.7.0/tabpy.egg-info → tabpy-2.7.1}/PKG-INFO +1 -1
  14. tabpy-2.7.1/_config.yml +1 -0
  15. tabpy-2.7.1/app.json +19 -0
  16. tabpy-2.7.1/codeql-analysis.yml +71 -0
  17. tabpy-2.7.1/start.sh +23 -0
  18. tabpy-2.7.1/tabpy/VERSION +1 -0
  19. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/app/app.py +1 -1
  20. {tabpy-2.7.0 → tabpy-2.7.1/tabpy.egg-info}/PKG-INFO +1 -1
  21. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy.egg-info/SOURCES.txt +17 -0
  22. tabpy-2.7.1/tests/integration/resources/data.csv +47 -0
  23. tabpy-2.7.0/tabpy/VERSION +0 -1
  24. {tabpy-2.7.0 → tabpy-2.7.1}/CHANGELOG +0 -0
  25. {tabpy-2.7.0 → tabpy-2.7.1}/LICENSE +0 -0
  26. {tabpy-2.7.0 → tabpy-2.7.1}/MANIFEST.in +0 -0
  27. {tabpy-2.7.0 → tabpy-2.7.1}/Procfile +0 -0
  28. {tabpy-2.7.0 → tabpy-2.7.1}/README.md +0 -0
  29. {tabpy-2.7.0 → tabpy-2.7.1}/docs/TableauConfiguration.md +0 -0
  30. {tabpy-2.7.0 → tabpy-2.7.1}/docs/about.md +0 -0
  31. {tabpy-2.7.0 → tabpy-2.7.1}/docs/deploy-to-heroku.md +0 -0
  32. {tabpy-2.7.0 → tabpy-2.7.1}/docs/img/Example1-SimpleFunctionCall.png +0 -0
  33. {tabpy-2.7.0 → tabpy-2.7.1}/docs/img/Example2-MultipleFunctionCalls.png +0 -0
  34. {tabpy-2.7.0 → tabpy-2.7.1}/docs/img/python-calculated-field.png +0 -0
  35. {tabpy-2.7.0 → tabpy-2.7.1}/docs/security.md +0 -0
  36. {tabpy-2.7.0 → tabpy-2.7.1}/docs/server-config.md +0 -0
  37. {tabpy-2.7.0 → tabpy-2.7.1}/docs/server-install.md +0 -0
  38. {tabpy-2.7.0 → tabpy-2.7.1}/docs/server-rest.md +0 -0
  39. {tabpy-2.7.0 → tabpy-2.7.1}/docs/tabpy-tools.md +0 -0
  40. {tabpy-2.7.0 → tabpy-2.7.1}/docs/tabpy-virtualenv.md +0 -0
  41. {tabpy-2.7.0 → tabpy-2.7.1}/misc/TabPy.postman_collection.json +0 -0
  42. {tabpy-2.7.0 → tabpy-2.7.1}/misc/TabPy.yml +0 -0
  43. {tabpy-2.7.0 → tabpy-2.7.1}/requirements.txt +0 -0
  44. {tabpy-2.7.0 → tabpy-2.7.1}/requirements_dev.txt +0 -0
  45. {tabpy-2.7.0 → tabpy-2.7.1}/setup.cfg +0 -0
  46. {tabpy-2.7.0 → tabpy-2.7.1}/setup.py +0 -0
  47. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/__init__.py +0 -0
  48. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/models/__init__.py +0 -0
  49. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/models/deploy_models.py +0 -0
  50. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/models/scripts/ANOVA.py +0 -0
  51. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/models/scripts/PCA.py +0 -0
  52. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/models/scripts/SentimentAnalysis.py +0 -0
  53. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/models/scripts/__init__.py +0 -0
  54. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/models/scripts/tTest.py +0 -0
  55. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/models/utils/__init__.py +0 -0
  56. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/models/utils/setup_utils.py +0 -0
  57. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy.py +0 -0
  58. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/__init__.py +0 -0
  59. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/app/__init__.py +0 -0
  60. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/app/app_parameters.py +0 -0
  61. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/app/arrow_server.py +0 -0
  62. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/app/util.py +0 -0
  63. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/common/__init__.py +0 -0
  64. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/common/default.conf +0 -0
  65. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/common/endpoint_file_mgr.py +0 -0
  66. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/common/messages.py +0 -0
  67. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/common/util.py +0 -0
  68. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/handlers/__init__.py +0 -0
  69. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/handlers/base_handler.py +0 -0
  70. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/handlers/basic_auth_server_middleware_factory.py +0 -0
  71. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/handlers/endpoint_handler.py +0 -0
  72. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/handlers/endpoints_handler.py +0 -0
  73. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/handlers/evaluation_plane_handler.py +0 -0
  74. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/handlers/management_handler.py +0 -0
  75. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/handlers/no_op_auth_handler.py +0 -0
  76. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/handlers/query_plane_handler.py +0 -0
  77. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/handlers/service_info_handler.py +0 -0
  78. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/handlers/status_handler.py +0 -0
  79. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/handlers/upload_destination_handler.py +0 -0
  80. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/handlers/util.py +0 -0
  81. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/management/__init__.py +0 -0
  82. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/management/state.py +0 -0
  83. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/management/util.py +0 -0
  84. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/psws/__init__.py +0 -0
  85. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/psws/callbacks.py +0 -0
  86. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/psws/python_service.py +0 -0
  87. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/state.ini.template +0 -0
  88. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/static/TabPy_logo.png +0 -0
  89. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/static/index.html +0 -0
  90. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_server/static/tableau.png +0 -0
  91. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_tools/__init__.py +0 -0
  92. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_tools/client.py +0 -0
  93. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_tools/custom_query_object.py +0 -0
  94. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_tools/query_object.py +0 -0
  95. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_tools/rest.py +0 -0
  96. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_tools/rest_client.py +0 -0
  97. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/tabpy_tools/schema.py +0 -0
  98. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/utils/__init__.py +0 -0
  99. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy/utils/tabpy_user.py +0 -0
  100. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy.egg-info/dependency_links.txt +0 -0
  101. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy.egg-info/entry_points.txt +0 -0
  102. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy.egg-info/requires.txt +0 -0
  103. {tabpy-2.7.0 → tabpy-2.7.1}/tabpy.egg-info/top_level.txt +0 -0
  104. {tabpy-2.7.0 → tabpy-2.7.1}/tests/__init__.py +0 -0
  105. {tabpy-2.7.0 → tabpy-2.7.1}/tests/integration/__init__.py +0 -0
  106. {tabpy-2.7.0 → tabpy-2.7.1}/tests/integration/integ_test_base.py +0 -0
  107. {tabpy-2.7.0 → tabpy-2.7.1}/tests/integration/resources/2019_04_24_to_3018_08_25.crt +0 -0
  108. {tabpy-2.7.0 → tabpy-2.7.1}/tests/integration/resources/2019_04_24_to_3018_08_25.key +0 -0
  109. {tabpy-2.7.0 → tabpy-2.7.1}/tests/integration/resources/deploy_and_evaluate_model.conf +0 -0
  110. {tabpy-2.7.0 → tabpy-2.7.1}/tests/integration/resources/deploy_and_evaluate_model_auth.conf +0 -0
  111. {tabpy-2.7.0 → tabpy-2.7.1}/tests/integration/resources/pwdfile.txt +0 -0
  112. {tabpy-2.7.0 → tabpy-2.7.1}/tests/integration/test_arrow_server.py +0 -0
  113. {tabpy-2.7.0 → tabpy-2.7.1}/tests/integration/test_auth.py +0 -0
  114. {tabpy-2.7.0 → tabpy-2.7.1}/tests/integration/test_custom_evaluate_timeout.py +0 -0
  115. {tabpy-2.7.0 → tabpy-2.7.1}/tests/integration/test_deploy_and_evaluate_model.py +0 -0
  116. {tabpy-2.7.0 → tabpy-2.7.1}/tests/integration/test_deploy_and_evaluate_model_auth_on.py +0 -0
  117. {tabpy-2.7.0 → tabpy-2.7.1}/tests/integration/test_deploy_and_evaluate_model_ssl.py +0 -0
  118. {tabpy-2.7.0 → tabpy-2.7.1}/tests/integration/test_deploy_model_ssl_off_auth_off.py +0 -0
  119. {tabpy-2.7.0 → tabpy-2.7.1}/tests/integration/test_deploy_model_ssl_off_auth_on.py +0 -0
  120. {tabpy-2.7.0 → tabpy-2.7.1}/tests/integration/test_deploy_model_ssl_on_auth_off.py +0 -0
  121. {tabpy-2.7.0 → tabpy-2.7.1}/tests/integration/test_deploy_model_ssl_on_auth_on.py +0 -0
  122. {tabpy-2.7.0 → tabpy-2.7.1}/tests/integration/test_evaluate.py +0 -0
  123. {tabpy-2.7.0 → tabpy-2.7.1}/tests/integration/test_gzip.py +0 -0
  124. {tabpy-2.7.0 → tabpy-2.7.1}/tests/integration/test_url.py +0 -0
  125. {tabpy-2.7.0 → tabpy-2.7.1}/tests/integration/test_url_ssl.py +0 -0
  126. {tabpy-2.7.0 → tabpy-2.7.1}/tests/unit/__init__.py +0 -0
  127. {tabpy-2.7.0 → tabpy-2.7.1}/tests/unit/server_tests/__init__.py +0 -0
  128. {tabpy-2.7.0 → tabpy-2.7.1}/tests/unit/server_tests/resources/expired.crt +0 -0
  129. {tabpy-2.7.0 → tabpy-2.7.1}/tests/unit/server_tests/resources/future.crt +0 -0
  130. {tabpy-2.7.0 → tabpy-2.7.1}/tests/unit/server_tests/resources/valid.crt +0 -0
  131. {tabpy-2.7.0 → tabpy-2.7.1}/tests/unit/server_tests/test_config.py +0 -0
  132. {tabpy-2.7.0 → tabpy-2.7.1}/tests/unit/server_tests/test_endpoint_file_manager.py +0 -0
  133. {tabpy-2.7.0 → tabpy-2.7.1}/tests/unit/server_tests/test_endpoint_handler.py +0 -0
  134. {tabpy-2.7.0 → tabpy-2.7.1}/tests/unit/server_tests/test_endpoints_handler.py +0 -0
  135. {tabpy-2.7.0 → tabpy-2.7.1}/tests/unit/server_tests/test_evaluation_plane_handler.py +0 -0
  136. {tabpy-2.7.0 → tabpy-2.7.1}/tests/unit/server_tests/test_pwd_file.py +0 -0
  137. {tabpy-2.7.0 → tabpy-2.7.1}/tests/unit/server_tests/test_service_info_handler.py +0 -0
  138. {tabpy-2.7.0 → tabpy-2.7.1}/tests/unit/tools_tests/__init__.py +0 -0
  139. {tabpy-2.7.0 → tabpy-2.7.1}/tests/unit/tools_tests/test_client.py +0 -0
  140. {tabpy-2.7.0 → tabpy-2.7.1}/tests/unit/tools_tests/test_rest.py +0 -0
  141. {tabpy-2.7.0 → tabpy-2.7.1}/tests/unit/tools_tests/test_rest_object.py +0 -0
  142. {tabpy-2.7.0 → tabpy-2.7.1}/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.7]
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.7]
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,31 @@
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.7, 3.8, 3.9]
13
+ os: [ubuntu-latest, windows-latest, macos-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
@@ -0,0 +1,32 @@
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.7, 3.8, 3.9]
13
+ os: [ubuntu-latest, windows-latest, macos-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
32
+
tabpy-2.7.1/.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.1
@@ -0,0 +1,4 @@
1
+ # File : .pep8speaks.yml
2
+
3
+ flake8:
4
+ max-line-length: 98
@@ -0,0 +1,35 @@
1
+ build:
2
+ environment:
3
+ python: 3.7.6
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
+ coverage:
14
+ file: '.coverage'
15
+ config_file: 'setup.cfg'
16
+ format: 'py-cc'
17
+ analysis:
18
+ project_setup:
19
+ override:
20
+ - pip install -r requirements.txt
21
+ tests:
22
+ override: [py-scrutinizer-run]
23
+ tests:
24
+ before:
25
+ - pip install -r requirements.txt
26
+ override: [pytest]
27
+ checks:
28
+ python:
29
+ code_rating: true
30
+ duplicate_code: true
31
+ filter:
32
+ excluded_paths:
33
+ - '*/tests/*'
34
+ dependency_paths:
35
+ - '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
+ - Python 3.7, 3.8 or 3.9:
34
+ - To see which version of Python you have installed, run `python --version`.
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.7.1/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.7.0
3
+ Version: 2.7.1
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
@@ -0,0 +1 @@
1
+ theme: jekyll-theme-minimal
tabpy-2.7.1/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
+ }
@@ -0,0 +1,71 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: [ master, dev ]
17
+ pull_request:
18
+ # The branches below must be a subset of the branches above
19
+ branches: [ master ]
20
+ schedule:
21
+ - cron: '0 22 * * 3'
22
+
23
+ jobs:
24
+ analyze:
25
+ name: Analyze
26
+ runs-on: ubuntu-latest
27
+ permissions:
28
+ actions: read
29
+ contents: read
30
+ security-events: write
31
+
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ language: [ 'python' ]
36
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37
+ # Learn more:
38
+ # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
39
+
40
+ steps:
41
+ - name: Checkout repository
42
+ uses: actions/checkout@v2
43
+
44
+ # Initializes the CodeQL tools for scanning.
45
+ - name: Initialize CodeQL
46
+ uses: github/codeql-action/init@v1
47
+ with:
48
+ languages: ${{ matrix.language }}
49
+ # If you wish to specify custom queries, you can do so here or in a config file.
50
+ # By default, queries listed here will override any specified in a config file.
51
+ # Prefix the list here with "+" to use these queries and those in the config file.
52
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
53
+
54
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55
+ # If this step fails, then you should remove it and run the build manually (see below)
56
+ - name: Autobuild
57
+ uses: github/codeql-action/autobuild@v1
58
+
59
+ # ℹ️ Command-line programs to run using the OS shell.
60
+ # 📚 https://git.io/JvXDl
61
+
62
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63
+ # and modify them (or add more) to build your code if your project
64
+ # uses a compiled language
65
+
66
+ #- run: |
67
+ # make bootstrap
68
+ # make release
69
+
70
+ - name: Perform CodeQL Analysis
71
+ uses: github/codeql-action/analyze@v1