generated from timeflux/timeflux_example
-
Notifications
You must be signed in to change notification settings - Fork 3
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
174 additions
and
49 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 |
---|---|---|
|
@@ -4,7 +4,10 @@ | |
__pycache__ | ||
*.py[cod] | ||
*$py.class | ||
doc/api | ||
doc/build | ||
*.egg-info | ||
.idea | ||
build/ | ||
dist/ | ||
.idea | ||
.coverage | ||
|
||
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,16 @@ | ||
Timeflux OpenBCI plugin | ||
======================= | ||
|
||
This plugin provides a unified interface for all `OpenBCI <https://openbci.com>`__ boards. | ||
|
||
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_openbci |
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 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,43 @@ | ||
[metadata] | ||
name = timeflux-openbci | ||
description = Timeflux OpenBCI plugin | ||
long_description = file: README.rst | ||
author = Pierre Clisson | ||
author-email = [email protected] | ||
license = MIT | ||
home-page = https://timeflux.io | ||
project_urls = | ||
Documentation = http://doc.timeflux.io/projects/timeflux-openbci/ | ||
Source Code = https://github.com/timeflux/timeflux_openbci | ||
Bug Tracker = https://github.com/timeflux/timeflux_openbci/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, openbci | ||
|
||
[options] | ||
packages = find: | ||
install_requires = | ||
timeflux_brainflow>=0.1 | ||
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 OpenBCI | ||
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_openbci/__init__.py') as f: | ||
VERSION = re.search('^__version__\s*=\s*\'(.*)\'', f.read(), re.M).group(1) | ||
|
||
DEPENDENCIES = [ | ||
'brainflow', | ||
'timeflux-brainflow @ git+https://github.com/timeflux/timeflux_brainflow', | ||
'timeflux @ git+https://github.com/timeflux/timeflux' | ||
] | ||
|
||
setup( | ||
name='timeflux-openbci', | ||
packages=find_packages(), | ||
version=VERSION, | ||
description='Timeflux OpenBCI plugin', | ||
long_description=DESCRIPTION, | ||
author='Pierre Clisson', | ||
author_email='[email protected]', | ||
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 +0,0 @@ | ||
__version__ = '0.1.0' | ||
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