Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 25 additions & 47 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,34 @@
name: Publish to PyPi


on:
workflow_dispatch:
release:
types: [created]
push:
branches: development, main

jobs:

build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Package
run: |
python setup.py sdist
python setup.py bdist_wheel


test-deploy:
if: github.ref_type == 'tag' && contains(github.ref_name, 'test')
needs: build
environment:
name: test-pypi
build-n-publish:
name: Build dist files for PyPi
runs-on: ubuntu-latest
steps:
- name: Publish 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/

- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Build dist files
run: >
python -m pip install --upgrade pip && pip install -e .[build] &&
python setup.py build &&
python setup.py sdist --formats=gztar
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1 # license BSD-2
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1 # license BSD-2
with:
password: ${{ secrets.PYPI_API_TOKEN }}

production-deploy:
needs: build
environment:
name: pypi
runs-on: ubuntu-latest
steps:
- name: Publish 📦 to Real PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
repository_url: https://pypi.org/legacy/
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

## 010 (June 2022)
* Add service/schema attributes

## 091 (March 2022)
* Add attribute for hidden field

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Features include:
- Get all fields in a data source
- Get all fields in use by certain sheets in a workbook

For Hyper files, take a look a the [Tableau Hyper API](https://help.tableau.com/current/api/hyper_api/en-us/index.html).
For Hyper files, take a look at the [Tableau Hyper API](https://help.tableau.com/current/api/hyper_api/en-us/index.html).

We don't support creating files from scratch, adding extracts into workbooks or data sources, or updating field information

Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

setup(
name='tableaudocumentapi',
version='0.9',
version='0.10',
author='Tableau',
author_email='github@tableau.com',
url='https://github.com/tableau/document-api-python',
packages=['tableaudocumentapi'],
license='MIT',
description='A Python module for working with Tableau files.',
long_description="file: README.md",
long_description_content_type="text/markdown",
test_suite='test',
install_requires=['lxml']
)