Skip to content

Commit 2247b12

Browse files
authored
Merge branch 'development' into project_cleanup
2 parents b3d740c + e3f1e22 commit 2247b12

File tree

406 files changed

+31406
-10236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

406 files changed

+31406
-10236
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Bug report
3+
about: Create a bug report or request for help
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**Versions**
14+
Details of your environment, including:
15+
- Tableau Server version (or note if using Tableau Online)
16+
- Python version
17+
- TSC library version
18+
19+
**To Reproduce**
20+
Steps to reproduce the behavior. Please include a code snippet where possible.
21+
22+
**Results**
23+
What are the results or error messages received?
24+
25+
**NOTE:** Be careful not to post user names, passwords, auth tokens or any other private or sensitive information.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Feature Request
3+
title: "[REQUEST TYPE] [FEATURE TITLE]"
4+
about: Suggest a feature that could be added to the client
5+
labels: enhancement, needs investigation
6+
---
7+
8+
## Summary
9+
A one line description of the request. Skip this if the title is already a good summary.
10+
11+
12+
## Request Type
13+
If you know, say which of these types your request is in the title, and follow the suggestions for that type when writing your description.
14+
15+
****Type 1: support a REST API:****
16+
If it is functionality that already exists in the [REST API](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref.htm), example API calls are the clearest way to explain your request.
17+
18+
****Type 2: add a REST API and support it in tsc.****
19+
If it is functionality that can be achieved somehow on Tableau Server but not through the REST API, describe the current way to do it. (e.g: functionality that is available in the Web UI, or by using the Hyper API). For UI, screenshots can be helpful.
20+
21+
****Type 3: new functionality****
22+
Requests for totally new functionality will generally be passed to the relevant dev team, but we probably can't give any useful estimate of how or when it might be implemented. If it is a feature that is 'about' the API or programmable access, here might be the best place to suggest it, but generally feature requests will be more visible in the [Tableau Community Ideas](https://community.tableau.com/s/ideas) forum and should go there instead.
23+
24+
25+
## Description
26+
A clear and concise description of what the feature request is. If you think that the value of this feature might not be obvious, include information like how often it is needed, amount of work saved, etc. If your feature request is related to a file or server in a specific state, describe the starting state when the feature can be used, and the end state after using it. If it involves modifying files, an example file may be helpful.
27+
![](https://img.shields.io/badge/warning-Be%20careful%20not%20to%20post%20user%20names%2C%20passwords%2C%20auth%20tokens%20or%20any%20other%20private%20or%20sensitive%20information-red)
28+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Check Test Coverage
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- development
7+
8+
jobs:
9+
build:
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
os: [ubuntu-latest]
14+
python-version: ['3.10']
15+
16+
runs-on: ${{ matrix.os }}
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install -e .[test]
30+
31+
# https://github.com/marketplace/actions/pytest-coverage-comment
32+
- name: Generate coverage report
33+
run: pytest --junitxml=pytest.xml --cov=tableauserverclient test/ | tee pytest-coverage.txt
34+
35+
- name: Comment on pull request with coverage
36+
continue-on-error: true
37+
uses: MishaKav/pytest-coverage-comment@main
38+
with:
39+
pytest-coverage-path: ./pytest-coverage.txt

.github/workflows/meta-checks.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: types and style checks
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
os: [ubuntu-latest, macos-latest, windows-latest]
11+
python-version: ['3.10']
12+
13+
runs-on: ${{ matrix.os }}
14+
15+
steps:
16+
- name: Get pip cache dir
17+
id: pip-cache
18+
shell: bash
19+
run: |
20+
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
21+
22+
- name: cache
23+
uses: actions/cache@v4
24+
with:
25+
path: ${{ steps.pip-cache.outputs.dir }}
26+
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('pyproject.toml') }}
27+
restore-keys: |
28+
${{ runner.os }}-${{ matrix.python-version }}-pip-
29+
30+
- uses: actions/checkout@v4
31+
32+
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
37+
- name: Install dependencies
38+
run: |
39+
python -m pip install --upgrade pip
40+
pip install -e .[test]
41+
42+
- name: Format with black
43+
run: |
44+
black --check --line-length 120 tableauserverclient samples test
45+
46+
- name: Run Mypy tests
47+
if: always()
48+
run: |
49+
mypy --show-error-codes --disable-error-code misc --disable-error-code import --implicit-optional tableauserverclient test

.github/workflows/publish-pypi.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish to PyPi
2+
3+
# This will publish a package to TestPyPi (and real Pypi if run on master) with a version
4+
# number generated by versioneer from the most recent tag looking like v____
5+
# TODO: maybe move this into the package job so all release-based actions are together
6+
on:
7+
workflow_dispatch:
8+
push:
9+
tags:
10+
- 'v*.*.*'
11+
12+
jobs:
13+
build-n-publish:
14+
name: Build dist files for PyPi
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: 3.9
23+
- name: Build dist files
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install -e .[test] build
27+
python -m build
28+
git describe --tag --dirty --always
29+
30+
- name: Publish distribution 📦 to Test PyPI # always run
31+
uses: pypa/gh-action-pypi-publish@release/v1 # license BSD-2
32+
with:
33+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
34+
repository_url: https://test.pypi.org/legacy/
35+
36+
- name: Publish distribution 📦 to PyPI
37+
if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') }}
38+
uses: pypa/gh-action-pypi-publish@release/v1 # license BSD-2
39+
with:
40+
password: ${{ secrets.PYPI_API_TOKEN }}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This workflow will install TSC from pypi and validate that it runs. For more information see:
2+
# https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Pypi smoke tests
5+
6+
on:
7+
workflow_dispatch:
8+
schedule:
9+
- cron: 0 11 * * * # Every day at 11AM UTC (7AM EST)
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
build:
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
os: [ubuntu-latest, macos-latest, windows-latest]
20+
python-version: ['3.x']
21+
22+
runs-on: ${{ matrix.os }}
23+
24+
steps:
25+
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
- name: pip install
30+
run: |
31+
pip uninstall tableauserverclient
32+
pip install tableauserverclient
33+
- name: Launch app
34+
run: |
35+
python -c "import tableauserverclient as TSC
36+
server = TSC.Server('http://example.com', use_server_version=False)"

.github/workflows/run-tests.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Python tests
2+
3+
on:
4+
pull_request: {}
5+
push:
6+
branches:
7+
- development
8+
- master
9+
10+
jobs:
11+
build:
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest, macos-latest, windows-latest]
16+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
17+
18+
runs-on: ${{ matrix.os }}
19+
20+
steps:
21+
- name: Get pip cache dir
22+
id: pip-cache
23+
shell: bash
24+
run: |
25+
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
26+
27+
- name: cache
28+
uses: actions/cache@v4
29+
with:
30+
path: ${{ steps.pip-cache.outputs.dir }}
31+
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('pyproject.toml') }}
32+
restore-keys: |
33+
${{ runner.os }}-${{ matrix.python-version }}-pip-
34+
35+
- uses: actions/checkout@v4
36+
37+
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
38+
uses: actions/setup-python@v5
39+
with:
40+
python-version: ${{ matrix.python-version }}
41+
42+
- name: Install dependencies
43+
run: |
44+
python -m pip install --upgrade pip
45+
pip install -e .[test] build
46+
47+
- name: Test with pytest
48+
if: always()
49+
run: |
50+
pytest test
51+
52+
- name: Test build
53+
if: always()
54+
run: |
55+
python -m build

.github/workflows/slack.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 💬 Send Message to Slack 🚀
2+
3+
on: [push, pull_request, issues]
4+
5+
jobs:
6+
slack-notifications:
7+
continue-on-error: true
8+
runs-on: ubuntu-20.04
9+
name: Sends a message to Slack when a push, a pull request or an issue is made
10+
steps:
11+
- name: Send message to Slack API
12+
continue-on-error: true
13+
uses: archive/[email protected]
14+
id: notify
15+
with:
16+
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }}
17+
slack-channel: C019HCX84L9
18+
slack-text: Hello! Event "${{ github.event_name }}" in "${{ github.repository }}" 🤓
19+
- name: Result from "Send Message"
20+
run: echo "The result was ${{ steps.notify.outputs.slack-result }}"

.gitignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ var/
2424
*.egg-info/
2525
.installed.cfg
2626
*.egg
27+
pip-wheel-metadata/
2728

2829
# PyInstaller
2930
# Usually these files are written by a python script from a template
@@ -76,23 +77,29 @@ target/
7677
# pyenv
7778
.python-version
7879

80+
# poetry
81+
poetry.lock
82+
7983
# celery beat schedule file
8084
celerybeat-schedule
8185

8286
# dotenv
8387
.env
88+
env.py
8489

8590
# virtualenv
8691
venv/
8792
ENV/
93+
.venv/
8894

8995
# Spyder project settings
9096
.spyderproject
9197

9298
# Rope project settings
9399
.ropeproject
94100

95-
101+
# VSCode project settings
102+
.vscode/
96103

97104
# macOS.gitignore from https://github.com/github/gitignore
98105
*.DS_Store
@@ -148,3 +155,5 @@ $RECYCLE.BIN/
148155
docs/_site/
149156
docs/.jekyll-metadata
150157
docs/Gemfile.lock
158+
samples/credentials
159+
.venv/

.travis.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)