Skip to content

Commit 7c34575

Browse files
committed
Initial upload
1 parent e956bc2 commit 7c34575

40 files changed

+3869
-1
lines changed

.gitattributes

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Detect Python files
2+
*.py linguist-language=Python
3+
4+
# Documentation
5+
*.md linguist-documentation
6+
*.rst linguist-documentation
7+
docs/* linguist-documentation
8+
9+
# Examples - these are still Python code, not documentation
10+
examples/*.py linguist-documentation=false
11+
12+
# Exclude vendored code from language statistics
13+
.github/* linguist-vendored
14+
15+
# Treat SQL files as SQL
16+
*.sql linguist-language=SQL
17+
18+
# Treat these files as text with LF line endings
19+
*.py text eol=lf
20+
*.md text eol=lf
21+
*.rst text eol=lf
22+
*.txt text eol=lf
23+
*.yml text eol=lf
24+
*.yaml text eol=lf
25+
*.json text eol=lf
26+
*.toml text eol=lf
27+
*.ini text eol=lf
28+
*.cfg text eol=lf
29+
*.sql text eol=lf
30+
31+
# Binary files (don't modify line endings)
32+
*.png binary
33+
*.jpg binary
34+
*.jpeg binary
35+
*.gif binary
36+
*.ico binary
37+
*.db binary

.github/workflows/docs.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Documentation
2+
3+
on:
4+
# push:
5+
# branches:
6+
# - main
7+
# pull_request:
8+
# branches:
9+
# - main
10+
workflow_dispatch:
11+
12+
jobs:
13+
build-and-deploy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: "3.x"
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install -e ".[dev]"
30+
# Ensure sphinx and theme are installed
31+
pip install sphinx sphinx_rtd_theme
32+
33+
- name: Build documentation
34+
run: |
35+
cd docs
36+
sphinx-build -b html source _build/html
37+
38+
- name: Deploy to GitHub Pages
39+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
40+
uses: JamesIves/github-pages-deploy-action@v4
41+
with:
42+
folder: docs/_build/html
43+
branch: gh-pages
44+
clean: true
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Python Package
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
python-version: ["3.9", "3.12"]
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
python -m pip install pytest pytest-cov
27+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
28+
pip install -e ".[dev]"
29+
- name: Lint with flake8
30+
run: |
31+
# stop the build if there are Python syntax errors or undefined names
32+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
33+
# exit-zero treats all errors as warnings
34+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics
35+
- name: Type check with mypy
36+
run: |
37+
mypy sqlalchemy_view_orm
38+
- name: Test with pytest
39+
run: |
40+
pytest --cov=sqlalchemy_view_orm

.gitignore

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
7+
# Distribution / packaging
8+
.Python
9+
build/
10+
develop-eggs/
11+
dist/
12+
downloads/
13+
eggs/
14+
.eggs/
15+
lib/
16+
lib64/
17+
parts/
18+
sdist/
19+
var/
20+
wheels/
21+
share/python-wheels/
22+
*.egg-info/
23+
.installed.cfg
24+
*.egg
25+
MANIFEST
26+
docs/_build/
27+
28+
# Unit test / coverage reports
29+
htmlcov/
30+
.tox/
31+
.nox/
32+
.coverage
33+
.coverage.*
34+
.cache
35+
nosetests.xml
36+
coverage.xml
37+
*.cover
38+
*.py,cover
39+
.hypothesis/
40+
.pytest_cache/
41+
cover/
42+
43+
# Environments
44+
.env
45+
.venv
46+
env/
47+
venv/
48+
49+
# mypy
50+
.mypy_cache/
51+
.dmypy.json
52+
dmypy.json
53+
54+
# Pyre type checker
55+
.pyre/
56+
57+
# pytype static type analyzer
58+
.pytype/
59+
60+
# Cython debug symbols
61+
cython_debug/
62+
63+
# PyPI configuration file
64+
.pypirc

.pre-commit-config.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
10+
- repo: https://github.com/pycqa/isort
11+
rev: 5.12.0
12+
hooks:
13+
- id: isort
14+
name: isort (python)
15+
files: ^sqlalchemy_view_orm/
16+
17+
- repo: https://github.com/psf/black
18+
rev: 23.7.0
19+
hooks:
20+
- id: black
21+
files: ^sqlalchemy_view_orm/
22+
23+
- repo: https://github.com/pycqa/flake8
24+
rev: 6.1.0
25+
hooks:
26+
- id: flake8
27+
additional_dependencies: [flake8-docstrings, flake8-import-order]
28+
files: ^sqlalchemy_view_orm/
29+
30+
- repo: https://github.com/pre-commit/mirrors-mypy
31+
rev: v1.5.1
32+
hooks:
33+
- id: mypy
34+
additional_dependencies: [types-setuptools, sqlalchemy>=2.0.0]
35+
files: ^sqlalchemy_view_orm/

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Changelog
2+
3+
All notable changes to the `SQLAlchemy-ViewORM` project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.1.0] - 2025-06-09
9+
10+
### Added
11+
- Initial release of the library
12+
- Support for simple views
13+
- Support for materialized views
14+
- Support for table-simulated views (for SQLite and other DBMSs lacking materialized views)
15+
- Cross-database compatibility (PostgreSQL, SQLite)
16+
- Methods for creating, dropping, and refreshing views
17+
- Support for dialect-specific features
18+
- Basic documentation and examples
19+
20+
### Fixed
21+
- N/A (initial release)
22+
23+
### Changed
24+
- N/A (initial release)
25+
26+
### Removed
27+
- N/A (initial release)

CONTRIBUTING.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Contributing to SQLAlchemy-ViewORM
2+
3+
Thank you for your interest in contributing to SQLAlchemy-ViewORM! This document provides guidelines and instructions for contributing to this project.
4+
5+
## Code of Conduct
6+
7+
By participating in this project, you agree to abide by our code of conduct: be respectful, considerate, and collaborative.
8+
9+
## How to Contribute
10+
11+
### Reporting Bugs
12+
13+
If you find a bug, please submit an issue with:
14+
15+
1. A clear and descriptive title
16+
2. Steps to reproduce the bug
17+
3. Expected behavior
18+
4. Actual behavior
19+
5. Environment details (OS, Python version, SQLAlchemy version, etc.)
20+
6. Any additional context that might help
21+
22+
### Suggesting Enhancements
23+
24+
We welcome suggestions for enhancements! Please submit an issue with:
25+
26+
1. A clear and descriptive title
27+
2. A detailed description of the proposed enhancement
28+
3. Examples of how the enhancement would be used
29+
4. Any relevant context or background
30+
31+
### Pull Requests
32+
33+
We actively welcome pull requests. Here's how to submit one:
34+
35+
1. Fork the repository
36+
2. Create a new branch (`git checkout -b feature/amazing-feature`)
37+
3. Make your changes
38+
4. Run tests to ensure they pass
39+
5. Commit your changes (`git commit -m 'Add some amazing feature'`)
40+
6. Push to the branch (`git push origin feature/amazing-feature`)
41+
7. Open a Pull Request
42+
43+
## Development Setup
44+
45+
1. Clone your fork of the repository
46+
2. Install development dependencies:
47+
```bash
48+
pip install -e ".[dev]"
49+
```
50+
3. Install pre-commit hooks:
51+
```bash
52+
pre-commit install
53+
```
54+
55+
## Testing
56+
57+
We use pytest for testing. Run the tests with:
58+
59+
```bash
60+
pytest
61+
```
62+
63+
For coverage reports:
64+
65+
```bash
66+
pytest --cov=sqlalchemy_view_orm
67+
```
68+
69+
## Code Style
70+
71+
We follow these coding standards:
72+
73+
- Black for code formatting
74+
- isort for import sorting
75+
- mypy for type checking
76+
- flake8 for linting
77+
78+
You can run these tools manually or use pre-commit hooks.
79+
80+
## Documentation
81+
82+
When adding new features, please update the relevant documentation:
83+
84+
- Update docstrings for public classes and methods
85+
- Update README.md if necessary
86+
- Add examples if appropriate
87+
88+
## Versioning
89+
90+
We use [Semantic Versioning](https://semver.org/) (MAJOR.MINOR.PATCH).
91+
92+
## Release Process
93+
94+
1. Update version in `sqlalchemy_view_orm/__init__.py`
95+
2. Update CHANGELOG.md
96+
3. Create a new GitHub release with the version number
97+
98+
## Getting Help
99+
100+
If you need help with the contribution process, feel free to open an issue with your question.
101+
102+
## License
103+
104+
By contributing to SQLAlchemy-ViewORM, you agree that your contributions will be licensed under the project's MIT License.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2025 Áivan
3+
Copyright (c) 2025 Aivan Fouren
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)