-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from JanCBrammer/dev
Version bump
- Loading branch information
Showing
28 changed files
with
1,077 additions
and
1,658 deletions.
There are no files selected for viewing
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,35 @@ | ||
name: publish | ||
on: | ||
release: | ||
types: [published] | ||
|
||
|
||
jobs: | ||
|
||
build_publish: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade setuptools pip wheel twine | ||
- name: Build source and wheel | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
- name: Publish | ||
# env: | ||
# TWINE_USERNAME: ${{ secrets.TESTPYPI_USERNAME }} | ||
# TWINE_PASSWORD: ${{ secrets.TESTPYPI_PASSWORD }} | ||
# run: | | ||
# twine upload --repository-url https://test.pypi.org/legacy/ dist/* | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
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 |
---|---|---|
@@ -0,0 +1,147 @@ | ||
name: test | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- dev | ||
pull_request: | ||
branches: | ||
- master | ||
- dev | ||
|
||
jobs: | ||
|
||
lint: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: # every step is marked with a leading hyphen (-) | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade setuptools pip wheel | ||
python -m pip install flake8 | ||
- name: Linting | ||
run: | | ||
flake8 biopeaks --exclude biopeaks/images,biopeaks/tests/testdata,biopeaks/resources.py --max-complexity=10 --ignore E303,C901,E203,W503,E501,W504,E129,W605,E371,E731 | ||
build: | ||
|
||
needs: lint # only run if lint finishes | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade setuptools pip wheel | ||
- name: Build source and wheel | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
- name: Upload source | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: source | ||
path: dist/*.tar.gz | ||
- name: Upload wheel | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: wheel | ||
path: dist/*.whl | ||
|
||
|
||
test_source: | ||
|
||
needs: build # only run if build finishes | ||
runs-on: ${{ matrix.os }} | ||
continue-on-error: false | ||
strategy: | ||
matrix: # all steps of this job will run using this matrix (matrix not accessible to other jobs) | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: [3.7, 3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up miniconda | ||
uses: goanpeca/setup-miniconda@v1 | ||
with: | ||
auto-update-conda: true | ||
channels: conda-forge | ||
channel-priority: strict | ||
activate-environment: ci_env # includes pytest and pip | ||
environment-file: environment.yml | ||
python-version: ${{ matrix.python-version }} | ||
auto-activate-base: false | ||
- name: Download source | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: source | ||
- name: Install source | ||
shell: bash -l {0} | ||
run: | | ||
ls | ||
pip install --no-index --find-links=. biopeaks # --no-index: do not install from PyPI, --find-links=.:search local dir for wheels or source | ||
- name: Test with pytest on Ubuntu | ||
if: matrix.os == 'ubuntu-latest' | ||
shell: bash -l {0} | ||
run: | | ||
sudo apt-get install -y xvfb x11-utils libxkbcommon-x11-0 | ||
xvfb-run pytest -v | ||
- name: Test with pytest on Windows and MacOS | ||
if: matrix.os == 'windows-latest' || matrix.os == 'macos-latest' | ||
shell: bash -l {0} | ||
run: | | ||
pytest -v | ||
test_wheel: | ||
|
||
needs: build # only run if build finishes | ||
runs-on: ${{ matrix.os }} | ||
continue-on-error: false | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: [3.7, 3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up miniconda | ||
uses: goanpeca/setup-miniconda@v1 | ||
with: | ||
auto-update-conda: true | ||
channels: conda-forge | ||
channel-priority: strict | ||
activate-environment: ci_env | ||
environment-file: environment.yml | ||
python-version: ${{ matrix.python-version }} | ||
auto-activate-base: false | ||
- name: Download wheel | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: wheel | ||
- name: Install wheel | ||
shell: bash -l {0} | ||
run: | | ||
ls | ||
pip install --no-index --find-links=. biopeaks | ||
- name: Test with pytest on Ubuntu | ||
if: matrix.os == 'ubuntu-latest' | ||
shell: bash -l {0} | ||
run: | | ||
sudo apt-get install -y xvfb x11-utils libxkbcommon-x11-0 | ||
xvfb-run pytest -v | ||
- name: Test with pytest on Windows and MacOS | ||
if: matrix.os == 'windows-latest' || matrix.os == 'macos-latest' | ||
shell: bash -l {0} | ||
run: | | ||
pytest -v |
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 |
---|---|---|
|
@@ -5,4 +5,5 @@ build/ | |
dist/ | ||
__pycache__/ | ||
biopeaks/__pycache__/ | ||
biopeaks.egg-info/ | ||
biopeaks.egg-info/ | ||
.vscode/ |
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
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
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 |
---|---|---|
|
@@ -23,4 +23,3 @@ def main(): | |
|
||
if __name__ == '__main__': | ||
main() | ||
|
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
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,6 @@ | ||
from biopeaks.heart import ecg_peaks | ||
from benchmark_utils import BenchmarkDetectorGUDB | ||
|
||
|
||
pipeline = BenchmarkDetectorGUDB(ecg_peaks, 1) | ||
pipeline.benchmark_records("jogging", channel="cs_V2_V1", annotation="annotation_cs") |
File renamed without changes.
Oops, something went wrong.