Skip to content

Commit 7bc7e98

Browse files
committed
add project files
1 parent a68c2cc commit 7bc7e98

File tree

11 files changed

+1381
-166
lines changed

11 files changed

+1381
-166
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## Expected Behavior
2+
3+
Describe what you were trying to get done and what you expected to happen.
4+
5+
## Actual Behavior
6+
7+
Tell us what happened, what went wrong,
8+
9+
## Steps to Reproduce the Problem
10+
11+
1.
12+
2.
13+
3.
14+
15+
```plaintext
16+
Paste the command(s) you ran and the output.
17+
If there was a crash, please include the traceback here.
18+
```
19+
20+
## Specifications
21+
22+
* Python version:
23+
* GINO version:
24+
* gino-sanic version:
25+
* Sanic version:

.github/workflows/test.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- 'v*.*.*'
9+
pull_request:
10+
branches:
11+
- master
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
python-version: [ '3.6', '3.7', '3.8' ]
19+
postgres-version: [ '9.6', '12.1' ]
20+
services:
21+
postgres:
22+
image: fantix/postgres-ssl:${{ matrix.postgres-version }}
23+
env:
24+
POSTGRES_USER: gino
25+
ports:
26+
- 5432:5432
27+
# needed because the postgres container does not provide a healthcheck
28+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
29+
steps:
30+
- name: Checkout source code
31+
uses: actions/checkout@v1
32+
- name: Set up Python
33+
uses: actions/setup-python@v1
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
- name: virtualenv cache
37+
uses: actions/cache@preview
38+
with:
39+
path: ~/.cache/pypoetry/virtualenvs
40+
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles(format('{0}{1}', github.workspace, '/poetry.lock')) }}
41+
restore-keys: |
42+
${{ runner.os }}-${{ matrix.python-version }}-poetry-
43+
- name: Install Python dependencies
44+
run: |
45+
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
46+
$HOME/.poetry/bin/poetry install
47+
- name: Test with pytest
48+
env:
49+
DB_HOST: localhost
50+
DB_USER: gino
51+
run: |
52+
$HOME/.poetry/bin/poetry run pytest --cov=src --cov=examples --cov-fail-under=95 --cov-report xml
53+
- name: Check code format with black
54+
if: matrix.python-version >= '3.6'
55+
run: |
56+
$HOME/.poetry/bin/poetry run black --check src
57+
- name: Submit coverage report
58+
if: matrix.python-version == '3.8' && matrix.postgres-version == '12.1' && github.ref == 'refs/heads/master'
59+
env:
60+
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_TOKEN }}
61+
run: |
62+
pip install codacy-coverage
63+
python-codacy-coverage -r coverage.xml
64+
release:
65+
runs-on: ubuntu-latest
66+
needs: test
67+
strategy:
68+
matrix:
69+
python-version: [ '3.8' ]
70+
steps:
71+
- name: Checkout source code
72+
if: startsWith(github.ref, 'refs/tags/')
73+
uses: actions/checkout@v1
74+
- name: Set up Python
75+
if: startsWith(github.ref, 'refs/tags/')
76+
uses: actions/setup-python@v1
77+
with:
78+
python-version: ${{ matrix.python-version }}
79+
- name: virtualenv cache
80+
if: startsWith(github.ref, 'refs/tags/')
81+
uses: actions/cache@preview
82+
with:
83+
path: ~/.cache/pypoetry/virtualenvs
84+
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles(format('{0}{1}', github.workspace, '/poetry.lock')) }}
85+
restore-keys: |
86+
${{ runner.os }}-${{ matrix.python-version }}-poetry-
87+
- name: Release to PyPI
88+
if: startsWith(github.ref, 'refs/tags/')
89+
env:
90+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
91+
run: |
92+
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
93+
$HOME/.poetry/bin/poetry install
94+
$HOME/.poetry/bin/poetry build
95+
$HOME/.poetry/bin/poetry publish --username __token__ --password ${{ secrets.PYPI_TOKEN }}

.gitignore

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# IPython
81+
profile_default/
82+
ipython_config.py
83+
84+
# pyenv
85+
.python-version
86+
87+
# pipenv
88+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
90+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
91+
# install all needed dependencies.
92+
#Pipfile.lock
93+
94+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
95+
__pypackages__/
96+
97+
# Celery stuff
98+
celerybeat-schedule
99+
celerybeat.pid
100+
101+
# SageMath parsed files
102+
*.sage.py
103+
104+
# Environments
105+
.env
106+
.venv
107+
env/
108+
venv/
109+
ENV/
110+
env.bak/
111+
venv.bak/
112+
113+
# Spyder project settings
114+
.spyderproject
115+
.spyproject
116+
117+
# Rope project settings
118+
.ropeproject
119+
120+
# mkdocs documentation
121+
/site
122+
123+
# mypy
124+
.mypy_cache/
125+
.dmypy.json
126+
dmypy.json
127+
128+
# Pyre type checker
129+
.pyre/
130+
131+
.vscode/
132+
.idea/

LICENSE

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
BSD License
3+
4+
Copyright (c) 2017-present, Samuel Li
5+
All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without modification,
8+
are permitted provided that the following conditions are met:
9+
10+
* Redistributions of source code must retain the above copyright notice, this
11+
list of conditions and the following disclaimer.
12+
13+
* Redistributions in binary form must reproduce the above copyright notice, this
14+
list of conditions and the following disclaimer in the documentation and/or
15+
other materials provided with the distribution.
16+
17+
* Neither the name of the copyright holder nor the names of its
18+
contributors may be used to endorse or promote products derived from this
19+
software without specific prior written permission.
20+
21+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
25+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
28+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
29+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
30+
OF THE POSSIBILITY OF SUCH DAMAGE.
31+

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# gino-sanic
2+
3+
An extension for GINO to support Sanic server.
4+
5+
**This project "gino-sanic" is currently not maintained and needs adoption.**
6+
7+
Since GINO 1.0, the built-in extensions are now separate projects supported by
8+
the community. This project is copied here directly from GINO 0.8.x for
9+
compatibility. Help is needed to:
10+
11+
* Keep this project maintained - follow Sanic releases, fix issues, etc.
12+
* Add more examples and documentation.
13+
* Answer questions in the community.

0 commit comments

Comments
 (0)