Skip to content

Commit

Permalink
feat/bump_ovos_precise_runner (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Apr 6, 2023
1 parent a39d467 commit 0c1632f
Show file tree
Hide file tree
Showing 9 changed files with 130 additions and 81 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/build_tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run Build Tests
name: Run tflite Build Tests
on:
push:
branches:
Expand All @@ -20,16 +20,20 @@ on:
workflow_dispatch:

jobs:
build_tests:
lite_build_tests:
strategy:
max-parallel: 2
matrix:
python-version: [ 3.7, 3.8, 3.9, "3.10" ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Setup Python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: ${{ matrix.python-version }}
- name: Install Build Tools
run: |
python -m pip install build wheel
Expand All @@ -43,6 +47,6 @@ jobs:
- name: Build Distribution Packages
run: |
python setup.py bdist_wheel
- name: Install package
- name: Install lite package
run: |
pip install .
pip install .[tflite]
52 changes: 52 additions & 0 deletions .github/workflows/build_tests_full.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Run tensorflow Build Tests
on:
push:
branches:
- master
pull_request:
branches:
- dev
paths-ignore:
- 'replace_package_name/version.py'
- 'test/**'
- 'examples/**'
- '.github/**'
- '.gitignore'
- 'LICENSE'
- 'CHANGELOG.md'
- 'MANIFEST.in'
- 'readme.md'
- 'scripts/**'
workflow_dispatch:

jobs:
full_build_tests:
strategy:
max-parallel: 2
matrix:
python-version: [ 3.7, 3.8, 3.9, "3.10" ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Build Tools
run: |
python -m pip install build wheel
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt install python3-dev swig portaudio19-dev
- name: Build Source Packages
run: |
python setup.py sdist
- name: Build Distribution Packages
run: |
python setup.py bdist_wheel
- name: Install package
run: |
pip install .[full]
33 changes: 21 additions & 12 deletions .github/workflows/license_tests.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
name: Run License Tests
on:
push:
branches:
- master
pull_request:
branches:
- dev
workflow_dispatch:

jobs:
license_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Setup Python
uses: actions/setup-python@v1
with:
Expand All @@ -20,16 +23,22 @@ jobs:
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt install python3-dev swig portaudio19-dev
sudo apt install python3-dev swig libssl-dev portaudio19-dev
- name: Install core repo
run: |
pip install .
- name: Install licheck
run: |
pip install git+https://github.com/NeonJarbas/lichecker
- name: Install test dependencies
pip install .[tflite]
- name: Get explicit and transitive dependencies
run: |
pip install pytest pytest-timeout pytest-cov
- name: Test Licenses
run: |
pytest test/license_tests.py
pip freeze > requirements-all.txt
- name: Check python
id: license_check_report
uses: pilosus/action-pip-license-checker@v0.5.0
with:
requirements: 'requirements-all.txt'
fail: 'Copyleft,Other,Error'
fails-only: true
exclude: '^(tqdm).*'
exclude-license: '^(Mozilla).*$'
- name: Print report
if: ${{ always() }}
run: echo "${{ steps.license_check_report.outputs.report }}"
12 changes: 4 additions & 8 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,21 @@ on:

jobs:
unit_tests:
strategy:
max-parallel: 2
matrix:
python-version: [ 3.7, 3.8, 3.9, "3.10" ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up python ${{ matrix.python-version }}
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
python-version: 3.8
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt install python3-dev
sudo apt install python3-dev swig portaudio19-dev
python -m pip install build wheel
- name: Install core repo
run: |
pip install .
pip install .[tflite]
- name: Install test dependencies
run: |
pip install pytest pytest-timeout pytest-cov
Expand Down
33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
dev.env
.dev_opts.json
.idea
*.code-workspace
*.pyc
*.swp
*~
mimic
/skills
pocketsphinx-python
*.egg-info/
build
dist
tornado.web
tornado.ioloop
mycroft/__version__.py
scripts/logs/*
logs/*
.coverage
/htmlcov
test/audio_accuracy/data
scripts/*.screen
doc/_build/
.installed
.mypy_cache
.vscode
.theia
.venv/

# Created by unit tests
test/unittests/skills/test_skill/settings.json
test_conf.json
.pytest_cache/
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ Mycroft wake word plugin for [precise-lite](https://github.com/OpenVoiceOS/preci

## Install

`pip install ovos-ww-plugin-precise-lite`
This package supports both tflite-runner and the full tensorflow.

To install with tflite, use `pip install ovos-ww-plugin-precise-lite[tflite]`.
For the full tensorflow use `pip install ovos-ww-plugin-precise-lite[full]`.

## Configuration

Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
precise_lite_runner~=0.4
precise_lite_runner~=0.4, >=0.4.1
ovos-plugin-manager>=0.0.4
ovos-utils>=0.0.14
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
from setuptools import setup
import os

from setuptools import setup

BASEDIR = os.path.abspath(os.path.dirname(__file__))
Expand Down Expand Up @@ -65,6 +65,10 @@ def required(requirements_file):
license='Apache-2.0',
packages=['ovos_ww_plugin_precise_lite'],
install_requires=required("requirements/requirements.txt"),
extras_require={
'tflite': ["tflite-runtime"],
'full': ["tensorflow"]
},
zip_safe=True,
classifiers=[
'Development Status :: 3 - Alpha',
Expand Down
52 changes: 0 additions & 52 deletions test/license_tests.py

This file was deleted.

0 comments on commit 0c1632f

Please sign in to comment.