-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ 84bdd18 🚀
- Loading branch information
Github Action
committed
Jan 7, 2025
1 parent
a2afadf
commit a8d1fd9
Showing
742 changed files
with
73,205 additions
and
4,348 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
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 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 00f3eba337d23f8ffba8cb37e37fa9fa | ||
config: 5cd6c701c28d29bfbc1ec15bbcfcb1f6 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,195 @@ | ||
Development | ||
============ | ||
This chapter contains information helpful when you want to engage in development of this project. | ||
|
||
Prerequisites | ||
------------- | ||
If you want to engage in development of this project you should have the following libraries and tools available. | ||
|
||
Tools | ||
+++++ | ||
* python_ >= 3.8 | ||
* poetry_ >= 1.1.0 | ||
* git_ | ||
* Docker_ | ||
* integration-test-docker-environment_ | ||
* Prerequisites_ | ||
|
||
Libraries | ||
+++++++++ | ||
* unixodbc | ||
* unixodbc-dev | ||
* libboost-date-time-dev | ||
* libboost-locale-dev | ||
* libboost-system-dev | ||
|
||
|
||
Example: Install of required system libraries on Ubuntu | ||
|
||
.. code-block:: | ||
sudo apt-get install unixodbc unixodbc-dev libboost-date-time-dev libboost-locale-dev libboost-system-dev | ||
Locale | ||
+++++++ | ||
Make sure the local is setup appropriately. | ||
|
||
Example: Setting up an english locale | ||
|
||
.. code-block:: | ||
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen | ||
export LANG=en_US.UTF-8 | ||
Project Layout | ||
++++++++++++++ | ||
|
||
.. attention:: | ||
|
||
Currently it is required that the integration-test-docker-environment_ project is checked out in parallel to this | ||
project. For more details on this have a look at the `Settings` in `noxfile.py` | ||
|
||
Expected Layout: | ||
|
||
.. code-block:: | ||
|-sqlalchemy-exasol/ | ||
├─ ... | ||
|-integration-test-docker-environment | ||
├─ ... | ||
| | ||
... | ||
Setup Your Workspace | ||
-------------------- | ||
|
||
Get The Source | ||
++++++++++++++ | ||
|
||
.. code-block:: | ||
git clone https://github.com/exasol/sqlalchemy-exasol.git | ||
Setup the Tooling & Virtual Environment | ||
+++++++++++++++++++++++++++++++++++++++ | ||
|
||
.. code-block:: | ||
poetry shell | ||
poetry install | ||
.. warning:: | ||
|
||
make sure you have the poetry shell active whenever you want to work in the workspace | ||
|
||
Install the Git Commit Hooks | ||
++++++++++++++++++++++++++++ | ||
|
||
.. code-block:: | ||
pre-commit install | ||
.. note:: | ||
|
||
This may need to be rerun if you want or do add non standard hook types, for further details | ||
see `pre-commit install -h`. | ||
|
||
|
||
Task Runner (Nox) | ||
----------------- | ||
Most repeating and complex tasks within this project are automated using the task runner `nox`. | ||
To get an overview about the available `tasks` just run: | ||
|
||
.. code-block:: | ||
nox -l | ||
All task(s) which will be run by default will have a leading `*`. | ||
In order to run a specific task execute the following command: | ||
|
||
.. code-block:: | ||
nox -s <task-name> | ||
You can modify or add new task by editing the file `noxfile.py`. | ||
|
||
Tests | ||
----- | ||
|
||
#. Install all python dependencies needed for development | ||
|
||
.. code-block:: | ||
# make sure you are using the virtual environment poetry has setup for this project | ||
poetry shell | ||
#. Run all tests with `pyodbc` connector | ||
|
||
.. code-block:: | ||
nox | ||
or | ||
|
||
.. code-block:: | ||
nox -s "verify(connector='pyodbc')" | ||
#. Run all tests with `turbodbc` connector | ||
|
||
.. code-block:: | ||
nox -s "verify(connector='turbodbc')" | ||
.. attention:: | ||
|
||
If something still is not working or unclear, you may want to look into the CI/CD action_ files. | ||
|
||
Changelog (scriv) | ||
----------------- | ||
What, why and from whom to write a changelog you can read up on keepachangelog_, in | ||
this section we just want give the information on how to keep track of fragments | ||
which later will be used to create the changelog on the next published release. | ||
|
||
For the bookkeeping and generation of the changelog we use scriv_, so if you | ||
find the information in this section not sufficient we recommend to consult the | ||
scriv_ documentation. | ||
|
||
.. note:: | ||
|
||
keep in mind that all our docs, including the changelog are in the | ||
restructuredText format when you format your entries. | ||
|
||
|
||
Run the following command to create a new changelog fragment. | ||
|
||
.. code-block:: shell | ||
scriv create --edit | ||
An editor will open and you get prompted with a template, uncomment | ||
sections headings you need and add your entries below. | ||
Also make sure you commit the created fragment once you're done. | ||
|
||
.. note:: | ||
|
||
To make sure you won't forgetting to commit the fragment, you can use | ||
the `--add` flag to automatically add it to the git index. | ||
|
||
.. code-block:: shell | ||
scriv create --edit --add | ||
.. _scriv: https://scriv.readthedocs.io/en/latest/index.html | ||
.. _keepachangelog: https://keepachangelog.com/en/1.1.0/ | ||
.. _action: https://github.com/exasol/sqlalchemy_exasol/actions | ||
.. _python: https://www.python.org/ | ||
.. _poetry: https://python-poetry.org/ | ||
.. _git: https://git-scm.com/ | ||
.. _Docker: https://www.docker.com/ | ||
.. _integration-test-docker-environment: https://github.com/exasol/integration-test-docker-environment | ||
.. _Prerequisites: https://github.com/exasol/integration-test-docker-environment#prerequisites> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
Integration Test Setup | ||
====================== | ||
|
||
Integration testing is done by GitHub Actions contained in this repository, which provide a CI/CD pipeline to test, build, and deploy sqlalchemy_exasol to Pypi. | ||
|
||
Two main workflows are used for this purpose: | ||
|
||
CI | ||
--- | ||
|
||
This is meant to be used as the test workflow. It's located under: | ||
|
||
.. code-block:: | ||
sqlalchemy_exasol/.github/workflows/CI.yml | ||
This workflow will be executed anytime there's a commit pushed to any branch that is **not master**, or whenever there's a pull request created where the base branch is **not master**. It runs a Docker Container with an Exasol database for every version specified in *matrix.exasol_version*, and uses those DBs to executes all tests in the repository. If everything went fine, it will create a package distribution using both sdist and wheel. | ||
|
||
To run it just commit and push to any non-master branch and watch the workflow run in: | ||
|
||
`<https://github.com/exasol/sqlalchemy_exasol/actions>`_ | ||
|
||
CI-CD | ||
----- | ||
|
||
This is meant to be used as the Production workflow. It's located under: | ||
|
||
.. code-block:: | ||
sqlalchemy_exasol/.github/workflows/CI-CD.yml | ||
This workflow will be executed anytime there's a commit pushed to **master**, or whenever a **tag** (release) is pushed. It does all the same steps than the CI workflow with one additional step at the end: Upload the package to Pypi. This upload step only happens when a tag is pushed, it will not be executed when commits are done in master. | ||
|
||
To run it just commit and push to master (*Optional:* push a tag in case you want Pypi upload) and watch the workflow run in: | ||
|
||
`<https://github.com/exasol/sqlalchemy_exasol/actions>`_ | ||
|
||
The status of the CI-CD workflow will always be reflected in the badge called "build" in the README.rst and Home Page of this repository |
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,46 @@ | ||
SQLAlchemy-Exasol | ||
================= | ||
SQLAlchemy-Exasol is an SQLAlchemy dialect extension. | ||
|
||
Overview | ||
-------- | ||
The dialect is the system SQLAlchemy uses to communicate with various types of DBAPI implementations and databases. | ||
The sections that follow contain reference documentation and notes specific to the usage of each backend, | ||
as well as notes for the various DBAPIs. | ||
|
||
For more details have a look into the `SQLAlchemy documentation <https://docs.sqlalchemy.org/en/13/dialects/>`_. | ||
|
||
Getting Started | ||
--------------- | ||
|
||
#. `Install the Exasol-ODBC driver <https://docs.exasol.com/db/latest/connect_exasol/drivers/odbc.htm>`_ | ||
|
||
#. Add `sqlalchemy-exasol <https://pypi.org/project/sqlalchemy-exasol/>`_ as a dependency | ||
|
||
.. code-block:: shell | ||
$ pip install sqlalchemy-exasol | ||
#. Execute queries | ||
|
||
.. code-block:: python | ||
from sqlalchemy import create_engine | ||
url = "exa+pyodbc://A_USER:[email protected]:1234/my_schema?CONNECTIONLCALL=en_US.UTF-8&driver=EXAODBC" | ||
e = create_engine(url) | ||
r = e.execute("select 42 from dual").fetchall() | ||
For more details on SQLAlchemy consult it's `documenation <https://docs.sqlalchemy.org/en/13/>`_. | ||
|
||
.. toctree:: | ||
:maxdepth: 3 | ||
:hidden: | ||
|
||
readme | ||
changelog | ||
developer_guide/index | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
// @ts-check | ||
|
||
// Extra JS capability for selected tabs to be synced | ||
// The selection is stored in local storage so that it persists across page loads. | ||
|
||
/** | ||
* @type {Record<string, HTMLElement[]>} | ||
*/ | ||
let sd_id_to_elements = {}; | ||
const storageKeyPrefix = "sphinx-design-tab-id-"; | ||
|
||
/** | ||
* Create a key for a tab element. | ||
* @param {HTMLElement} el - The tab element. | ||
* @returns {[string, string, string] | null} - The key. | ||
* | ||
*/ | ||
function create_key(el) { | ||
let syncId = el.getAttribute("data-sync-id"); | ||
let syncGroup = el.getAttribute("data-sync-group"); | ||
if (!syncId || !syncGroup) return null; | ||
return [syncGroup, syncId, syncGroup + "--" + syncId]; | ||
} | ||
|
||
/** | ||
* Initialize the tab selection. | ||
* | ||
*/ | ||
function ready() { | ||
// Find all tabs with sync data | ||
|
||
/** @type {string[]} */ | ||
let groups = []; | ||
|
||
document.querySelectorAll(".sd-tab-label").forEach((label) => { | ||
if (label instanceof HTMLElement) { | ||
let data = create_key(label); | ||
if (data) { | ||
let [group, id, key] = data; | ||
|
||
// add click event listener | ||
// @ts-ignore | ||
label.onclick = onSDLabelClick; | ||
|
||
// store map of key to elements | ||
if (!sd_id_to_elements[key]) { | ||
sd_id_to_elements[key] = []; | ||
} | ||
sd_id_to_elements[key].push(label); | ||
|
||
if (groups.indexOf(group) === -1) { | ||
groups.push(group); | ||
// Check if a specific tab has been selected via URL parameter | ||
const tabParam = new URLSearchParams(window.location.search).get( | ||
group | ||
); | ||
if (tabParam) { | ||
console.log( | ||
"sphinx-design: Selecting tab id for group '" + | ||
group + | ||
"' from URL parameter: " + | ||
tabParam | ||
); | ||
window.sessionStorage.setItem(storageKeyPrefix + group, tabParam); | ||
} | ||
} | ||
|
||
// Check is a specific tab has been selected previously | ||
let previousId = window.sessionStorage.getItem( | ||
storageKeyPrefix + group | ||
); | ||
if (previousId === id) { | ||
// console.log( | ||
// "sphinx-design: Selecting tab from session storage: " + id | ||
// ); | ||
// @ts-ignore | ||
label.previousElementSibling.checked = true; | ||
} | ||
} | ||
} | ||
}); | ||
} | ||
|
||
/** | ||
* Activate other tabs with the same sync id. | ||
* | ||
* @this {HTMLElement} - The element that was clicked. | ||
*/ | ||
function onSDLabelClick() { | ||
let data = create_key(this); | ||
if (!data) return; | ||
let [group, id, key] = data; | ||
for (const label of sd_id_to_elements[key]) { | ||
if (label === this) continue; | ||
// @ts-ignore | ||
label.previousElementSibling.checked = true; | ||
} | ||
window.sessionStorage.setItem(storageKeyPrefix + group, id); | ||
} | ||
|
||
document.addEventListener("DOMContentLoaded", ready, false); |
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
Oops, something went wrong.