Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation #2

Merged
merged 4 commits into from
Mar 18, 2024
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
1 change: 1 addition & 0 deletions docs/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
altqq.baluyotraf.com
21 changes: 21 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# API Reference

## Modeling

These are used for defining queries.

### ::: altqq.Query

## PyODBC

These are used for working with PyODBC.

### ::: altqq.to_pyodbc

### ::: altqq.PyODBCQuery

## Plain Text

These are used for working with plain text SQL.

### ::: altqq.to_plain_text
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{%
include-markdown "../README.md"
%}
56 changes: 56 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
site_name: Alternative Queries
site_url: https://altqq.baluyotraf.com
site_description: Typed and Composable Tool for Handwritten SQL
repo_url: https://github.com/baluyotraf/altqq
repo_name: baluyotraf/altqq
edit_uri: ""
copyright: Copyright © 2024 Raffaello Baluyot

nav:
- Quick Start: index.md
- api.md

plugins:
- include-markdown
- mkdocstrings:
default_handler: python
handlers:
python:
options:
show_root_heading: true
- search
- social


markdown_extensions:
- pymdownx.superfences
- pymdownx.highlight:
anchor_linenums: true
auto_title: true

theme:
name: material
language: en
palette:
primary: black
accent: light blue
icon:
logo: fontawesome/solid/database
repo: fontawesome/brands/github
features:
- navigation.instant
- navigation.tabs
- navigation.tabs.sticky
- navigation.top

extra:
version:
default: stable
provider: mike
social:
- icon: fontawesome/brands/linkedin
link: https://www.linkedin.com/in/baluyotraf/
name: baluyotraf
- icon: fontawesome/brands/github
link: https://github.com/baluyotraf
name: baluyotraf
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ maintainers = ["baluyotraf <baluyotraf@outlook.com>"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/baluyotraf/altqq"
homepage = "https://altqq.baluyotraf.com"
keywords = ["database", "SQL"]

[tool.poetry.dependencies]
Expand All @@ -27,6 +28,16 @@ pydantic = "^2.6.4"
[tool.poetry.group.dev.dependencies]
pyright = "^1.1.354"

[tool.poetry.group.docs]
optional = true

[tool.poetry.group.docs.dependencies]
mike = "^2.0.0"
mkdocs = "^1.5.3"
mkdocstrings = { version="^0.24.1", extras = ["python"] }
mkdocs-include-markdown-plugin = "^6.0.4"
mkdocs-material = { version = "^9.5.14", extras = ["imaging"] }

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
1 change: 1 addition & 0 deletions src/altqq/translators/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Entry module for translators."""
3 changes: 2 additions & 1 deletion src/altqq/translators/plain_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
import typing
from typing import Any

from typing_extensions import Annotated

from altqq.structs import Query
from altqq.types import QueryValueTypes, T
from typing_extensions import Annotated


class PlainTextTranslator:
Expand Down
3 changes: 2 additions & 1 deletion src/altqq/translators/pyodbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
from string import Formatter
from typing import Any, Iterable, List, Mapping, Sequence, Union

from typing_extensions import Annotated

from altqq.structs import Query
from altqq.types import QueryValueTypes, T
from typing_extensions import Annotated


@dc.dataclass
Expand Down