Skip to content

Commit a8f34e2

Browse files
committed
RTD, version fix
1 parent 7c34575 commit a8f34e2

File tree

11 files changed

+87
-184
lines changed

11 files changed

+87
-184
lines changed

.github/workflows/docs.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.readthedocs.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Set the version of Python and other tools you want to use
9+
# The default way to use env vars in RTD
10+
build:
11+
os: ubuntu-22.04
12+
tools:
13+
python: "3.11"
14+
15+
# Build documentation in the docs/ directory with Sphinx
16+
sphinx:
17+
configuration: docs/source/conf.py
18+
19+
# If using Sphinx, optionally build your docs in additional formats such as PDF
20+
# formats:
21+
# - pdf
22+
23+
# Optionally declare the Python requirements required to build your docs
24+
python:
25+
install:
26+
- requirements: docs/requirements.txt
27+
- method: pip
28+
path: .
29+
extra_requirements:
30+
- docs

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ dev: clean ## install development dependencies
7878
pre-commit install
7979

8080
dist: clean ## builds source and wheel package
81-
python setup.py sdist
82-
python setup.py bdist_wheel
81+
python -m build
8382
ls -l dist
8483

8584
release: dist ## package and upload a release

docs/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Documentation build requirements
2+
sphinx>=7.0.0
3+
sphinx_rtd_theme>=1.3.0

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
project = "SQLAlchemy-ViewORM"
1515
copyright = "2025, AivanF."
1616
author = "AivanF."
17-
release = "0.1.0"
17+
release = "0.1.1"
1818

1919
# -- General configuration ---------------------------------------------------
2020
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

docs/source/usage.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,13 @@ More Examples
220220
-------------
221221

222222
1. `Flask server <https://github.com/AivanF/SQLAlchemy-ViewORM/blob/main/examples/flask_example.py>`_
223-
- single-file server
223+
- Products with aggregated stats by category
224+
- Single-file server
224225
- Materialized View integrated into API
225-
- refresh by request
226+
- Refresh by request
226227

227228
2. `FastAPI server <https://github.com/AivanF/SQLAlchemy-ViewORM/tree/main/examples/FastAPI-example>`_
228-
- multiple-file server draft
229+
- Game matches with a leaderboard view
230+
- Multiple-file server draft
229231
- Materialized View + async DB proper setup
230-
- refresh by a background job
232+
- Refresh by a periodic background job

pyproject.toml

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "SQLAlchemy-ViewORM"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
description = "A flexible ORM extension for defining and managing views (including materialized ones) in SQLAlchemy"
55
readme = "README.md"
66
authors = [{ name = "AivanF.", email = "fouren.aivan@gmail.com" }]
@@ -23,7 +23,7 @@ dependencies = ["sqlalchemy>=2.0.0"]
2323
requires-python = ">=3.9"
2424

2525
[project.urls]
26-
Documentation = "https://aivanf.github.io/SQLAlchemy-ViewORM"
26+
Documentation = "https://sqlalchemy-vieworm.readthedocs.io/"
2727
Repository = "https://github.com/AivanF/SQLAlchemy-ViewORM"
2828
"Bug Tracker" = "https://github.com/AivanF/SQLAlchemy-ViewORM/issues"
2929

@@ -38,29 +38,67 @@ dev = [
3838
"pre-commit>=3.0.0",
3939
"sphinx>=7.0.0",
4040
"sphinx_rtd_theme>=1.3.0",
41+
"build>=0.10.0",
42+
"twine>=4.0.0",
4143
]
44+
docs = ["sphinx>=7.0.0", "sphinx_rtd_theme>=1.3.0"]
45+
examples = ["fastapi>=0.95.0", "uvicorn>=0.22.0"]
4246

4347
[build-system]
44-
requires = ["setuptools>=42", "wheel"]
48+
requires = ["setuptools>=61.0", "wheel"]
4549
build-backend = "setuptools.build_meta"
4650

51+
[tool.setuptools.packages.find]
52+
where = ["."]
53+
include = ["sqlalchemy_view_orm*"]
54+
55+
[tool.setuptools.package-data]
56+
sqlalchemy_view_orm = ["py.typed"]
57+
4758
[tool.black]
4859
line-length = 88
49-
target-version = ["py39", "py311", "py311", "py312"]
60+
target-version = ["py39", "py310", "py311", "py312"]
5061
include = '\.pyi?$'
62+
extend-exclude = '''
63+
/(
64+
\.eggs
65+
| \.git
66+
| \.venv
67+
| build
68+
| dist
69+
)/
70+
'''
5171

5272
[tool.isort]
5373
profile = "black"
5474
multi_line_output = 3
75+
line_length = 88
76+
known_first_party = ["sqlalchemy_view_orm"]
5577

5678
[tool.mypy]
5779
python_version = "3.9"
5880
warn_return_any = true
5981
warn_unused_configs = true
6082
disallow_untyped_defs = true
6183
disallow_incomplete_defs = true
84+
show_error_codes = true
85+
strict = true
6286

6387
[tool.pytest.ini_options]
6488
testpaths = ["tests"]
6589
python_files = "test_*.py"
6690
pythonpath = ["."]
91+
addopts = "--strict-markers"
92+
markers = ["slow: marks tests as slow (deselect with '-m \"not slow\"')"]
93+
94+
[tool.coverage.run]
95+
source = ["sqlalchemy_view_orm"]
96+
omit = ["*/tests/*", "*/test_*"]
97+
98+
[tool.coverage.report]
99+
exclude_lines = [
100+
"pragma: no cover",
101+
"def __repr__",
102+
"raise AssertionError",
103+
"raise NotImplementedError",
104+
]

requirements.txt

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
1-
sqlalchemy>=2.0.0
1+
# Optional dependencies for examples
2+
# Install with: pip install -r requirements.txt
3+
# Or use: pip install "SQLAlchemy-ViewORM[examples]"
24

3-
# Development dependencies (not required for normal use)
4-
pytest>=7.0.0
5-
pytest-cov>=4.0.0
6-
black>=23.0.0
7-
isort>=5.0.0
8-
mypy>=1.0.0
9-
flake8>=6.0.0
10-
pre-commit>=3.0.0
11-
12-
# For FastAPI example
135
fastapi>=0.95.0
146
uvicorn>=0.22.0

setup.cfg

Lines changed: 0 additions & 64 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)