Skip to content

Commit 529560d

Browse files
committed
v0.0.1
0 parents  commit 529560d

16 files changed

+1575
-0
lines changed

.flake8

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
max-line-length = 130
3+
exclude = venv,.git,__pycache__,__init__.py,

.github/workflows/pytest.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Pytest
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ master ]
7+
paths:
8+
- 'sqlalchemy_database/**'
9+
- 'tests/**'
10+
pull_request:
11+
branches: [ master ]
12+
paths:
13+
- 'sqlalchemy_database/**'
14+
- 'tests/**'
15+
16+
jobs:
17+
test:
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
22+
fail-fast: false
23+
24+
steps:
25+
- uses: actions/checkout@v3
26+
- name: Set up Python
27+
uses: actions/setup-python@v3
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
- uses: actions/cache@v3
31+
id: cache
32+
with:
33+
path: ${{ env.pythonLocation }}
34+
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-test
35+
36+
- name: Install Flit
37+
if: steps.cache.outputs.cache-hit != 'true'
38+
run: pip install flit
39+
- name: Install Dependencies
40+
if: steps.cache.outputs.cache-hit != 'true'
41+
run: flit install --symlink
42+
43+
- name: Test
44+
run: pytest --cov=./ --cov-report=xml
45+
- name: Upload coverage
46+
uses: codecov/codecov-action@v3
47+
48+
# - name: Lint with flake8
49+
# run: |
50+
# # stop the build if there are Python syntax errors or undefined names
51+
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
52+
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
53+
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
54+

.github/workflows/python-publish.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish Python Package
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types:
7+
- created
8+
9+
jobs:
10+
build-and-publish:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Python
15+
uses: actions/setup-python@v3
16+
with:
17+
python-version: "3.8"
18+
- uses: actions/cache@v3
19+
id: cache
20+
with:
21+
path: ${{ env.pythonLocation }}
22+
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-publish
23+
24+
- name: Install Flit
25+
if: steps.cache.outputs.cache-hit != 'true'
26+
run: pip install flit
27+
- name: Install Dependencies
28+
if: steps.cache.outputs.cache-hit != 'true'
29+
run: flit install --symlink
30+
31+
- name: Publish to PyPI
32+
# if: startsWith(github.ref, 'refs/tags')
33+
run: flit publish
34+
env:
35+
FLIT_USERNAME: __token__
36+
FLIT_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

.gitignore

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
### Python template
2+
# Byte-compiled / optimized / DLL files
3+
__pycache__/
4+
*.py[cod]
5+
*$py.class
6+
7+
# C extensions
8+
*.so
9+
10+
# Distribution / packaging
11+
.Python
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
wheels/
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+
cover/
54+
55+
# Translations
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+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
98+
__pypackages__/
99+
100+
# Celery stuff
101+
celerybeat-schedule
102+
celerybeat.pid
103+
104+
# SageMath parsed files
105+
*.sage.py
106+
107+
# Environments
108+
.env
109+
.venv
110+
env/
111+
venv/
112+
ENV/
113+
env.bak/
114+
venv.bak/
115+
116+
# Spyder project settings
117+
.spyderproject
118+
.spyproject
119+
120+
# Rope project settings
121+
.ropeproject
122+
123+
# mkdocs documentation
124+
/site
125+
126+
# mypy
127+
.mypy_cache/
128+
.dmypy.json
129+
dmypy.json
130+
131+
# Pyre type checker
132+
.pyre/
133+
134+
# pytype static type analyzer
135+
.pytype/
136+
137+
# Cython debug symbols
138+
cython_debug/
139+
140+
# ide
141+
/dev/
142+
/.idea/
143+
*.db

0 commit comments

Comments
 (0)