From 50167d993a7cba087e14d3a269d42241c4cb8017 Mon Sep 17 00:00:00 2001 From: Brian Cantoni Date: Tue, 2 Aug 2022 18:19:48 -0700 Subject: [PATCH 01/11] Remove extra print statement recently added for debugging --- tableaudocumentapi/field.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tableaudocumentapi/field.py b/tableaudocumentapi/field.py index 54d2446..0da6d84 100644 --- a/tableaudocumentapi/field.py +++ b/tableaudocumentapi/field.py @@ -70,7 +70,6 @@ def _initialize_from_metadata_xml(self, xmldata): self._apply_attribute(xmldata, field_name, lambda x: getattr(xmldata.find('.//{}'.format(metadata_name)), 'text', None), read_name=metadata_name) - print(metadata_name, field_name) self.apply_metadata(xmldata) @classmethod From 1ef3d9b9c118bfd598abdf058b848a8843028012 Mon Sep 17 00:00:00 2001 From: Brian Cantoni Date: Tue, 2 Aug 2022 18:26:45 -0700 Subject: [PATCH 02/11] Fix style --- samples/preserve-namespaces/preserve-namespaces.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/preserve-namespaces/preserve-namespaces.py b/samples/preserve-namespaces/preserve-namespaces.py index 13642a1..0ecd424 100644 --- a/samples/preserve-namespaces/preserve-namespaces.py +++ b/samples/preserve-namespaces/preserve-namespaces.py @@ -16,7 +16,7 @@ def assertContainsUserNamespace(filename): lineCount += 1 found = doc_beginning_excerpt.rfind("xmlns:user=") print(doc_beginning_excerpt[found:found+10]) - assert(found >= 0) + assert (found >= 0) ############################################################ From b4531e9842260be8a0856027db68f6e8ec8b0040 Mon Sep 17 00:00:00 2001 From: Brian Cantoni Date: Fri, 4 Nov 2022 09:27:50 -0700 Subject: [PATCH 03/11] Prep v0.11 release --- CHANGELOG.md | 4 +++- setup.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e927c32..1a18c16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## 011 (November 2022) +* Remove extraneous debug print statements ## 010 (June 2022) * Add service/schema attributes @@ -6,7 +8,7 @@ * Add attribute for hidden field ## 09 (December 2021) -* Pypi upgraded to Python3 +* PyPI upgraded to Python3 ## 08 (October 2021) * See dashboards in a workbook diff --git a/setup.py b/setup.py index 4264448..90668ae 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='tableaudocumentapi', - version='0.10', + version='0.11', author='Tableau', author_email='github@tableau.com', url='https://github.com/tableau/document-api-python', From 5033b4a1193c98b1e6839c2a3d0a24f758f6baac Mon Sep 17 00:00:00 2001 From: Jac Date: Fri, 3 Mar 2023 13:32:47 -0800 Subject: [PATCH 04/11] change support label to As-Is (#248) --- README.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 3ae1b5f..beb0263 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,11 @@ # document-api-python -[![Tableau Supported](https://img.shields.io/badge/Support%20Level-Tableau%20Supported-53bd92.svg)](https://www.tableau.com/support-levels-it-and-developer-tools) +[![As-Is](https://img.shields.io/badge/Support%20Level-As--Is-e8762c.svg)](https://www.tableau.com/support-levels-it-and-developer-tools) -This repo contains Python source and example files for the Tableau Document API. - -For more information, see the documentation: - - Document API --------------- -The Document API provides a supported way to programmatically make updates to Tableau workbook and data source files. If you've been making changes to these file types by directly updating the XML--that is, by XML hacking--this SDK is for you :) +This repo contains Python source and example files for the Tableau Document API. +The Document API provides a useful but *unsupported* way to programmatically make updates to Tableau workbook and data source files. If you've been making changes to these file types by directly updating the XML--that is, by XML hacking--this SDK is for you :) Get help from other users on the [Tableau Community Forums](https://community.tableau.com/s/topic/0TO4T000000SF3sWAG/document-api). Features include: - Support for TWB, TWBX, TDE and TDSX files starting roughly back to Tableau 9.x @@ -27,8 +23,9 @@ Features include: - Get all fields in a data source - Get all fields in use by certain sheets in a workbook +- It *doesn't* support creating files from scratch, adding extracts into workbooks or data sources, or updating field information. As of 2021, this SDK no longer supports Python 2. + 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 +For more information, see the [Document API documentation](https://tableau.github.io/document-api-python) -As of 2021, this SDK no longer supports Python 2. From ffefee5cb12e1a2816a235788eb15431cc9e92f3 Mon Sep 17 00:00:00 2001 From: Brian Cantoni Date: Thu, 15 Feb 2024 12:11:00 -0800 Subject: [PATCH 05/11] Clarify in docs this is an unsupported library - clarify this is an unsupport library "as is" (we already mention that in the readme, but not in the docs) - update to a better link for Hyper API --- docs/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index 9c54d74..cfd15c7 100644 --- a/docs/index.md +++ b/docs/index.md @@ -13,7 +13,7 @@ layout: home # Document API Overview This repo contains Python source and example files for the Tableau Document API. -The Document API provides a supported way to programmatically make updates to Tableau workbook and data source files. If you've been making changes to these file types by directly updating the XML--that is, by XML hacking--this SDK is for you. +The Document API provides an *unsupported* way to programmatically make updates to Tableau workbook and data source files. If you've been making changes to these file types by directly updating the XML--that is, by XML hacking--this SDK is for you. Features include: @@ -32,6 +32,6 @@ 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 a 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. From 8779c65fb7a234a82cc30beec5ff5586a8afe75c Mon Sep 17 00:00:00 2001 From: Alzavio Date: Sun, 24 Mar 2024 10:13:45 -0700 Subject: [PATCH 06/11] Documented the dashboard method --- docs/docs/api-ref.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docs/api-ref.md b/docs/docs/api-ref.md index e6491f2..5d57487 100644 --- a/docs/docs/api-ref.md +++ b/docs/docs/api-ref.md @@ -40,6 +40,8 @@ Saves any changes to the workbook to a new file specified by the `new_file` para `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 + ## Datasources ```python class Datasource(dsxml, filename=None) From e5c24af2faec9d82fbe9593e67c0306f58241e13 Mon Sep 17 00:00:00 2001 From: vvnt Date: Wed, 5 Jun 2024 18:02:13 +0200 Subject: [PATCH 07/11] Typo --- docs/docs/api-ref.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/api-ref.md b/docs/docs/api-ref.md index 5d57487..365634a 100644 --- a/docs/docs/api-ref.md +++ b/docs/docs/api-ref.md @@ -68,7 +68,7 @@ A class representing Tableau Data Sources, embedded in workbook files or in TDS `self.name` Returns string with the name of datasource. -`self.version` Returns string of daatasource's version. +`self.version` Returns string of datasource's version. `self.caption` Returns string of user defined name of datasource if exists. From b9ad0a16044fdd9ed639c621a55f5b0cc76f1d5b Mon Sep 17 00:00:00 2001 From: Brian Cantoni Date: Wed, 19 Jun 2024 16:11:52 -0700 Subject: [PATCH 08/11] Update company name to Salesforce (#257) --- docs/_includes/footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_includes/footer.html b/docs/_includes/footer.html index 6bfb1db..ce6a282 100644 --- a/docs/_includes/footer.html +++ b/docs/_includes/footer.html @@ -3,7 +3,7 @@

This site is open source. Suggestions and pull requests are welcome on our GitHub page.

-

LEGAL PRIVACY © 2003– TABLEAU SOFTWARE LLC. ALL RIGHTS RESERVED

+

LEGAL PRIVACY © Salesforce, Inc.

Documentation last generated on: {{ site.time }}
From 6af9c49daaf2c00ac048da4ce9181ed03d8f5202 Mon Sep 17 00:00:00 2001 From: Dave Hagen Date: Fri, 22 Nov 2024 13:36:00 -0800 Subject: [PATCH 09/11] @gus W-17274770 Add Cookie Manager and links --- docs/_includes/footer.html | 24 +++++++++++++++++------- docs/_includes/head.html | 8 ++++++++ docs/css/main.css | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 7 deletions(-) diff --git a/docs/_includes/footer.html b/docs/_includes/footer.html index ce6a282..1b50f51 100644 --- a/docs/_includes/footer.html +++ b/docs/_includes/footer.html @@ -1,9 +1,19 @@
-
- -

This site is open source. Suggestions and pull requests are welcome on our GitHub page.

-

LEGAL PRIVACY © Salesforce, Inc.

- Documentation last generated on: {{ site.time }} -
-
+ + + \ No newline at end of file diff --git a/docs/_includes/head.html b/docs/_includes/head.html index 47d9f92..858a412 100644 --- a/docs/_includes/head.html +++ b/docs/_includes/head.html @@ -11,6 +11,14 @@ + + + + + + diff --git a/docs/css/main.css b/docs/css/main.css index f9a61e9..53a6ee3 100644 --- a/docs/css/main.css +++ b/docs/css/main.css @@ -278,3 +278,40 @@ html { word-spacing: 8px; padding-right: 8px; } + +.copyRight { + font-size: 12px; + } + + .footer-links { + display: flex; + justify-content: center; + list-style: none; + padding: 0; + flex-wrap: wrap; + } + + .footer-links li { + margin: 0 15px; + } + + .footer-links a { + text-decoration: none; + transition: color 0.3s; + font-size: 12px; + } + + .footer-links a:hover { + text-decoration: underline; + } + + /* One Trust Cookie Manager + -------------------- */ + #ot-pc-content, .ot-title-cntr, .ot-pc-footer { + font-size: 1.6rem; + } + + #ot-pc-footer { + font-size: 1.4rem; + } + From 39d596746dc4213991ff6da2a82a4cc8bb069dfe Mon Sep 17 00:00:00 2001 From: Brian Cantoni Date: Fri, 14 Nov 2025 10:33:16 -0800 Subject: [PATCH 10/11] Add codeowners file and get workflows working again (#266) * Add standard Salesforce codeowners file * Update workflow Python versions * Fix and get the workflows working again --- .github/workflows/publish-pypi.yml | 12 +++--- .github/workflows/python-package.yml | 64 +++++++++++++--------------- CODEOWNERS | 2 + requirements.txt | 4 ++ 4 files changed, 41 insertions(+), 41 deletions(-) create mode 100644 CODEOWNERS create mode 100644 requirements.txt diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 9c208c4..d732afc 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -1,6 +1,5 @@ name: Publish to PyPi - on: workflow_dispatch: push: @@ -11,24 +10,23 @@ jobs: name: Build dist files for PyPi runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.13 - 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 + 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 + uses: pypa/gh-action-pypi-publish@release/v1 # license BSD-2 with: password: ${{ secrets.PYPI_API_TOKEN }} - diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 4bd171f..c99b1e0 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -6,54 +6,50 @@ name: Python package on: push: paths-ignore: - - 'docs/**' + - "docs/**" pull_request: - branches: '*' + branches: "*" jobs: build: - runs-on: ubuntu-latest strategy: fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9, '3.10'] + python-version: ["3.10", "3.11", "3.12", "3.13"] 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 - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Test - run: | - python setup.py test - - + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Test + run: | + python -m unittest discover -v + lint: - runs-on: ubuntu-latest strategy: fail-fast: false matrix: - python-version: [3.9] + python-version: [3.13] 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 - python -m pip install pycodestyle - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Lint with pycodestyle - run: | - pycodestyle tableaudocumentapi test samples - + - 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 + python -m pip install pycodestyle + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with pycodestyle + run: | + pycodestyle tableaudocumentapi test samples diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..10fb2b9 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,2 @@ +#ECCN:Open Source +#GUSINFO:Open Source,Open Source Workflow diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..996f4af --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +lxml +setuptools +packaging +pycodestyle From 447357fc1ad21945b31c0ed20d69593c13cc7921 Mon Sep 17 00:00:00 2001 From: Brian Cantoni Date: Thu, 2 Jul 2026 12:43:50 -0700 Subject: [PATCH 11/11] General updates along with Python 3.14 (#269) * Version upgrade - Add python 3.14 to supported range - Switch tasks to use 3.14 - Upgrade several github actions to their latest versions * Change contributing from a non-functional link to a real pointer * Get Jekyll pages running locally and consistently with server side * Created new Pages workflow along with updated Gemfile instead of GitHub's default server-side build, so the published site matches what you see in local jekyll serve. * Clean up some old files no longer relevant, even though we appreciate our founders here Co-authored by Claude Code. --- .github/workflows/pages.yml | 61 ++++++++++++++++++++++++++++ .github/workflows/publish-pypi.yml | 6 +-- .github/workflows/python-package.yml | 12 +++--- CHANGELOG.md | 59 --------------------------- CONTRIBUTORS.md | 15 ------- contributing.md | 4 +- docs/Gemfile | 8 +++- docs/docs/api-ref.md | 12 +++--- docs/docs/contributing.md | 6 +-- docs/docs/dev-guide.md | 6 +-- docs/docs/index.md | 4 +- docs/index.md | 4 +- tableaudocumentapi/__init__.py | 2 +- 13 files changed, 97 insertions(+), 102 deletions(-) create mode 100644 .github/workflows/pages.yml delete mode 100644 CHANGELOG.md delete mode 100644 CONTRIBUTORS.md mode change 120000 => 100644 contributing.md diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..f5d5961 --- /dev/null +++ b/.github/workflows/pages.yml @@ -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 diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index d732afc..ae9f81b 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -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] && diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index c99b1e0..47ba610 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -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 @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 1a18c16..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,59 +0,0 @@ -## 011 (November 2022) -* Remove extraneous debug print statements - -## 010 (June 2022) -* Add service/schema attributes - -## 091 (March 2022) -* Add attribute for hidden field - -## 09 (December 2021) -* PyPI upgraded to Python3 - -## 08 (October 2021) -* See dashboards in a workbook -* Add shapes property -* Add custom sql -* Drop python 2, add up through 3.9 - -## 07 (26 May 2021) -* Fix bug in xfile that overwrote the namespace name when saving a document - -## 06 (11 January 2017) - -* Initial SQL and query banding support (#123) -* Fixed bug in xfiles to allow opening workbooks with external file caches (#117, #118) -* Code Cleanup (#120, #121) -* Added Py36 support (#124) -* Switched to pycodestyle from pip8 on travis runs (#124) - -## 05 (01 November 2016) - -* Added ability to set the port for connections (#97) -* Added ability to read and write caption for datasources (#99) -* Added documentation - -## 0.4 (07 October 2016) - -* Add ability to remove repository location (#86) -* Fixed bug in connection parsing when federated connections are present (#87) -* Fixed bug in UNICODE support (#80) - -## 0.3 (31 August 2016) - -* Added basic connection class retargeting (#65) -* Added ability to create a new connection (#69) -* Added description to the field object (#73) -* Improved Test Coverage (#62, #67) - -## 0.2 (22 July 2016) - -* Added support for loading twbx and tdsx files (#43, #44) -* Added Fields property to datasource (#45) -* Added Example for using the Fields Property (#51) -* Added Ability to get fields used by a specific sheet (#54) -* Code clean up and test reorganization - -## 0.1 (29 June 2016) - -* Initial Release to the world diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md deleted file mode 100644 index 903e57b..0000000 --- a/CONTRIBUTORS.md +++ /dev/null @@ -1,15 +0,0 @@ -This project wouldn't be possible without our amazing contributors. - -The following people have contributed to this project to make it possible, and we thank them for their contributions! - -## Contributors - -* [Charley Peng](https://github.com/chid) -* [Miguel Sánchez](https://github.com/MiguelSR) -* [Ryan Richmond](https://github.com/r-richmond) - -## Core Team - -* [Tyler Doyle](https://github.com/t8y8) -* [Russell Hay](https://github.com/RussTheAerialist) - diff --git a/contributing.md b/contributing.md deleted file mode 120000 index e047e03..0000000 --- a/contributing.md +++ /dev/null @@ -1 +0,0 @@ -docs/docs/contributing.md \ No newline at end of file diff --git a/contributing.md b/contributing.md new file mode 100644 index 0000000..fd1ef36 --- /dev/null +++ b/contributing.md @@ -0,0 +1,3 @@ +# Contributing + +See the [Contributing guide](https://tableau.github.io/document-api-python/docs/contributing) in the project documentation. diff --git a/docs/Gemfile b/docs/Gemfile index 775d954..83a0e1a 100644 --- a/docs/Gemfile +++ b/docs/Gemfile @@ -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' diff --git a/docs/docs/api-ref.md b/docs/docs/api-ref.md index 365634a..1dd932a 100644 --- a/docs/docs/api-ref.md +++ b/docs/docs/api-ref.md @@ -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 @@ -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:** @@ -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 tag on a field. diff --git a/docs/docs/contributing.md b/docs/docs/contributing.md index 8567996..fc80869 100644 --- a/docs/docs/contributing.md +++ b/docs/docs/contributing.md @@ -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. diff --git a/docs/docs/dev-guide.md b/docs/docs/dev-guide.md index 3905c23..d5cd064 100644 --- a/docs/docs/dev-guide.md +++ b/docs/docs/dev-guide.md @@ -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. @@ -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. diff --git a/docs/docs/index.md b/docs/docs/index.md index 89dcba4..bf8272f 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -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} @@ -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.
diff --git a/docs/index.md b/docs/index.md index cfd15c7..fdf461b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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. diff --git a/tableaudocumentapi/__init__.py b/tableaudocumentapi/__init__.py index 6a10f6f..3c3eaee 100644 --- a/tableaudocumentapi/__init__.py +++ b/tableaudocumentapi/__init__.py @@ -3,5 +3,5 @@ from .datasource import Datasource, ConnectionParser from .workbook import Workbook -__version__ = '0.0.1' +__version__ = '0.11' __VERSION__ = __version__