Skip to content
Open
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
61 changes: 61 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Build and deploy the docs/ site to GitHub Pages using the repo's own
# Jekyll 4 Gemfile, so the published site matches a local `jekyll serve`.
# (GitHub's default Pages build uses the github-pages gem / Jekyll 3.9.)
name: Deploy docs to Pages

on:
push:
branches: [master]
paths:
- "docs/**"
- ".github/workflows/pages.yml"
workflow_dispatch:

# Allow GITHUB_TOKEN to deploy to Pages.
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment; don't cancel an in-progress run.
concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- uses: actions/checkout@v7
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4"
bundler-cache: true
working-directory: docs
- name: Configure Pages
id: pages
uses: actions/configure-pages@v6
- name: Build site
env:
JEKYLL_ENV: production
PAGES_BASE_PATH: ${{ steps.pages.outputs.base_path }}
run: bundle exec jekyll build --baseurl "$PAGES_BASE_PATH"
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: docs/_site

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
6 changes: 3 additions & 3 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
name: Build dist files for PyPi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-python@v4
- uses: actions/setup-python@v6
with:
python-version: 3.13
python-version: 3.14
- name: Build dist files
run: >
python -m pip install --upgrade pip && pip install -e .[build] &&
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -37,12 +37,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.13]
python-version: [3.14]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
59 changes: 0 additions & 59 deletions CHANGELOG.md

This file was deleted.

15 changes: 0 additions & 15 deletions CONTRIBUTORS.md

This file was deleted.

1 change: 0 additions & 1 deletion contributing.md

This file was deleted.

3 changes: 3 additions & 0 deletions contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Contributing

See the [Contributing guide](https://tableau.github.io/document-api-python/docs/contributing) in the project documentation.
8 changes: 7 additions & 1 deletion docs/Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins

# Standalone Jekyll 4 runs on modern Ruby (4.0+). We don't use the
# github-pages gem because it pins an old Jekyll/Liquid that is
# incompatible with Ruby 3.2+ (String#untaint was removed).
gem 'jekyll', '~> 4.3'

# webrick was removed from Ruby's default gems in 3.0; needed by `jekyll serve`.
gem 'webrick'
12 changes: 6 additions & 6 deletions docs/docs/api-ref.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ Saves any changes to the workbook to a new file specified by the `new_file` para

`self.worksheets:` Returns a list of worksheets found in the workbook.

`self.datasources:` Returns a list of Datasource objects found in the workbook.
`self.datasources:` Returns a list of datasource objects found in the workbook.

`self.filename:` Returns the filename of the workbook.

`self.shapes` Returns a list of strings with the names of shapes found in the workbook.

`self.dashboards:` Returns a list of strings with the names of the dashboards found in the workbook
`self.dashboards:` Returns a list of strings with the names of the dashboards found in the workbook

## Datasources
```python
Expand All @@ -56,13 +56,13 @@ A class representing Tableau Data Sources, embedded in workbook files or in TDS

`Datasource.save(self)` Saves any changes to the datasource to the existing file.

`Datasource.save_as(self)` Saves any changes to the datasource to a new file specified by the `new_file` parameter.
`Datasource.save_as(self, new_filename)` Saves any changes to the datasource to a new file specified by the `new_filename` parameter.

`Datasource.add_field(self, name, datatype, role, field_type, caption)` Adds a base field object with the given values.
`Datasource.add_field(self, name, datatype, role, field_type, caption, hidden)` Adds a base field object with the given values.

`Datasource.remove_field(self, field)` Remove a given field.

`Datasource.add_calculation(self, caption, formula, datatype, role, type)` Adds a calculated field with the given values.
`Datasource.add_calculation(self, caption, formula, datatype, role, type, hidden)` Adds a calculated field with the given values.

**Properties:**

Expand Down Expand Up @@ -149,7 +149,7 @@ Represents a field in a datasource

`self.calculation` Returns a string with the formula if this field is a calculated field.

`self.default_aggregation` Returns a string with he default type of aggregation on the field (e.g Sum, Avg).
`self.default_aggregation` Returns a string with the default type of aggregation on the field (e.g, Sum, Avg).

`self.description` Returns a string with contents of the <desc> tag on a field.

Expand Down
6 changes: 3 additions & 3 deletions docs/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ somewhere.

## Release process

We expect that everything merged into the development branch is ready to release on master. Releases can be made at any time - ideally it would be on a regular cadence but currently it is basically on request.
We expect that everything merged into the development branch is ready to release on master.
- bump the version in setup.py
- update the changelog: all commits to development should contain a meaningful message, the changelog can be built from these
- merge to master.
This kicks off an automated release in github and then publish to pypi.
- merge to master.
This kicks off an automated release in GitHub and then publish to PyPI.
6 changes: 3 additions & 3 deletions docs/docs/dev-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ layout: docs
1. Run the tests to make sure everything is peachy:

```shell
python setup.py test
python -m unittest discover -v
```

1. Set up the feature, fix, or documentation branch.
Expand All @@ -49,8 +49,8 @@ layout: docs

1. Add tests.

All of our tests live under the `test/` folder in the repository.
We use `unittest` and the built-in test runner `python setup.py test`.
All of our tests live under the `test/` folder in the repository.
We use `unittest` and run them with `python -m unittest discover -v`.
If a test needs a static file, like a twb/twbx, it should live under `test/assets/`

1. Update the documentation.
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Get Started
layout: docs
---

To use this SDK, you must have Python installed. You can use either 2.7.X or 3.3 and later.
To use this SDK, you must have Python 3 installed. The SDK is tested against Python 3.10 and later. (As of 2021, Python 2 is no longer supported.)

* TOC
{:toc}
Expand Down Expand Up @@ -76,7 +76,7 @@ sourceWB.save()
- Import the `Workbook` object from the `tableaudocumentapi` module.
- To open a workbook, instantiate a `Workbook` object and pass the file name as the first argument.
- The `Workbook` object exposes a list of `datasources` in the workbook
- Each data source object has a `connection` object that supports a `server`, `dbname`, and `username` property.
- Each data source object exposes a `connections` list; each connection supports `server`, `dbname`, and `username` properties.
- Save changes to the workbook by calling the `save` or `save_as` method.

<div class="alert alert-info">
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ Features include:
- Server Name
- Username
- Database Name
- Getting Field information from data sources and workbooks
- Getting field information from data sources and workbooks
- 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://tableau.github.io/hyper-db/docs/).
For Hyper files, take a look at the [Tableau Hyper API](https://tableau.github.io/hyper-db/docs/).

We don't yet support creating files from scratch, adding extracts into workbooks or data sources, or updating field information.
2 changes: 1 addition & 1 deletion tableaudocumentapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
from .datasource import Datasource, ConnectionParser
from .workbook import Workbook

__version__ = '0.0.1'
__version__ = '0.11'
__VERSION__ = __version__