-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #181 * Add sphinx to dev dependencies * Add furo theme * Add sphinx-copybutton as dev dependency * Add basic sphinx based documentation * Add github action to generate documentation * Bump version number to 3.1.10
- Loading branch information
Showing
17 changed files
with
538 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: GH-Pages | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- "*" | ||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install Dependencies | ||
run: | | ||
poetry install | ||
- name: Build Documenations | ||
run: | | ||
poetry run python -m nox -s build-docs | ||
touch doc/build/html/.nojekyll | ||
- name: Deploy | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages | ||
folder: ./doc/build/html | ||
git-config-name: Github Action | ||
git-config-email: [email protected] | ||
|
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,5 +1,7 @@ | ||
odbcconfig/odbcinst.ini | ||
|
||
_build/ | ||
|
||
*.py[cod] | ||
|
||
.build_output | ||
|
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
3 changes: 3 additions & 0 deletions
3
...gelog.d/20220805_130513_nicola.coretti__170_Migrate_documentation_to_sphinx.rst
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 @@ | ||
🔧 Changed | ||
---------- | ||
- Restructured documentation |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,4 @@ | ||
Changelog | ||
_________ | ||
|
||
.. include:: ../CHANGELOG.rst |
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,64 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# This file only contains a selection of the most common options. For a full | ||
# list see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Path setup -------------------------------------------------------------- | ||
|
||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. If the directory is relative to the | ||
# documentation root, use os.path.abspath to make it absolute, like shown here. | ||
# | ||
# import os | ||
import sys | ||
from pathlib import Path | ||
|
||
SPHINX_ROOT = Path(__file__).parent | ||
sys.path.insert(0, f"{SPHINX_ROOT.parent.resolve()}") | ||
|
||
from sqlalchemy_exasol.version import VERSION | ||
|
||
# -- Project information ----------------------------------------------------- | ||
|
||
project = "sqlalchemy-exasol" | ||
copyright = "2022, Exasol & Blue Yonder" | ||
author = "Exasol, Blue Yonder" | ||
|
||
# The full version, including alpha/beta/rc tags | ||
release = VERSION | ||
|
||
|
||
# -- General configuration --------------------------------------------------- | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be | ||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
# ones. | ||
extensions = ["sphinx_copybutton"] | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ["_templates"] | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
# This pattern also affects html_static_path and html_extra_path. | ||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
# | ||
html_theme = "furo" | ||
html_title = f"SQLAlchemy-Exasol {release}" | ||
html_theme_options = { | ||
"light_logo": "light-exasol-logo.svg", | ||
"dark_logo": "dark-exasol-logo.svg", | ||
} | ||
|
||
|
||
# Add any paths that contain custom static files (such as style sheets) here, | ||
# relative to this directory. They are copied after the builtin static files, | ||
# so a file named "default.css" will overwrite the builtin "default.css". | ||
html_static_path = ["_static"] |
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,8 @@ | ||
.. include:: developer_guide.rst | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:hidden: | ||
|
||
integration_tests | ||
|
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` |
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,5 @@ | ||
Readme | ||
______ | ||
|
||
.. include:: ../README.rst | ||
:end-before: Development & Testing |
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
Oops, something went wrong.