Skip to content

Commit bc8ba69

Browse files
committed
Initial
0 parents  commit bc8ba69

19 files changed

+4348
-0
lines changed

.github/dependabot.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
4+
- package-ecosystem: github-actions
5+
directory: /
6+
schedule:
7+
interval: monthly

.github/release.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- ignore-for-release
5+
authors:
6+
- dependabot
7+
categories:
8+
- title: Breaking Changes 🛠
9+
labels:
10+
- semver-major
11+
- breaking-change
12+
- title: New Features 🎉
13+
labels:
14+
- semver-minor
15+
- enhancement
16+
- title: Other Changes
17+
labels:
18+
- '*'

.github/workflows/ci.yaml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
tags: [v*.*.*]
8+
9+
jobs:
10+
build:
11+
name: Test & Build
12+
strategy:
13+
matrix:
14+
python-version: ['2.7', '3.7', '3.8', '3.10']
15+
runs-on: [ubuntu-latest]
16+
env:
17+
PYTHON: ${{ matrix.python-version }}
18+
steps:
19+
- uses: actions/checkout@v3
20+
with:
21+
fetch-depth: 0 # fetch all history for setuptools_scm to be able to read tags
22+
23+
- uses: actions/setup-python@v4
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Install python dependencies
28+
run: |
29+
pip install wheel build tox
30+
pip install .[dev]
31+
32+
- name: Determine pyenv
33+
id: pyenv
34+
run: echo "::set-output name=value::py$(echo $PYTHON | tr -d '.')"
35+
36+
- name: Run tests
37+
env:
38+
TOXENV: ${{ steps.pyenv.outputs.value }}
39+
run: tox
40+
41+
- name: Build python package
42+
run: python -m build
43+
44+
- name: Upload coverage
45+
uses: codecov/codecov-action@v3
46+
with:
47+
env_vars: PYTHON
48+
fail_ci_if_error: true
49+
files: .coverage.${{ steps.pyenv.outputs.value }}.xml
50+
51+
- uses: actions/upload-artifact@v3
52+
if: matrix.python-version == '2.7' || matrix.python-version == '3.8'
53+
with:
54+
name: dist-${{ matrix.python-version }}
55+
path: dist
56+
57+
publish:
58+
name: Publish to PyPI
59+
needs: build
60+
runs-on: [ubuntu-latest]
61+
if: github.event_name != 'pull_request'
62+
steps:
63+
- uses: actions/download-artifact@v3
64+
65+
- name: Organize files for upload
66+
run: |
67+
mkdir dist
68+
mv dist-3.8/* dist/
69+
mv dist-2.7/*.whl dist/
70+
71+
- name: Test Publish package
72+
uses: pypa/gh-action-pypi-publish@release/v1
73+
with:
74+
password: ${{ secrets.SHARED_PYPI_TEST_TOKEN }}
75+
repository_url: https://test.pypi.org/legacy/
76+
77+
- name: Publish package
78+
uses: pypa/gh-action-pypi-publish@release/v1
79+
if: startsWith(github.event.ref, 'refs/tags/v')
80+
with:
81+
password: ${{ secrets.SHARED_PYPI_TOKEN }}

.gitignore

Lines changed: 285 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,285 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/python,linux,windows,macos,vim,visualstudiocode
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=python,linux,windows,macos,vim,visualstudiocode
3+
4+
### Linux ###
5+
*~
6+
7+
# temporary files which can be created if a process still has a handle open of a deleted file
8+
.fuse_hidden*
9+
10+
# KDE directory preferences
11+
.directory
12+
13+
# Linux trash folder which might appear on any partition or disk
14+
.Trash-*
15+
16+
# .nfs files are created when an open file is removed but is still being accessed
17+
.nfs*
18+
19+
### macOS ###
20+
# General
21+
.DS_Store
22+
.AppleDouble
23+
.LSOverride
24+
25+
# Icon must end with two \r
26+
Icon
27+
28+
29+
# Thumbnails
30+
._*
31+
32+
# Files that might appear in the root of a volume
33+
.DocumentRevisions-V100
34+
.fseventsd
35+
.Spotlight-V100
36+
.TemporaryItems
37+
.Trashes
38+
.VolumeIcon.icns
39+
.com.apple.timemachine.donotpresent
40+
41+
# Directories potentially created on remote AFP share
42+
.AppleDB
43+
.AppleDesktop
44+
Network Trash Folder
45+
Temporary Items
46+
.apdisk
47+
48+
### macOS Patch ###
49+
# iCloud generated files
50+
*.icloud
51+
52+
### Python ###
53+
# Byte-compiled / optimized / DLL files
54+
__pycache__/
55+
*.py[cod]
56+
*$py.class
57+
58+
# C extensions
59+
*.so
60+
61+
# Distribution / packaging
62+
.Python
63+
build/
64+
develop-eggs/
65+
dist/
66+
downloads/
67+
eggs/
68+
.eggs/
69+
lib/
70+
lib64/
71+
parts/
72+
sdist/
73+
var/
74+
wheels/
75+
share/python-wheels/
76+
*.egg-info/
77+
.installed.cfg
78+
*.egg
79+
MANIFEST
80+
81+
# PyInstaller
82+
# Usually these files are written by a python script from a template
83+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
84+
*.manifest
85+
*.spec
86+
87+
# Installer logs
88+
pip-log.txt
89+
pip-delete-this-directory.txt
90+
91+
# Unit test / coverage reports
92+
htmlcov/
93+
.tox/
94+
.nox/
95+
.coverage
96+
.coverage.*
97+
.cache
98+
nosetests.xml
99+
coverage.xml
100+
*.cover
101+
*.py,cover
102+
.hypothesis/
103+
.pytest_cache/
104+
cover/
105+
106+
# Translations
107+
*.mo
108+
*.pot
109+
110+
# Django stuff:
111+
*.log
112+
local_settings.py
113+
db.sqlite3
114+
db.sqlite3-journal
115+
116+
# Flask stuff:
117+
instance/
118+
.webassets-cache
119+
120+
# Scrapy stuff:
121+
.scrapy
122+
123+
# Sphinx documentation
124+
docs/_build/
125+
126+
# PyBuilder
127+
.pybuilder/
128+
target/
129+
130+
# Jupyter Notebook
131+
.ipynb_checkpoints
132+
133+
# IPython
134+
profile_default/
135+
ipython_config.py
136+
137+
# pyenv
138+
# For a library or package, you might want to ignore these files since the code is
139+
# intended to run in multiple environments; otherwise, check them in:
140+
# .python-version
141+
142+
# pipenv
143+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
144+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
145+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
146+
# install all needed dependencies.
147+
#Pipfile.lock
148+
149+
# poetry
150+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
151+
# This is especially recommended for binary packages to ensure reproducibility, and is more
152+
# commonly ignored for libraries.
153+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
154+
#poetry.lock
155+
156+
# pdm
157+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
158+
#pdm.lock
159+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
160+
# in version control.
161+
# https://pdm.fming.dev/#use-with-ide
162+
.pdm.toml
163+
164+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
165+
__pypackages__/
166+
167+
# Celery stuff
168+
celerybeat-schedule
169+
celerybeat.pid
170+
171+
# SageMath parsed files
172+
*.sage.py
173+
174+
# Environments
175+
.env
176+
.venv
177+
env/
178+
venv/
179+
ENV/
180+
env.bak/
181+
venv.bak/
182+
183+
# Spyder project settings
184+
.spyderproject
185+
.spyproject
186+
187+
# Rope project settings
188+
.ropeproject
189+
190+
# mkdocs documentation
191+
/site
192+
193+
# mypy
194+
.mypy_cache/
195+
.dmypy.json
196+
dmypy.json
197+
198+
# Pyre type checker
199+
.pyre/
200+
201+
# pytype static type analyzer
202+
.pytype/
203+
204+
# Cython debug symbols
205+
cython_debug/
206+
207+
# PyCharm
208+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
209+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
210+
# and can be added to the global gitignore or merged into this file. For a more nuclear
211+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
212+
#.idea/
213+
214+
### Vim ###
215+
# Swap
216+
[._]*.s[a-v][a-z]
217+
!*.svg # comment out if you don't need vector files
218+
[._]*.sw[a-p]
219+
[._]s[a-rt-v][a-z]
220+
[._]ss[a-gi-z]
221+
[._]sw[a-p]
222+
223+
# Session
224+
Session.vim
225+
Sessionx.vim
226+
227+
# Temporary
228+
.netrwhist
229+
# Auto-generated tag files
230+
tags
231+
# Persistent undo
232+
[._]*.un~
233+
234+
### VisualStudioCode ###
235+
.vscode/*
236+
!.vscode/settings.json
237+
!.vscode/tasks.json
238+
!.vscode/launch.json
239+
!.vscode/extensions.json
240+
!.vscode/*.code-snippets
241+
242+
# Local History for Visual Studio Code
243+
.history/
244+
245+
# Built Visual Studio Code Extensions
246+
*.vsix
247+
248+
### VisualStudioCode Patch ###
249+
# Ignore all local history of files
250+
.history
251+
.ionide
252+
253+
# Support for Project snippet scope
254+
.vscode/*.code-snippets
255+
256+
# Ignore code-workspaces
257+
*.code-workspace
258+
259+
### Windows ###
260+
# Windows thumbnail cache files
261+
Thumbs.db
262+
Thumbs.db:encryptable
263+
ehthumbs.db
264+
ehthumbs_vista.db
265+
266+
# Dump file
267+
*.stackdump
268+
269+
# Folder config file
270+
[Dd]esktop.ini
271+
272+
# Recycle Bin used on file shares
273+
$RECYCLE.BIN/
274+
275+
# Windows Installer files
276+
*.cab
277+
*.msi
278+
*.msix
279+
*.msm
280+
*.msp
281+
282+
# Windows shortcuts
283+
*.lnk
284+
285+
# End of https://www.toptal.com/developers/gitignore/api/python,linux,windows,macos,vim,visualstudiocode

0 commit comments

Comments
 (0)