Skip to content

Commit

Permalink
Merge pull request #35 from goodwillpunning/publishInitPyPiRelease
Browse files Browse the repository at this point in the history
Update project packaging for PyPI
  • Loading branch information
goodwillpunning authored Aug 17, 2023
2 parents bcce39f + 5f6838b commit f3c77db
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 9 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ select *
"""
hf = HyperFile(name="transaction_history", sql=query, is_dbfs_enabled=True)


# Step 2: Publish Hyper File to a Tableau Server
hf.publish(tableau_server_url,
username,
Expand All @@ -61,7 +60,7 @@ Support, questions, and feature requests can be submitted through the Issues pag
Please understand that issues with the use of this code will not be answered or investigated by Databricks Support.

## Core Contribution team
* Lead Developer: [Will Girten](https://www.linkedin.com/in/willgirten/), RSA, Databricks
* Lead Developer: [Will Girten](https://www.linkedin.com/in/willgirten/), Lead SSA @Databricks
* Puru Shrestha, Sr. BI Developer

## Project Support
Expand All @@ -77,7 +76,7 @@ They will be reviewed as time permits, but there are no formal SLAs for support.
## Building the Project
To build the project: <br>
```
python setup.py bdist_egg
python3 -m build
```

## Running Pytests
Expand Down
Binary file added dist/hyperleaup-0.1.0-py3-none-any.whl
Binary file not shown.
Binary file removed dist/hyperleaup-0.1.0-py3.8.egg
Binary file not shown.
Binary file added dist/hyperleaup-0.1.0.tar.gz
Binary file not shown.
1 change: 0 additions & 1 deletion hyperleaup/__init__.py

This file was deleted.

30 changes: 30 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "hyperleaup"
version = "0.1.0"
authors = [
{ name="Will Girten", email="[email protected]" },
]
description = "Create and publish Tableau Hyper files from Apache Spark DataFrames and Spark SQL."
readme = "README.md"
requires-python = ">=3.6"
keywords = ["Spark", "Tableau", "extract", "hyper"]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
]
dependencies = [
"pyspark",
"tableauhyperapi",
"requests",
"tableauserverclient",
"urllib3"
]

[project.urls]
"Homepage" = "https://github.com/goodwillpunning/hyperleaup"
"Bug Tracker" = "https://github.com/goodwillpunning/hyperleaup/issues"
1 change: 1 addition & 0 deletions src/hyperleaup/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .hyper_file import HyperFile
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions hyperleaup/hyper_file.py → src/hyperleaup/hyper_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
from shutil import copyfile

from pyspark.sql import DataFrame
from tableauhyperapi import HyperProcess, Telemetry, Connection, CreateMode, Inserter
from tableauhyperapi import HyperProcess, TableName, Telemetry, Connection, CreateMode, Inserter

from hyperleaup.creation_mode import CreationMode
from hyperleaup.creator import Creator
from hyperleaup.hyper_utils import HyperUtils
from hyperleaup.publisher import Publisher
from tableauhyperapi import TableName
from hyperleaup.spark_fixture import get_spark_session


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions tests/test_creator.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from pyspark.sql.functions import current_date, current_timestamp, to_date
from pyspark.sql.functions import current_date, current_timestamp
from tableauhyperapi import SqlType, NOT_NULLABLE, NULLABLE, TableDefinition, TableName
from tableauhyperapi import Name

from hyperleaup.creator import convert_struct_field, get_table_def, get_rows, insert_data_into_hyper_file, Creator, \
write_csv_to_local_file_system, write_parquet_to_local_file_system
from pyspark.sql.types import *

from hyperleaup import convert_struct_field, get_table_def, get_rows, insert_data_into_hyper_file, Creator, \
write_csv_to_local_file_system, write_parquet_to_local_file_system
from hyperleaup.spark_fixture import get_spark_session

from tests.test_utils import TestUtils
Expand Down
1 change: 1 addition & 0 deletions tests/test_hyper_file.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os

from hyperleaup import HyperFile
from hyperleaup.spark_fixture import get_spark_session

Expand Down

0 comments on commit f3c77db

Please sign in to comment.