FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Master by eadwinCode · Pull Request #1 · python-ellar/ellar-sql · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .cfg  (1) .db  (1) .ellar  (4) .ini  (2) .mako  (3) .md  (2) .py  (42) .toml  (2) .typed  (1) .yaml  (1) .yml  (4) No extension  (3) dotfile  (3) All 13 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
9 changes: 9 additions & 0 deletions .dockerignore
This file contains hidden or 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,9 @@
*.pyc
.venv*
.vscode
.mypy_cache
.coverage
htmlcov

dist
test.py
8 changes: 8 additions & 0 deletions .flake8
This file contains hidden or 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 @@
[flake8]
max-line-length = 88
ignore = E203, E241, E501, W503, F811
exclude =
.git,
__pycache__
.history
tests/demo_project
10 changes: 10 additions & 0 deletions .github/dependabot.yml
This file contains hidden or 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,10 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: monthly
25 changes: 25 additions & 0 deletions .github/workflows/publish.yml
This file contains hidden or 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,25 @@
name: Publish

on:
release:
types: [published]
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install Flit
run: pip install flit
- name: Install Dependencies
run: flit install --symlink
- name: Publish
env:
FLIT_USERNAME: ${{ secrets.FLIT_USERNAME }}
FLIT_PASSWORD: ${{ secrets.FLIT_PASSWORD }}
run: flit publish
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
This file contains hidden or 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,25 @@
name: Test

on:
push:
pull_request:
types: [assigned, opened, synchronize, reopened]

jobs:
test_coverage:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install Flit
run: pip install flit
- name: Install Dependencies
run: flit install --symlink
- name: Test
run: make test-cov
- name: Coverage
uses: codecov/codecov-action@v3.1.4
43 changes: 43 additions & 0 deletions .github/workflows/test_full.yml
This file contains hidden or 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,43 @@
name: Full Test

on:
push:
pull_request:
types: [assigned, opened, synchronize, reopened]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Flit
run: pip install flit
- name: Install Dependencies
run: flit install --symlink
- name: Test
run: pytest tests

codestyle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install Flit
run: pip install flit
- name: Install Dependencies
run: flit install --symlink
- name: Linting check
run: ruff check ellar_sqlalchemy tests
- name: mypy
run: mypy ellar_sqlalchemy
129 changes: 129 additions & 0 deletions .gitignore
This file contains hidden or 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,129 @@
*.pyc

# Byte-compiled / optimized / DLL files
__pycache__
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
# *.mo Needs to come with the package
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
.vscode
.mypy_cache
.coverage
htmlcov

dist
test.py

docs/site

.DS_Store
.idea
local_install.sh
dist
test.py

docs/site
site/
3 changes: 3 additions & 0 deletions .isort.cfg
This file contains hidden or 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 @@
[settings]
profile = black
combine_as_imports = true
46 changes: 46 additions & 0 deletions .pre-commit-config.yaml
This file contains hidden or 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 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-merge-conflict
- repo: https://github.com/asottile/yesqa
rev: v1.3.0
hooks:
- id: yesqa
- repo: local
hooks:
- id: code_formatting
args: []
name: Code Formatting
entry: "make fmt"
types: [python]
language_version: python3.8
language: python
- id: code_linting
args: [ ]
name: Code Linting
entry: "make lint"
types: [ python ]
language_version: python3.8
language: python
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: end-of-file-fixer
exclude: >-
^examples/[^/]*\.svg$
- id: requirements-txt-fixer
- id: trailing-whitespace
types: [python]
- id: check-case-conflict
- id: check-json
- id: check-xml
- id: check-executables-have-shebangs
- id: check-toml
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: check-added-large-files
- id: check-symlinks
- id: debug-statements
exclude: ^tests/
38 changes: 38 additions & 0 deletions Makefile
This file contains hidden or 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,38 @@
.PHONY: help docs
.DEFAULT_GOAL := help

help:
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

clean: ## Removing cached python compiled files
find . -name \*pyc | xargs rm -fv
find . -name \*pyo | xargs rm -fv
find . -name \*~ | xargs rm -fv
find . -name __pycache__ | xargs rm -rfv
find . -name .ruff_cache | xargs rm -rfv

install: ## Install dependencies
flit install --deps develop --symlink

install-full: ## Install dependencies
make install
pre-commit install -f

lint:fmt ## Run code linters
ruff check ellar_sqlalchemy tests
mypy ellar_sqlalchemy

fmt format:clean ## Run code formatters
ruff format ellar_sqlalchemy tests
ruff check --fix ellar_sqlalchemy tests

test: ## Run tests
pytest tests

test-cov: ## Run tests with coverage
pytest --cov=ellar_sqlalchemy --cov-report term-missing tests

pre-commit-lint: ## Runs Requires commands during pre-commit
make clean
make fmt
make lint
Loading

Back | FazBrowse Home | New Git URL