-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add the new gooddata-flexfun package
At this point, it is basically a move of the flexfun folder in gooddata-flight-server. In the following commit, we will implement a method discovery mechanism for the flight server. JIRA: CQ-754 risk: low
- Loading branch information
1 parent
3c88e75
commit f6c9510
Showing
46 changed files
with
643 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,3 +47,4 @@ jobs: | |
- 'gooddata-api-client/**' | ||
- 'gooddata-dbt/**' | ||
- 'gooddata-flight-server/**' | ||
- 'gooddata-flexfun/**' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# (C) 2021 GoodData Corporation | ||
sonar.sources=gooddata-sdk,gooddata-fdw,gooddata-pandas | ||
sonar.sources=gooddata-sdk,gooddata-fdw,gooddata-pandas,gooddata-flight-server,gooddata-flexfun | ||
sonar.exclusions=gooddata-api-client/**/* | ||
sonar.python.version=3.9, 3.10, 3.11, 3.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# (C) 2022 GoodData Corporation | ||
sonar.sources=gooddata-sdk,gooddata-fdw,gooddata-pandas | ||
sonar.sources=gooddata-sdk,gooddata-fdw,gooddata-pandas,gooddata-flight-server,gooddata-flexfun | ||
sonar.exclusions=gooddata-api-client/**/* | ||
sonar.python.version=3.9, 3.10, 3.11, 3.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
.hypothesis/ | ||
venv/ | ||
.venv/ | ||
.python-version | ||
.pytest_cache | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
docs/_autosummary/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
#Ipython Notebook | ||
.ipynb_checkpoints | ||
|
||
test_data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# (C) 2024 GoodData Corporation | ||
# Read the Docs configuration file for Sphinx projects | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Set the OS, Python version and other tools you might need | ||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.11" | ||
|
||
sphinx: | ||
configuration: gooddata-flexfun/docs/conf.py | ||
|
||
python: | ||
install: | ||
- requirements: gooddata-flexfun/docs/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# (C) 2024 GoodData Corporation | ||
include ../project_common.mk | ||
|
||
.PHONY: docs | ||
docs: | ||
tox $(TOX_FLAGS) -e docs | ||
|
||
|
||
.PHONY: dev-certs | ||
dev-certs: | ||
mkdir -p test_data | ||
# create CA with self-signed certificate > generate keys + cert requests for server and client > sign | ||
cd test_data && \ | ||
rm -f *.pem && \ | ||
openssl req -x509 -newkey rsa:4096 -days 3650 -nodes -keyout ca-key.pem -out ca-cert.pem -subj "/C=NA/ST=Unknown/L=Unknown/O=Unknown/OU=Unknown/CN=localhost/emailAddress=example@example.com" && \ | ||
openssl req -newkey rsa:4096 -nodes -keyout server-key.pem -out server-req.pem -subj "/C=NA/ST=Unknown/L=Unknown/O=Unknown/OU=Computer/CN=localhost/emailAddress=example@example.com" && \ | ||
openssl req -newkey rsa:4096 -nodes -keyout client-key.pem -out client-req.pem -subj "/C=NA/ST=Unknown/L=Unknown/O=Unknown/OU=Computer/CN=testClient1/emailAddress=example@example.com" && \ | ||
openssl x509 -req -in server-req.pem -days 3650 -CA ca-cert.pem -CAkey ca-key.pem -CAcreateserial -out server-cert.pem && \ | ||
openssl x509 -req -in client-req.pem -days 3650 -CA ca-cert.pem -CAkey ca-key.pem -CAcreateserial -out client-cert.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# GoodData Flex function | ||
|
||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# (C) 2024 GoodData Corporation | ||
|
||
from gooddata_flexfun.flexfun.flex_fun import FlexFun | ||
from gooddata_flexfun.flexfun.flex_fun_execution_context import ( | ||
ExecutionContext, | ||
ExecutionContextAbsoluteDateFilter, | ||
ExecutionContextAttribute, | ||
ExecutionContextAttributeSorting, | ||
ExecutionContextNegativeAttributeFilter, | ||
ExecutionContextPositiveAttributeFilter, | ||
ExecutionContextRelativeDateFilter, | ||
ExecutionRequest, | ||
ExecutionType, | ||
LabelElementsExecutionRequest, | ||
ReportExecutionRequest, | ||
) | ||
from gooddata_flexfun.flexfun.flight_methods import create_flexfun_flight_methods |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# (C) 2024 GoodData Corporation | ||
[mypy] | ||
plugins = pydantic.mypy | ||
disallow_untyped_defs = True | ||
warn_redundant_casts = True | ||
strict_equality = True | ||
no_implicit_optional = True | ||
python_version = 3.9 | ||
|
||
[mypy-gooddata_api_client.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-gooddata_sdk.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-gooddata_flight_server.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-pyarrow.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-orjson.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-structlog.*] | ||
ignore_missing_imports = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
orjson>=3.9.15,<4.0.0 | ||
pyarrow>=16.1.0 | ||
structlog>=24.0.0,<25.0.0 | ||
|
||
setuptools~=74.1.2 | ||
typing_extensions~=4.12.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# (C) 2024 GoodData Corporation | ||
from pathlib import Path | ||
|
||
from setuptools import find_packages, setup | ||
|
||
this_directory = Path(__file__).parent | ||
long_description = (this_directory / "README.md").read_text(encoding="utf-8") | ||
|
||
REQUIRES = [ | ||
"dynaconf>=3.1.11,<4.0.0", | ||
"gooddata-flight-server~=1.26.0", | ||
"gooddata-sdk~=1.26.0", | ||
"orjson>=3.9.15,<4.0.0", | ||
"pyarrow>=16.1.0", | ||
"structlog>=24.0.0,<25.0.0", | ||
] | ||
|
||
setup( | ||
name="gooddata-flexfun", | ||
description="Set of gooddata-flight-server methods to host custom functions for GoodData Cloud", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
version="1.26.0", | ||
author="GoodData", | ||
author_email="support@gooddata.com", | ||
license="MIT", | ||
license_file="LICENSE.txt", | ||
license_files=("LICENSE.txt",), | ||
install_requires=REQUIRES, | ||
packages=find_packages(exclude=["tests*"]), | ||
include_package_data=True, | ||
python_requires=">=3.9.0", | ||
project_urls={ | ||
"Documentation": "https://gooddata-flexfun.readthedocs.io/en/v1.26.0", | ||
"Source": "https://github.com/gooddata/gooddata-python-sdk", | ||
}, | ||
classifiers=[ | ||
"Development Status :: 4 - Beta", | ||
"Environment :: Console", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Topic :: Database", | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Software Development", | ||
"Typing :: Typed", | ||
], | ||
keywords=[ | ||
"gooddata", | ||
"flight", | ||
"rpc", | ||
"flight rpc", | ||
"custom functions", | ||
"analytics", | ||
"headless", | ||
"business", | ||
"intelligence", | ||
"headless-bi", | ||
"cloud", | ||
"native", | ||
"semantic", | ||
"layer", | ||
"sql", | ||
"metrics", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pytest~=8.2.2 | ||
pytest-cov~=5.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# (C) 2024 GoodData Corporation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# (C) 2024 GoodData Corporation | ||
import pyarrow.flight | ||
from gooddata_flight_server import ErrorCode, ErrorInfo | ||
|
||
|
||
def assert_error_code(code: int, err: pyarrow.flight.FlightError): | ||
info = ErrorInfo.maybe_from_pyarrow_error(err) | ||
assert info is not None, "The error does not contain the ErrorInfo." | ||
|
||
if code != info.code: | ||
raise AssertionError(f"Expected error code '{ErrorCode.name(code)}'. Got: '{ErrorCode.name(info.code)}'") |
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...lexfun/test_flex_fun_execution_context.py → ...lexfun/test_flex_fun_execution_context.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
...ght-server/tests/flexfun/test_registry.py → ...ta-flexfun/tests/flexfun/test_registry.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
...ight-server/tests/flexfun/testing_funs.py → ...ata-flexfun/tests/flexfun/testing_funs.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# (C) 2024 GoodData Corporation |
Oops, something went wrong.