Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,26 @@ python:

sudo: required

jobs:
include:
- stage: unit-test
script:
- make install-tests-requirements
- make test
- 'bash <(curl -s https://codecov.io/bash)'
- stage: doc
script:
- make install-docs-requirements
- make docs

install:
- sudo apt-get update
- sudo apt-get install -y portaudio19-dev python-all-dev --no-install-recommends
- sudo apt-get install -y lilv-utils calf-plugins guitarix --no-install-recommends
- sudo apt-get install -y libavahi-compat-libdnssd1 --no-install-recommends
- pip3 install coveralls
- pip3 install git+https://github.com/depl0y/pybonjour-python3
- pip3 install zeroconf
- python3 setup.py develop

script:
- lv2ls
- coverage3 run --source=webservice wstest/config.py test

after_success:
- 'bash <(curl -s https://codecov.io/bash)'
19 changes: 11 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ The registration must occur before application initialization (``application.sta
application = Application(path_data="data/", address='localhost')

from webservice.webservice import WebService
application.register(WebService(application, port))
application.register(WebService(application, port=3000))

2. Initialization of the web server
+++++++++++++++++++++++++++++++++++
Expand Down Expand Up @@ -122,7 +122,7 @@ look like the following code:
application = Application(path_data="data/", address='localhost')

from webservice.webservice import WebService
application.register(WebService(application, port))
application.register(WebService(application, port=3000))

application.start()

Expand Down Expand Up @@ -163,17 +163,20 @@ Maintenance
Documentation
*************

Is necessary to install `nodejs`_.

.. _nodejs: https://nodejs.org/en/

.. code-block:: bash

# Installing dependencies
npm install -g aglio
make install-docs-requirements

# Generate doc
cd docs/
aglio -i documentation.apib --theme-variables streak --theme-template triple -o index.html
make docs

# View documentation
firefox index.html
make docs-see

Test
****
Expand All @@ -185,5 +188,5 @@ Test

coverage3 run --source=webservice wstest/config.py test
coverage3 report
coverage3 html
firefox htmlcov/index.html
make test-details

84 changes: 84 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
BROWSER=firefox
BOLD=\033[1m
NORMAL=\033[0m

default: help

clean: clean-pyc clean-test clean-build clean-docs

clean-build:
rm -rf .eggs
rm -rf build
rm -rf dist

clean-pyc:
find . -name '*.pyc' -exec rm --force {} +
find . -name '*.pyo' -exec rm --force {} +

clean-test:
rm -rf .cache
rm -f .coverage
rm -rf htmlcov
rm -rf wstest/data

clean-docs:
rm -f docs/index.html

docs: clean-docs
cd docs && aglio -i documentation.apib --theme-variables streak --theme-template triple -o index.html

docs-see: docs
$(BROWSER) docs/index.html

install-docs-requirements:
npm install -g aglio

install-tests-requirements:
pip3 install coveralls
# For midi tests - https://github.com/x42/midifilter.lv2
#cd /tmp && git clone git://github.com/x42/midifilter.lv2.git && \
#cd midifilter.lv2 && \
#make && \
#sudo make install PREFIX=/usr

run:
@echo "Run option isn't created =)"

test: clean-test
coverage3 run --source=webservice wstest/config.py test

not-implemented-test-docs:
python -m doctest *.rst -v
python -m doctest docs/*/*.rst -v

test-details: test
coverage3 html
$(BROWSER) htmlcov/index.html

help: cabecalho
@echo ""
@echo "Commands"
@echo " $(BOLD)clean$(NORMAL)"
@echo " Clean files"
@echo " $(BOLD)docs$(NORMAL)"
@echo " Make the docs"
@echo " $(BOLD)docs-see$(NORMAL)"
@echo " Make the docs and open it in BROWSER"
@echo " $(BOLD)install-docs-requirements$(NORMAL)"
@echo " Install the docs requirements"
@echo " $(BOLD)install-tests-requirements$(NORMAL)"
@echo " Install the tests requirements"
@echo " $(BOLD)test$(NORMAL)"
@echo " Execute the tests"
@echo " $(BOLD)test-details$(NORMAL)"
@echo " Execute the tests and shows the result in BROWSER"
@echo " - BROWSER=firefox"
@echo " $(BOLD)help$(NORMAL)"
@echo " Show the valid commands"

cabecalho:
@echo "$(BOLD) _ _ ____ ____ ____ ____ ____ _ _ __ ___ ____"
@echo "/ )( ( __| _ \/ ___| __| _ \/ )( ( ) __| __)"
@echo "\ /\ /) _) ) _ (\___ \) _) ) /\ \/ /)( (__ ) _) "
@echo "(_/\_|____|____/(____(____|__\_) \__/(__)___|____)"
@echo "Link$(NORMAL): https://pypi.org/project/PedalPi-WebService/"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def readme():

install_requires=[
'PedalPi-Application>=0.3.0',
'tornado>=4.4.2',
'tornado>=4.5.3',
'tornado-cors==0.6.0',
'zeroconf'
],
Expand Down