From 10e6028aa5d3d79b4987fea2f8332016d3b8998c Mon Sep 17 00:00:00 2001 From: Chris Shin Date: Fri, 12 Feb 2021 11:52:41 -0800 Subject: [PATCH 01/12] Deleting travis --- .travis.yml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 41316d700..000000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -dist: xenial -language: python -python: - - "3.5" - - "3.6" - - "3.7" - - "3.8" -# command to install dependencies -install: - - "pip install -e ." - - "pip install pycodestyle" -# command to run tests -script: - # Tests - - python setup.py test - - pycodestyle tableauserverclient test samples From 0c59670468c176d01221b3abd3b6f5c0b4499105 Mon Sep 17 00:00:00 2001 From: Chris Shin Date: Fri, 12 Feb 2021 11:59:14 -0800 Subject: [PATCH 02/12] Testing actions --- .github/workflows/pipeline.yaml | 29 +++++++++++++++++++++++++++++ setup.py | 3 +-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/pipeline.yaml diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml new file mode 100644 index 000000000..830773949 --- /dev/null +++ b/.github/workflows/pipeline.yaml @@ -0,0 +1,29 @@ +name: Python package + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.5, 3.6, 3.7, 3.8] + + 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 setup.py test + pip install pycodestyle + - name: Lint with pycodestyle + run: | + pycodestyle tableauserverclient test samples + - name: Test with pytest + run: | + pytest \ No newline at end of file diff --git a/setup.py b/setup.py index 5586e4716..7780fc66b 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,6 @@ ], tests_require=[ 'requests-mock>=1.0,<2.0', - 'pytest', - 'mock' + 'pytest' ] ) From add0e9d41a3b5c10ff934d5d9a18d4eafbb9205c Mon Sep 17 00:00:00 2001 From: Chris Shin Date: Fri, 12 Feb 2021 12:00:33 -0800 Subject: [PATCH 03/12] fixing error --- .github/workflows/pipeline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index 830773949..5331db284 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -20,7 +20,7 @@ jobs: run: | python -m pip install --upgrade pip python setup.py test - pip install pycodestyle + pip install pycodestyle pytest - name: Lint with pycodestyle run: | pycodestyle tableauserverclient test samples From a4ee3c5d13d30099dc0c9368b0037bc22d9b1191 Mon Sep 17 00:00:00 2001 From: Chris Shin Date: Fri, 12 Feb 2021 12:01:39 -0800 Subject: [PATCH 04/12] Fixing errors --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 7780fc66b..dae23a4c0 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,6 @@ 'requests>=2.11,<3.0', ], tests_require=[ - 'requests-mock>=1.0,<2.0', - 'pytest' + 'requests-mock>=1.0,<2.0' ] ) From 944689187a7273cfc98e873147633d0d0d5742fe Mon Sep 17 00:00:00 2001 From: Chris Shin Date: Fri, 12 Feb 2021 12:03:05 -0800 Subject: [PATCH 05/12] 3.7 doesn't work? --- .github/workflows/pipeline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index 5331db284..5c58609e5 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.5, 3.6, 3.7, 3.8] + python-version: [3.5, 3.6, 3.8] steps: - uses: actions/checkout@v2 From eac139ca730e1deb6c635d6771d4669a32a57dac Mon Sep 17 00:00:00 2001 From: Chris Shin Date: Fri, 12 Feb 2021 12:04:40 -0800 Subject: [PATCH 06/12] Remove explicit test --- .github/workflows/pipeline.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index 5c58609e5..16603b742 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.5, 3.6, 3.8] + python-version: [3.5, 3.6, 3.7, 3.8] steps: - uses: actions/checkout@v2 @@ -24,6 +24,4 @@ jobs: - name: Lint with pycodestyle run: | pycodestyle tableauserverclient test samples - - name: Test with pytest - run: | - pytest \ No newline at end of file + \ No newline at end of file From f71199e35ab336ef614730349c3b97f768330e2f Mon Sep 17 00:00:00 2001 From: Chris Shin Date: Fri, 12 Feb 2021 13:53:22 -0800 Subject: [PATCH 07/12] testing --- .github/workflows/pipeline.yaml | 10 ++++++---- setup.py | 10 +++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index 16603b742..5f2d4ae1b 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -7,8 +7,9 @@ jobs: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: - python-version: [3.5, 3.6, 3.7, 3.8] + python-version: [3.8] steps: - uses: actions/checkout@v2 @@ -19,9 +20,10 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python setup.py test - pip install pycodestyle pytest + pip install -e .[test] - name: Lint with pycodestyle run: | pycodestyle tableauserverclient test samples - \ No newline at end of file + - name: Test with pytest + run: | + pytest test \ No newline at end of file diff --git a/setup.py b/setup.py index dae23a4c0..c002ef515 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,11 @@ install_requires=[ 'requests>=2.11,<3.0', ], - tests_require=[ - 'requests-mock>=1.0,<2.0' - ] + extras_require={ + 'test': [ + 'requests-mock>=1.0,<2.0', + 'pytest', + 'mock' + ] + } ) From af84e5acc11dc55e94ba7b0b147529eb521685d2 Mon Sep 17 00:00:00 2001 From: Chris Shin Date: Fri, 12 Feb 2021 13:55:05 -0800 Subject: [PATCH 08/12] Adds pycodestyle --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c002ef515..63531fe6b 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,8 @@ 'test': [ 'requests-mock>=1.0,<2.0', 'pytest', - 'mock' + 'mock', + 'pycodestyle' ] } ) From dbdfb2f53b0c17f4e8850db3634c60f01f4e3fdc Mon Sep 17 00:00:00 2001 From: Chris Shin Date: Fri, 12 Feb 2021 13:56:39 -0800 Subject: [PATCH 09/12] Adding back all versions --- .github/workflows/pipeline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index 5f2d4ae1b..d22d7f333 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.8] + python-version: [3.5, 3.6, 3.7, 3.8] steps: - uses: actions/checkout@v2 From 66cf88095e49b500558b28b13f7b2e16c097273b Mon Sep 17 00:00:00 2001 From: Chris Shin Date: Fri, 12 Feb 2021 14:07:36 -0800 Subject: [PATCH 10/12] Testing pycodestyle failure --- tableauserverclient/server/request_factory.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tableauserverclient/server/request_factory.py b/tableauserverclient/server/request_factory.py index 65ce5a069..8e6e1107e 100644 --- a/tableauserverclient/server/request_factory.py +++ b/tableauserverclient/server/request_factory.py @@ -17,6 +17,7 @@ def _add_multipart(parts): return xml_request, content_type + def _tsrequest_wrapped(func): def wrapper(self, *args, **kwargs): xml_request = ET.Element('tsRequest') From 8b28d8c959f236b5424761fccdfb0436fbfe9889 Mon Sep 17 00:00:00 2001 From: Chris Shin Date: Fri, 12 Feb 2021 14:08:36 -0800 Subject: [PATCH 11/12] Testing test failure --- tableauserverclient/server/request_factory.py | 1 - test/test_dataalert.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tableauserverclient/server/request_factory.py b/tableauserverclient/server/request_factory.py index 8e6e1107e..65ce5a069 100644 --- a/tableauserverclient/server/request_factory.py +++ b/tableauserverclient/server/request_factory.py @@ -17,7 +17,6 @@ def _add_multipart(parts): return xml_request, content_type - def _tsrequest_wrapped(func): def wrapper(self, *args, **kwargs): xml_request = ET.Element('tsRequest') diff --git a/test/test_dataalert.py b/test/test_dataalert.py index 7822d3000..f480a58ec 100644 --- a/test/test_dataalert.py +++ b/test/test_dataalert.py @@ -46,7 +46,7 @@ def test_get(self): self.assertEqual('6d13b0ca-043d-4d42-8c9d-3f3313ea3a00', all_alerts[0].workbook_id) self.assertEqual('Safari stats', all_alerts[0].workbook_name) self.assertEqual('5241e88d-d384-4fd7-9c2f-648b5247efc5', all_alerts[0].project_id) - self.assertEqual('Default', all_alerts[0].project_name) + self.assertEqual('Defaultt', all_alerts[0].project_name) def test_get_by_id(self): response_xml = read_xml_asset(GET_BY_ID_XML) From 877081c7f2dbd5ab376aecb9a76f3d47ea4de343 Mon Sep 17 00:00:00 2001 From: Chris Shin Date: Fri, 12 Feb 2021 14:11:48 -0800 Subject: [PATCH 12/12] Last test --- .github/workflows/pipeline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index d22d7f333..2d2e53ec5 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -20,7 +20,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -e .[test] + pip install -e . - name: Lint with pycodestyle run: | pycodestyle tableauserverclient test samples