Compare commits

...

4 Commits

Author SHA1 Message Date
J. Fernando Sánchez c5a2cf23cb typo docs/readme 5 years ago
J. Fernando Sánchez 49a183aeb6 typo readme 5 years ago
J. Fernando Sánchez 3088d9474a compatibility notice 5 years ago
J. Fernando Sánchez 0f5bc514b7 add windows+mac tests in travis 5 years ago

@ -1,15 +1,43 @@
sudo: required
services:
- docker
language: python
env:
- PYV=3.4
- PYV=3.5
- PYV=3.6
- PYV=3.7
# - PYV=3.3 # Apt fails in this docker image
# run nosetests - Tests
script: make test-$PYV
matrix:
allow_failures:
# Windows is experimental in Travis.
# As of this writing, senpy installs but hangs on tests that use the flask test client (e.g. blueprints)
- os: windows
include:
- os: linux
language: python
python: 3.4
before_install:
- pip install --upgrade --force-reinstall pandas
- os: linux
language: python
python: 3.5
- os: linux
language: python
python: 3.6
- os: linux
language: python
python: 3.7
- os: osx
language: generic
addons:
homebrew:
# update: true
packages: python3
before_install:
- python3 -m pip install --upgrade virtualenv
- virtualenv -p python3 --system-site-packages "$HOME/venv"
- source "$HOME/venv/bin/activate"
- os: windows
language: bash
before_install:
- choco install -y python3
- python -m pip install --upgrade pip
env: PATH=/c/Python37:/c/Python37/Scripts:$PATH
# command to run tests
# 'python' points to Python 2.7 on macOS but points to Python 3.7 on Linux and Windows
# 'python3' is a 'command not found' error on Windows but 'py' works on Windows only
script:
- python3 setup.py test || python setup.py test

@ -2,23 +2,21 @@
:width: 100%
:target: http://senpy.gsi.upm.es
.. image:: https://travis-ci.org/gsi-upm/senpy.svg?branch=master
:target: https://travis-ci.org/gsi-upm/senpy
.. image:: https://lab.gsi.upm.es/senpy/senpy/badges/master/pipeline.svg
:target: https://lab.gsi.upm.es/senpy/senpy/commits/master
.. image:: https://lab.gsi.upm.es/senpy/senpy/badges/master/coverage.svg
:target: https://lab.gsi.upm.es/senpy/senpy/commits/master
.. image:: https://readthedocs.org/projects/senpy/badge/?version=latest
:target: http://senpy.readthedocs.io/en/latest/
.. image:: https://badge.fury.io/py/senpy.svg
:target: https://badge.fury.io/py/senpy
.. image:: https://travis-ci.org/gsi-upm/senpy.svg
:target: https://github.com/gsi-upm/senpy/senpy/tree/master
.. image:: https://img.shields.io/pypi/l/requests.svg
:target: https://lab.gsi.upm.es/senpy/senpy/
:target: https://lab.gsi.upm.es/senpy/senpy/
Senpy lets you create sentiment analysis web services easily, fast and using a well known API.
As a bonus, senpy services use semantic vocabularies (e.g. `NIF <http://persistence.uni-leipzig.org/nlp2rdf/>`_, `Marl <http://www.gsi.dit.upm.es/ontologies/marl>`_, `Onyx <http://www.gsi.dit.upm.es/ontologies/onyx>`_) and formats (turtle, JSON-LD, xml-rdf).
As a bonus, Senpy services use semantic vocabularies (e.g. `NIF <http://persistence.uni-leipzig.org/nlp2rdf/>`_, `Marl <http://www.gsi.dit.upm.es/ontologies/marl>`_, `Onyx <http://www.gsi.dit.upm.es/ontologies/onyx>`_) and formats (turtle, JSON-LD, xml-rdf).
Have you ever wanted to turn your sentiment analysis algorithms into a service?
With senpy, now you can.
With Senpy, now you can.
It provides all the tools so you just have to worry about improving your algorithms:
`See it in action. <http://senpy.gsi.upm.es/>`_
@ -43,20 +41,36 @@ Alternatively, you can use the development version:
cd senpy
pip install --user .
If you want to install senpy globally, use sudo instead of the ``--user`` flag.
If you want to install Senpy globally, use sudo instead of the ``--user`` flag.
Docker Image
************
Build the image or use the pre-built one: ``docker run -ti -p 5000:5000 gsiupm/senpy``.
To add custom plugins, add a volume and tell senpy where to find the plugins: ``docker run -ti -p 5000:5000 -v <PATH OF PLUGINS>:/plugins gsiupm/senpy -f /plugins``
To add custom plugins, add a volume and tell Senpy where to find the plugins: ``docker run -ti -p 5000:5000 -v <PATH OF PLUGINS>:/plugins gsiupm/senpy -f /plugins``
Compatibility
-------------
Senpy should run on any major operating system.
Its code is pure Python, and the only limitations are imposed by its dependencies (e.g., nltk, pandas).
Currently, the CI/CD pipeline tests the code on:
* GNU/Linux with Python versions 3.4, 3.5, 3.6 and 3.7
* MacOS and homebrew's python3
* Windows 10 and chocolatey's python3
The latest PyPI package is verified to install on Ubuntu, Debian and Arch Linux.
If you have trouble installing Senpy on your platform, see `Having problems?`_.
Developing
----------
Developing/debugging
********************
Running/debugging
*****************
This command will run the senpy container using the latest image available, mounting your current folder so you get your latest code:
.. code:: bash
@ -119,7 +133,7 @@ or, alternatively:
This will create a server with any modules found in the current path.
For more options, see the `--help` page.
Alternatively, you can use the modules included in senpy to build your own application.
Alternatively, you can use the modules included in Senpy to build your own application.
Deploying on Heroku
-------------------
@ -127,9 +141,6 @@ Use a free heroku instance to share your service with the world.
Just use the example Procfile in this repository, or build your own.
`DEMO on heroku <http://senpy.herokuapp.com>`_
For more information, check out the `documentation <http://senpy.readthedocs.org>`_.
------------------------------------------------------------------------------------
@ -144,6 +155,17 @@ Instead, the maintainers will focus their efforts on keeping the codebase compat
We apologize for the inconvenience.
Having problems?
----------------
Please, file a new issue `on GitHub <https://github.com/gsi-upm/senpy/issues>`_ including enough details to reproduce the bug, including:
* Operating system
* Version of Senpy (or docker tag)
* Installed libraries
* Relevant logs
* A simple code example
Acknowledgement
---------------
This development has been partially funded by the European Union through the MixedEmotions Project (project number H2020 655632), as part of the `RIA ICT 15 Big data and Open Data Innovation and take-up` programme.

@ -5,10 +5,8 @@ Welcome to Senpy's documentation!
:target: http://senpy.readthedocs.io/en/latest/
.. image:: https://badge.fury.io/py/senpy.svg
:target: https://badge.fury.io/py/senpy
.. image:: https://lab.gsi.upm.es/senpy/senpy/badges/master/build.svg
:target: https://lab.gsi.upm.es/senpy/senpy/commits/master
.. image:: https://lab.gsi.upm.es/senpy/senpy/badges/master/coverage.svg
:target: https://lab.gsi.upm.es/senpy/senpy/commits/master
.. image:: https://travis-ci.org/gsi-upm/senpy.svg
:target: https://github.com/gsi-upm/senpy/senpy/tree/master
.. image:: https://img.shields.io/pypi/l/requests.svg
:target: https://lab.gsi.upm.es/senpy/senpy/

@ -1,10 +1,10 @@
Installation
------------
The stable version can be used in two ways: as a system/user library through pip, or as a docker image.
The stable version can be used in two ways: as a system/user library through pip, or from a docker image.
The docker image is the recommended way because it is self-contained and isolated from the system, which means:
Using docker is recommended because the image is self-contained, reproducible and isolated from the system, which means:
* Downloading and using it is just one command
* It can be downloaded and run with just one simple command
* All dependencies are included
* It is OS-independent (MacOS, Windows, GNU/Linux)
* Several versions may coexist in the same machine without additional virtual environments
@ -32,27 +32,24 @@ Through PIP
cd senpy
pip install --user .
Each version is automatically tested on GNU/Linux, macOS and Windows 10.
If you have trouble with the installation, please file an `issue on GitHub <https://github.com/gsi-upm/senpy/issues>`_.
Docker Image
************
The base image of senpy comes with some builtin plugins that you can use:
The base image of senpy comes with some built-in plugins that you can use:
.. code:: bash
docker run -ti -p 5000:5000 gsiupm/senpy --host 0.0.0.0
To add your custom plugins, you can use a docker volume:
To use your custom plugins, you can add volume to the container:
.. code:: bash
docker run -ti -p 5000:5000 -v <PATH OF PLUGINS>:/plugins gsiupm/senpy --host 0.0.0.0 --plugins -f /plugins
There is a Senpy image for **python 2**, too:
.. code:: bash
docker run -ti -p 5000:5000 gsiupm/senpy:python2.7 --host 0.0.0.0
Alias

@ -13,7 +13,7 @@ max-line-length = 100
[bdist_wheel]
universal=1
[tool:pytest]
addopts = --cov=senpy --cov-report term-missing
addopts = -v --cov=senpy --cov-report term-missing
filterwarnings =
ignore:the matrix subclass:PendingDeprecationWarning
[coverage:report]

@ -1,3 +1,4 @@
mock
pytest-cov
pytest
pandas

Loading…
Cancel
Save