Skip to content
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
12 changes: 8 additions & 4 deletions .github/workflows/generate-docs.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
---
name: 📝 Generate Docs

Expand All @@ -21,8 +22,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx install poetry==2.0.0
- uses: astral-sh/setup-uv@v5
with: { version: "0.6.5", enable-cache: true }
- uses: actions/setup-python@v5
with: { python-version: 3.11, cache: poetry }
- run: poetry install --without dev,test
- run: poetry run mkdocs gh-deploy --force
with: { python-version: 3.11 }
- uses: actions/setup-python@v5
with: { python-version-file: "pyproject.toml" }
- run: uv sync --group docs
- run: uv run mkdocs gh-deploy --force
9 changes: 4 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
ci:
autoupdate_schedule: quarterly
skip: ["identity", "poetry-lock"]
skip: ["identity", "uv-lock"]

repos:
- repo: meta
Expand All @@ -22,11 +22,10 @@ repos:
- id: check-toml
- id: check-ast

- repo: https://github.com/python-poetry/poetry
rev: 2.0.0
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.6.5
hooks:
- id: poetry-check
- id: poetry-lock
- id: uv-lock

# Formatting
- repo: https://github.com/pre-commit/mirrors-prettier
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center">

[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
[![Python](https://img.shields.io/badge/Python-3.11-blue.svg)](https://www.python.org/downloads/release/python-3110/)
[![Docker](https://img.shields.io/badge/Docker-24.0.5-blue.svg)](https://www.docker.com/)
[![GitHub last commit](https://img.shields.io/github/last-commit/Bilbottom/sql-learning-materials)](https://shields.io/badges/git-hub-last-commit-by-committer)
Expand Down Expand Up @@ -43,11 +43,11 @@ The docs are built using [MkDocs](https://www.mkdocs.org/) and the [Material for

## Pre-requisites

This project uses Poetry to manage the Python dependencies and Docker to spin up the databases.
This project uses [UV](https://docs.astral.sh/uv/) to manage the Python dependencies and [Docker](https://www.docker.com/) to spin up the databases.

To install these, follow the instructions on their websites:

- https://python-poetry.org/docs/#installation
- https://docs.astral.sh/uv/getting-started/installation/
- https://www.python.org/downloads/
- https://docs.docker.com/get-docker/

Expand All @@ -56,7 +56,7 @@ To install these, follow the instructions on their websites:
After installing the pre-requisites and cloning this repo, just run the `resources` package to download the files needed to feed into the SQL Server and PostgreSQL databases before running Docker's `compose` command.

```bash
poetry install
uv sync --all-groups
python -m resources
docker compose --profile build up --detach
mkdocs build
Expand Down
5 changes: 2 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ markdown_extensions:
- { name: mermaid, class: mermaid }

plugins:
- search
- callouts # https://github.com/sondregronas/mkdocs-callouts
- tags:
tags_file: challenging-sql-problems/topics.md
- search
- tags
1,288 changes: 0 additions & 1,288 deletions poetry.lock

This file was deleted.

63 changes: 26 additions & 37 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,50 +1,39 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "sql-learning-materials"
version = "0.0.0"
description = "SQL scripts that demonstrate various features and concepts."
authors = [{name = "Bilbottom"}]
readme = "README.md"
keywords = ["sql", "sql-server", "postgres", "sqlite", "duckdb"]
repository = "https://github.com/Bilbottom/sql-learning-materials"
urls = { Repository = "https://github.com/Bilbottom/sql-learning-materials" }
requires-python = ">=3.11,<4.0"
dynamic = ["dependencies"]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"


[tool.poetry]
packages = [
{ include = "profiler", from = "src" },
{ include = "resources", from = "src" },
dependencies = [
"db-query-profiler>=0.0.6",
"duckdb>=1.1.3",
"psycopg2>=2.9.9", # PostgreSQL driver
"pyodbc>=5.1.0", # SQL Server driver
]

[tool.poetry.dependencies]
duckdb = "1.1.3"
pyodbc = "^5.1.0" # SQL Server driver
psycopg2 = "^2.9.9" # PostgreSQL driver

[tool.poetry.group]
dev.optional = false
test.optional = false
docs.optional = false

[tool.poetry.group.dev.dependencies]
coverage-badge = "^1.1.0"
pre-commit = "^3.4"
db-query-profiler = "^0.0.4"

[tool.poetry.group.test.dependencies]
pytest = "^7.4"
pytest-cov = "^4.1"

[tool.poetry.group.docs.dependencies]
mkdocs = "^1.5.3"
mkdocs-material = "^9.5.3"
mkdocs-callouts = "^1.10.0"
markdown-callouts = "^0.3.0"
mdx-truly-sane-lists = "^1.3"
[dependency-groups]
dev = [
"coverage-badge>=1.1.0",
"pre-commit>=4.1.0",
]
docs = [
"markdown-callouts>=0.4.0",
"mdx-truly-sane-lists>=1.3",
"mkdocs>=1.6.1",
"mkdocs-callouts>=1.16.0",
"mkdocs-material>=9.6.7",
]
test = [
"pytest>=8.3.5",
"pytest-cov>=6.0.0",
]


[tool.pytest.ini_options]
Expand Down
Loading