From 79e3b8df11a1eecf97bbf83cf1b451dbcc890bbc Mon Sep 17 00:00:00 2001 From: Jac Fitzgerald Date: Mon, 6 Jun 2022 22:17:32 -0700 Subject: [PATCH 1/3] update pypi task to check tags --- .github/workflows/publish-pypi.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 2b3b8fa3e..dbc4a15e6 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -6,8 +6,8 @@ name: Publish to PyPi on: workflow_dispatch: push: - branches: - - master + tags: + - 'v*.*.*' jobs: build-n-publish: @@ -19,12 +19,13 @@ jobs: fetch-depth: 0 - uses: actions/setup-python@v1 with: - python-version: 3.8 + python-version: 3.7 - name: Build dist files run: | python -m pip install --upgrade pip pip install -e .[test] python setup.py sdist --formats=gztar + git describe --tag --dirty --always - name: Publish distribution 📦 to Test PyPI uses: pypa/gh-action-pypi-publish@release/v1 # license BSD-2 with: From cda78539cfc271660900a0a21c9be3ef79c8dcf8 Mon Sep 17 00:00:00 2001 From: Jac Fitzgerald Date: Mon, 6 Jun 2022 23:05:38 -0700 Subject: [PATCH 2/3] add wheel to publishing step --- .github/workflows/publish-pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index dbc4a15e6..9b4e842ee 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -24,7 +24,7 @@ jobs: run: | python -m pip install --upgrade pip pip install -e .[test] - python setup.py sdist --formats=gztar + python setup.py sdist --formats=gztar bdist_wheel git describe --tag --dirty --always - name: Publish distribution 📦 to Test PyPI uses: pypa/gh-action-pypi-publish@release/v1 # license BSD-2 From 2c149360a3d90854818c004cecc616395c6a2e44 Mon Sep 17 00:00:00 2001 From: Jac Fitzgerald Date: Fri, 22 Jul 2022 16:57:32 -0700 Subject: [PATCH 3/3] add black step --- .github/workflows/run-tests.yml | 4 ++++ tableauserverclient/models/project_item.py | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 60a209b61..b8596c233 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -25,6 +25,10 @@ jobs: python -m pip install --upgrade pip pip install -e .[test] + - name: Format with black + run: | + black --check --line-length 120 tableauserverclient samples test + - name: Test with pytest if: always() run: | diff --git a/tableauserverclient/models/project_item.py b/tableauserverclient/models/project_item.py index 9237d134e..acb14ce91 100644 --- a/tableauserverclient/models/project_item.py +++ b/tableauserverclient/models/project_item.py @@ -9,9 +9,6 @@ from typing import List, Optional -from typing import List, Optional, TYPE_CHECKING - - class ProjectItem(object): class ContentPermissions: LockedToProject: str = "LockedToProject"