Skip to content

Commit

Permalink
0.9.0
Browse files Browse the repository at this point in the history
tests are still missing
github workflow misses pypi args
  • Loading branch information
K0lb3 committed Mar 14, 2021
0 parents commit dcdf362
Show file tree
Hide file tree
Showing 26 changed files with 5,707 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
82 changes: 82 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: CI

on: [push, pull_request]

jobs:
deploy:
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macOS-latest', 'windows-latest']
python-version: ['3.9', '3.8', '3.7', '3.6']
compiler: ['gcc']
architecture: ['x86', 'x64']

timeout-minutes: 30

runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} ${{ matrix.architecture }} - ${{ matrix.python-version }}

steps:
- uses: actions/checkout@v2

# Setup for Windows - installs the correct python architecture, x86 / x64
- name: Set up Python (Win) ${{ matrix.python-version }} ${{ matrix.architecture }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
if: runner.os == 'Windows'

# Setup for Mac & Linux, both don't support architecture selection without using specific versions
- name: Set up Python (Non-Win) ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
if: runner.os != 'Windows'

# Display the versions
- name: Show runner information
run: |
python --version
pip --version
# Installs the dependencies, add yours here
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel pytest twine pillow
# Syntax check
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# Build
- name: Build package
run: python setup.py build

# Install Local
- name: Install package
run: python setup.py install --user

# Run Tests, have to be in a file with test in name in a folder named tests with functions with test in the name
- name: Run tests
run: pytest -v -s

# Create wheels for deployment
- name: Build wheels
run: python setup.py sdist bdist_wheel --skip-build

# Deploy
- name: Publish
if: success() && runner.os != 'Linux' && github.event_name == 'push'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
twine upload dist/* --skip-existing
127 changes: 127 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
test.py

# Editors
.vscode/
.idea/

# Vagrant
.vagrant/

# Mac/OSX
.DS_Store

# Windows
Thumbs.db

# Source for the following rules: https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore
# 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/
*.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
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

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

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 K0lb3

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
recursive-include src *.cpp
recursive-include src *.hpp
Loading

0 comments on commit dcdf362

Please sign in to comment.