-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
209 additions
and
176 deletions.
There are no files selected for viewing
This file contains 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,41 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.7, 3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Set env | ||
run: echo "::set-env name=PACKAGE::$(basename `git config --get remote.origin.url` | sed -e 's/\.git$//')" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e ".[dev]" | ||
- name: Test formatting | ||
run: | | ||
pip install black | ||
black --check $PACKAGE | ||
- name: Test documentation | ||
run: | | ||
cd doc | ||
make html | ||
cd .. | ||
- name: Test code | ||
run: | | ||
pip install pytest pytest-cov | ||
pytest --cov=$PACKAGE -k "not mne" |
This file contains 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,28 @@ | ||
name: publish | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
deploy: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine pep517 | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python -m pep517.build . | ||
twine upload dist/* |
This file contains 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 |
---|---|---|
@@ -1,104 +1,13 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
.DS_Store | ||
.cache | ||
.pytest_cache | ||
__pycache__ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
*.egg-info | ||
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/ | ||
.idea | ||
.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 | ||
|
||
# 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/ | ||
doc/** |
This file contains 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,12 @@ | ||
version: 2 | ||
formats: | ||
python: | ||
version: 3.8 | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- dev | ||
sphinx: | ||
fail_on_warning: true |
This file contains 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,18 @@ | ||
Timeflux BITalino plugin | ||
======================== | ||
|
||
This plugin provides a driver to connect to `BITalino <https://bitalino.com>`__ devices. | ||
|
||
When connecting a BITalino device for the first time, the default pairing code is: `1234`. | ||
|
||
Installation | ||
------------ | ||
|
||
First, make sure that `Timeflux <https://github.com/timeflux/timeflux>`__ is installed. | ||
|
||
You can then install this plugin in the `timeflux` environment: | ||
|
||
:: | ||
|
||
$ conda activate timeflux | ||
$ pip install timeflux_bitalino |
This file was deleted.
Oops, something went wrong.
This file contains 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,11 @@ | ||
# Enable version inference | ||
[tool.setuptools_scm] | ||
local_scheme = "no-local-version" | ||
|
||
# Generate documentation shim | ||
[tool.docinit] | ||
|
||
# https://setuptools.readthedocs.io/en/latest/build_meta.html | ||
[build-system] | ||
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4", "docinit"] | ||
build-backend = "setuptools.build_meta" |
This file contains 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,44 @@ | ||
[metadata] | ||
name = timeflux-bitalino | ||
description = Timeflux BITalino plugin | ||
long_description = file: README.rst | ||
author = Pierre Clisson | ||
author-email = contact@timeflux.io | ||
license = MIT | ||
home-page = https://timeflux.io | ||
project_urls = | ||
Documentation = http://doc.timeflux.io/projects/timeflux-bitalino/ | ||
Source Code = https://github.com/timeflux/timeflux_bitalino | ||
Bug Tracker = https://github.com/timeflux/timeflux_bitalino/issues | ||
classifier = | ||
Development Status :: 4 - Beta | ||
Environment :: Console | ||
Intended Audience :: Developers | ||
Intended Audience :: Science/Research | ||
License :: OSI Approved :: MIT License | ||
Operating System :: OS Independent | ||
Programming Language :: Python | ||
keywords = timeflux, bitalino | ||
|
||
[options] | ||
packages = find: | ||
install_requires = | ||
pyserial>=3.4 | ||
bitalino>=1.2 | ||
timeflux>=0.5.3 | ||
|
||
[options.extras_require] | ||
dev = | ||
pytest>=5.3 | ||
sphinx>=2.2 | ||
sphinx_rtd_theme>=0.4 | ||
setuptools_scm | ||
docinit | ||
|
||
[docinit] | ||
name = Timeflux BITalino | ||
parent_url = https://doc.timeflux.io | ||
logo_url = https://github.com/timeflux/timeflux/raw/master/doc/static/img/logo.png | ||
|
||
[build_sphinx] | ||
warning-is-error = 1 |
This file contains 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 |
---|---|---|
@@ -1,28 +1,3 @@ | ||
""" Setup """ | ||
|
||
import re | ||
from setuptools import setup, find_packages | ||
|
||
with open('README.md', 'rb') as f: | ||
DESCRIPTION = f.read().decode('utf-8') | ||
|
||
with open('timeflux_bitalino/__init__.py') as f: | ||
VERSION = re.search('^__version__\s*=\s*\'(.*)\'', f.read(), re.M).group(1) | ||
|
||
DEPENDENCIES = [ | ||
'pyserial', | ||
'bitalino', | ||
'timeflux @ git+https://github.com/timeflux/timeflux' | ||
] | ||
|
||
setup( | ||
name='timeflux-bitalino', | ||
packages=find_packages(), | ||
version=VERSION, | ||
description='Timeflux BITalino plugin', | ||
long_description=DESCRIPTION, | ||
author='Pierre Clisson', | ||
author_email='contact@timeflux.io', | ||
url='https://timeflux.io', | ||
install_requires=DEPENDENCIES | ||
) | ||
# Required for editable installs | ||
# https://discuss.python.org/t/specification-of-editable-installation/1564/ | ||
import setuptools; setuptools.setup() |
This file contains 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,7 @@ | ||
"""Test configuration""" | ||
|
||
import os | ||
import pytest | ||
|
||
def pytest_configure(config): | ||
pytest.path = os.path.dirname(os.path.abspath(__file__)) |
This file contains 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,5 @@ | ||
import pytest | ||
|
||
def test_none(): | ||
assert True | ||
|
This file contains 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 |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.1.0' | ||
__version__ = "0.1.0" |
Oops, something went wrong.