Skip to content
This repository was archived by the owner on May 2, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**Describe the environment**

Describe which OS you're using, which sqeleton version, and any other information that might be relevant to this bug.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/request-support-for-a-database.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Request support for a database
about: 'Request a driver to support a new database '
title: 'Add support for <database name>'
labels: new-db-driver
assignees: ''

---


54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI-COVER-VERSIONS

on:
# push:
# paths:
# - '**.py'
# - '.github/workflows/**'
# - '!dev/**'
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
unit_tests:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"

name: Check Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Build the stack
run: docker-compose up -d mysql postgres presto trino clickhouse vertica

- name: Install Poetry
run: pip install poetry

- name: Install package
run: "poetry install"

- name: Run unit tests
env:
PRESTO_URI: 'presto://presto@127.0.0.1/postgresql/public'
TRINO_URI: 'trino://postgres@127.0.0.1:8081/postgresql/public'
CLICKHOUSE_URI: 'clickhouse://clickhouse:Password1@localhost:9000/clickhouse'
VERTICA_URI: 'vertica://vertica:Password1@localhost:5433/vertica'
SNOWFLAKE_URI: '${{ secrets.SNOWFLAKE_URI }}'
REDSHIFT_URI: '${{ secrets.REDSHIFT_URI }}'
run: |
chmod +x tests/waiting_for_stack_up.sh
./tests/waiting_for_stack_up.sh && TEST_ACROSS_ALL_DBS=0 poetry run unittest-parallel -j 16
51 changes: 51 additions & 0 deletions .github/workflows/ci_full.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI-COVER-DATABASES

on:
# push:
# paths:
# - '**.py'
# - '.github/workflows/**'
# - '!dev/**'
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
unit_tests:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version:
- "3.10"

name: Check Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Build the stack
run: docker-compose up -d mysql postgres presto trino clickhouse vertica

- name: Install Poetry
run: pip install poetry

- name: Install package
run: "poetry install"

- name: Run unit tests
env:
PRESTO_URI: 'presto://presto@127.0.0.1/postgresql/public'
TRINO_URI: 'trino://postgres@127.0.0.1:8081/postgresql/public'
CLICKHOUSE_URI: 'clickhouse://clickhouse:Password1@localhost:9000/clickhouse'
VERTICA_URI: 'vertica://vertica:Password1@localhost:5433/vertica'
SNOWFLAKE_URI: '${{ secrets.SNOWFLAKE_URI }}'
REDSHIFT_URI: '${{ secrets.REDSHIFT_URI }}'
run: |
chmod +x tests/waiting_for_stack_up.sh
./tests/waiting_for_stack_up.sh && poetry run unittest-parallel -j 16
138 changes: 138 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# 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/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# Mac
.DS_Store

# IntelliJ
.idea

# VSCode
.vscode
25 changes: 25 additions & 0 deletions dev/Dockerfile.prestosql.340
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM openjdk:11-jdk-slim-buster

ENV PRESTO_VERSION=340
ENV PRESTO_SERVER_URL=https://repo1.maven.org/maven2/io/prestosql/presto-server/${PRESTO_VERSION}/presto-server-${PRESTO_VERSION}.tar.gz
ENV PRESTO_CLI_URL=https://repo1.maven.org/maven2/io/prestosql/presto-cli/${PRESTO_VERSION}/presto-cli-${PRESTO_VERSION}-executable.jar
ENV PRESTO_HOME=/opt/presto
ENV PATH=${PRESTO_HOME}/bin:${PATH}

WORKDIR $PRESTO_HOME

RUN set -xe \
&& apt-get update \
&& apt-get install -y curl less python \
&& curl -sSL $PRESTO_SERVER_URL | tar xz --strip 1 \
&& curl -sSL $PRESTO_CLI_URL > ./bin/presto \
&& chmod +x ./bin/presto \
&& apt-get remove -y curl \
&& rm -rf /var/lib/apt/lists/*

VOLUME /data

EXPOSE 8080

ENTRYPOINT ["launcher"]
CMD ["run"]
23 changes: 23 additions & 0 deletions dev/dev.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
POSTGRES_USER=postgres
POSTGRES_PASSWORD=Password1
POSTGRES_DB=postgres

MYSQL_DATABASE=mysql
MYSQL_USER=mysql
MYSQL_PASSWORD=Password1
MYSQL_ROOT_PASSWORD=RootPassword1

CLICKHOUSE_USER=clickhouse
CLICKHOUSE_PASSWORD=Password1
CLICKHOUSE_DB=clickhouse
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1

# Vertica credentials
APP_DB_USER=vertica
APP_DB_PASSWORD=Password1
VERTICA_DB_NAME=vertica

# To prevent generating sample demo VMart data (more about it here https://www.vertica.com/docs/9.2.x/HTML/Content/Authoring/GettingStartedGuide/IntroducingVMart/IntroducingVMart.htm),
# leave VMART_DIR and VMART_ETL_SCRIPT empty.
VMART_DIR=
VMART_ETL_SCRIPT=
1 change: 1 addition & 0 deletions dev/presto-conf/standalone/catalog/jmx.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
connector.name=jmx
1 change: 1 addition & 0 deletions dev/presto-conf/standalone/catalog/memory.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
connector.name=memory
5 changes: 5 additions & 0 deletions dev/presto-conf/standalone/catalog/postgresql.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
connector.name=postgresql
connection-url=jdbc:postgresql://postgres:5432/postgres
connection-user=postgres
connection-password=Password1
allow-drop-table=true
1 change: 1 addition & 0 deletions dev/presto-conf/standalone/catalog/tpcds.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
connector.name=tpcds
1 change: 1 addition & 0 deletions dev/presto-conf/standalone/catalog/tpch.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
connector.name=tpch
Loading