Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b518881
configure black (#133)
jacalata Jun 24, 2022
648d7b2
Jac/args (#134)
jacalata Jul 8, 2022
9f21a45
Fix exit_with_error handling (#137)
bcantoni Jul 8, 2022
d493cdd
TFS 1428581 publish project (#139)
jacalata Jul 10, 2022
e099732
Jac/groups (#140)
jacalata Jul 12, 2022
e62bc12
Update session.py (#141)
jacalata Jul 13, 2022
2ad6352
Fix export success log message params (#142)
bcantoni Jul 13, 2022
313e486
Jac/tfs 1428582 create edit site (#146)
jacalata Jul 15, 2022
c1f3941
Getting workbook works as expected, but appends extra file extensions
bhuvneshdev Jul 18, 2022
52a4793
Fix get view, get csv (#143)
jacalata Jul 18, 2022
869068d
merge conflicts resolved
bhuvneshdev Jul 18, 2022
1a9435c
Merge pull request #149 from tableau/bhuvnesh.singh/1427042
bhuvneshdev Jul 19, 2022
7696434
Change install destination (#150)
bcantoni Jul 19, 2022
d000dc4
Jac/publish to folder (#145)
jacalata Jul 26, 2022
fdcb18d
Jac/delete command (#144)
jacalata Aug 1, 2022
cc4ee24
Jac/e2e test workflow (#154)
jacalata Aug 3, 2022
7fb7b9c
Add command to list items of a given content type (#153)
jacalata Aug 5, 2022
6722d61
make export use filters, add tests (#164)
jacalata Sep 1, 2022
c8451db
Fix some e2e tests (#166)
jacalata Sep 8, 2022
ed3efea
Trace logging and bug fix (#165)
jacalata Sep 8, 2022
a12ee64
Merge branch 'main' into development
jacalata Sep 8, 2022
5eb3d7c
Update run-e2-tests.yml
jacalata Sep 8, 2022
9afddcb
Merge branch 'main' into development
jacalata Sep 8, 2022
9aea40f
Implement command line and url parameters for get/export (#175)
jacalata Sep 12, 2022
a92d7f4
remove setup.py from build steps
jacalata Sep 13, 2022
4eeca1d
Jac/update build scripts (#182)
jacalata Sep 29, 2022
a8d0e66
Jac/image export (#186)
jacalata Oct 11, 2022
cf75a1f
tfs 1427025: Confusing error message related to sign-in (#187)
jacalata Oct 11, 2022
8592753
add arguments to publish command (#181)
jacalata Oct 11, 2022
b96cc08
Improve confusing help message for signing in (#190)
jacalata Oct 18, 2022
6be0c25
extract encryption defaults to false (#193)
jacalata Nov 1, 2022
e88f3ab
call sites endpoint correctly (#194)
jacalata Nov 9, 2022
35ec9af
publish data source to Tableau Cloud for published live connection w…
jacalata Nov 9, 2022
d747da6
Merge branch 'main' into development
jacalata Nov 10, 2022
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
7 changes: 4 additions & 3 deletions .github/workflows/check-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ jobs:
run: |
python --version
python -m pip install --upgrade pip
pip install -e .[build]
pip install -e .[test]
python -m pip install --upgrade build
pip install .
pip install .[test]
doit version
python setup.py build
python -m build

# https://github.com/marketplace/actions/pytest-coverage-comment
- name: Generate coverage report
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/generate-metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@ jobs:

- name: Install App and Extras
run: |
python --version
python -m pip install --upgrade pip
python -m pip install -e .[build]
python -m pip install --upgrade build
pip install .
pip install .[test]
doit version
python setup.py build
python -m build

- name: Generate dependencies list
- name: Run license check
run: python bin/license-checker.py

- name: Type-check
Expand All @@ -35,7 +38,10 @@ jobs:
run: black . --check

- name: Generate pyinstaller specs
run: echo Using locally generated specs
# pyi-makespec tabcmd\tabcmd.py -n tabcmd-windows -i res\tabcmd.ico -F -c --version-file versionfile.txt --onefile --collect-data tabcmd.locales &&
# pyi-makespec tabcmd\tabcmd.py -n tabcmd-mac -i res\tabcmd.icns -F -c --version-file versionfile.txt --onefile --collect-data tabcmd.locales --osx-bundle-identifier com.tableau.tabcmd
# 3. Unix
run: |
echo "Using manually generated specs"

# todo: add hidden dependencies to these command lines
# pyi-makespec tabcmd\tabcmd.py -n tabcmd-windows -i res\tabcmd.ico -F -c --version-file versionfile.txt --onefile --collect-data tabcmd.locales
# pyi-makespec tabcmd\tabcmd.py -n tabcmd-mac -i res\tabcmd.icns -F -c --version-file versionfile.txt --onefile --collect-data tabcmd.locales --osx-bundle-identifier com.tableau.tabcmd
# 3. Unix
16 changes: 9 additions & 7 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@ jobs:
TARGET: windows
CMD_BUILD: >
pyinstaller tabcmd-windows.spec --clean --noconfirm --distpath ./dist/windows
OUT_FILE_NAME: tabcmd.exe
OUT_FILE_NAME: tabcmd-windows.exe
ASSET_MIME: application/vnd.microsoft.portable-executable
- os: macos-latest
TARGET: macos
CMD_BUILD: >
pyinstaller tabcmd-mac.spec --clean --noconfirm --distpath ./dist/macos &&
cwd && ls && ls dist
pyinstaller tabcmd-mac.spec --clean --noconfirm --distpath ./dist/macos && ls && ls dist
# zip -r9 mac tabcmd-mac*
OUT_FILE_NAME: tabcmd-mac.app # tabcmd.zip
ASSET_MIME: application/zip
Expand All @@ -54,10 +53,13 @@ jobs:

- name: Install dependencies and build
run: |
pip install -e .[build]
pip install -e .[package]
python --version
python -m pip install --upgrade pip
python -m pip install --upgrade build
pip install .
pip install .[test]
doit version
python setup.py build
python -m build

- name: Package with pyinstaller for ${{matrix.TARGET}}
run: ${{matrix.CMD_BUILD}}
Expand All @@ -66,7 +68,7 @@ jobs:
uses: WebFreak001/upload-asset@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions
OS: windows # just a variable we use in the name pattern
OS: windows # a variable we use in the name pattern?
with:
file: ./dist/${{ matrix.TARGET }}/tabcmd/${{ matrix.OUT_FILE_NAME}}
mime: ${{ matrix.ASSET_MIME}} # required by GitHub API
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ jobs:
python-version: 3.8
- name: Build dist files
run: |
pip install -e .[build]
python --version
python -m pip install --upgrade pip
python -m pip install --upgrade build
pip install .
pip install .[package]
doit version
python setup.py sdist --formats=gztar
python -m build
- name: Publish distribution 📦 to Test PyPI
if: ${{ inputs.is_draft }}
uses: pypa/gh-action-pypi-publish@release/v1 # license BSD-2
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/run-e2-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ jobs:
run: |
python --version
python -m pip install --upgrade pip
pip install -e .[build]
pip install -e .[test]
python -m pip install --upgrade build
pip install .
pip install .[test]
doit version
python setup.py build
python -m build

- name: Run e2e tests
run: |
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ jobs:
run: |
python --version
python -m pip install --upgrade pip
pip install -e .[build]
pip install -e .[test]
python -m pip install --upgrade build
pip install .
pip install .[test]
doit version
python setup.py build
python -m build

- name: Test with pytest
run: pytest
68 changes: 67 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,73 @@
[build-system]
requires = ["build", "setuptools>=62", "wheel", "setuptools_scm>=6.2"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
"local_scheme"= "no-local-version" # require pypi supported versions always
local_scheme = "no-local-version" # require pypi supported versions always
[tool.setuptools]
packages = ["tabcmd"]
[tool.setuptools.package-data]
tabcmd = ["tabcmd.locales/**/*.mo"]
[tool.black]
line-length = 120
target-version = ['py37', 'py38', 'py39', 'py310']
extend-exclude = '^/bin/*'
[tool.mypy]
disable_error_code = [
'misc',
'import'
]
files = ["tabcmd", "tests"]
show_error_codes = true
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--junitxml=./test.junit.xml"

[project]
name="tabcmd"
dynamic = ["version"]
description="A command line client for working with Tableau Server."
authors = [{name="Tableau", email="github@tableau.com"}]
license = {file = "LICENSE"}
readme = "README.md"
requires-python = ">=3.7"
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10"
]
dependencies = [
'argparse',
"appdirs",
"doit",
"ftfy",
"polling2",
"pyinstaller_versionfile",
"requests>=2.11,<3.0",
"setuptools_scm",
"types-appdirs",
"types-mock",
"types-requests",
"types-setuptools",
"tableauserverclient>=0.19",
"urllib3>=1.24.3,<2.0",
]
[project.optional-dependencies]
test = [
"black",
"mock",
"mypy",
"pytest>=7.0",
"pytest-cov",
"pytest-order",
"pytest-runner",
"requests-mock>=1.0,<2.0"]
localize = ["doit", "ftfy"]
package = ["pyinstaller>=5.1"]
[project.urls]
repository = "https://github.com/tableau/tabcmd"
[project.scripts]
tabcmd = "tabcmd.tabcmd:main"
10 changes: 0 additions & 10 deletions setup.cfg

This file was deleted.

65 changes: 3 additions & 62 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,63 +1,4 @@
from setuptools import setup, find_packages
# legacy stub setup.py, do not add configuration here
from setuptools import setup

setup(
name="tabcmd",
author="Tableau",
author_email="github@tableau.com",
description="A command line client for working with Tableau Server.",
long_description="A command line client for working with Tableau Server.",
license="MIT",
url="https://github.com/tableau/tabcmd",
python_requires=">=3.7",
packages=find_packages(),
package_data={"tabcmd": ["tabcmd.locales/**/*.mo"]},
include_package_data=True,
entry_points={"console_scripts": ["tabcmd = tabcmd.tabcmd:main"]},
setup_requires=[
# copy of pyproject.toml for back compat
"build",
"setuptools>=62",
"setuptools_scm>=6.2",
"wheel",
],
install_requires=[
"polling2",
"requests>=2.11,<3.0",
"tableauserverclient>=0.19",
"urllib3>=1.24.3,<2.0",
],
extras_require={
"localize": [
"doit",
"ftfy",
],
"build": [
"appdirs",
"black",
"doit",
"ftfy",
"mypy",
"pyinstaller_versionfile",
"setuptools>=62",
"setuptools_scm",
"types-appdirs",
"types-mock",
"types-requests",
"types-setuptools",
],
"package": [
"pyinstaller>=5.1",
"pyinstaller-versionfile",
],
"test": [
"mock",
"pytest",
"pytest-cov",
"pytest-order",
"pytest-runner",
"requests-mock>=1.0,<2.0",
],
},
test_suite="tests",
zip_safe=False,
)
setup()
2 changes: 1 addition & 1 deletion tabcmd-linux.spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ a = Analysis(
pathex=[],
binaries=[],
datas=datas,
hiddenimports=[],
hiddenimports=['tableauserverclient', 'requests.packages.urllib3', 'pkg_resources'],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
Expand Down
2 changes: 1 addition & 1 deletion tabcmd-mac.spec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ a = Analysis(
pathex=[],
binaries=[],
datas=datas,
hiddenimports=[],
hiddenimports=['tableauserverclient', 'requests.packages.urllib3', 'pkg_resources'],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
Expand Down
2 changes: 1 addition & 1 deletion tabcmd-windows.spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ a = Analysis(
pathex=[],
binaries=[],
datas=datas,
hiddenimports=[],
hiddenimports=['tableauserverclient', 'requests', 'pkg_resources'],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
Expand Down
2 changes: 1 addition & 1 deletion tabcmd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ a = Analysis(
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hiddenimports=['tableauserverclient', 'requests.packages.urllib3', 'pkg_resources'],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
Expand Down
6 changes: 3 additions & 3 deletions tabcmd/commands/auth/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def create_session(self, args):
self._read_existing_state()
self._update_session_data(args)
self.logging_level = args.logging_level or self.logging_level
self.logger = log(__name__, self.logging_level)
self.logger = self.logger or log(__class__.__name__, self.logging_level)

credentials = None
if args.password:
Expand Down Expand Up @@ -245,8 +245,8 @@ def create_session(self, args):
signed_in_object = self._sign_in(credentials)

if not signed_in_object:
missing_var = _("editdomain.errors.requires_nickname_name").format("username", "token")
Errors.exit_with_error(self.logger, _("session.errors.missing_arguments").format(missing_var))
message = "Run 'tabcmd login -h' for details on required arguments"
Errors.exit_with_error(self.logger, _("session.errors.missing_arguments").format(message))
if args.no_cookie:
self._remove_json()
else:
Expand Down
Loading