Commit Graph

199 Commits (1.0.0)

Author SHA1 Message Date
J. Fernando Sánchez e8413fb645 Accept string inputs if no options are available
The javascript code should be cleaned up at some point!
7 years ago
J. Fernando Sánchez 3e3f5555ff Fixed py2 problems and other improvements
We've changed the way plugins are activated, and removed the notion of
deactivated plugins.
Now plugins activate asynchronously.
When calling a plugin, it will be activated if it wasn't, and the call will wait
for the plugin to be fully activated.
7 years ago
J. Fernando Sánchez 7aa91d1d60 Fixed FSRE dimension names to match ontology
http://www.gsi.dit.upm.es/ontologies/onyx/vocabularies/emotionml/ns
7 years ago
drevicko 2480ec310e bump version number in ekman2vad.senpy 7 years ago
drevicko 9b956b2358 uses emotionML vocab names for VAD dimensions 7 years ago
drevicko 83ddd5e990 add neutralValue to fsre conversion senpy file 7 years ago
drevicko d77d01c3e1 Adds neutral value to conversion senpy files 7 years ago
drevicko f6271495c1 use emoionml names for fsre and pad dimensions
This lines up the names in the conversion plugins with the [emotionML suggested vocab](https://www.w3.org/TR/emotion-voc/#dimensions).

emoml has different names for the 4-dimensional fsre scheme and the 3-dimensional vad scheme, which this pull request has added.

I've added the "unpredictability" dimension and mapped big6:surprise to it's maximum value. The assumption is that surprise varies between 5 and 10 to be in line with the other dimensions (no such thing as negative surprise, so no values less than 5). I see that arousal also has all values >5 (so no negative arousal). Ideally, surprise mappings for V, A and D should be calculated empirically - I think there'll be some arousal and possibly slightly lowered dominance.

I wonder if we should use another colon in the emoml names, eg: "emoml:fsredim:valence" or "emoml:big6:happiness", since the [emoml suggested vocab](https://www.w3.org/TR/emotion-voc/xml) only specifies names like "happiness" in a category "big6" (ie: it's hard to know which is the category in "big6happiness").
We'd have to go through the example plugins and make sure they also conform...

open to discussion on this btw...

ps: apologies for multiple changes in this one pr..
7 years ago
drevicko 1cccd9d5cb Minor change in description text 7 years ago
J. Fernando Sánchez a243f68bfc WIP simpler pipeline 7 years ago
J. Fernando Sánchez fca0ac00c4 Merge branch '38-json-serialization-problem-with-sets' 7 years ago
J. Fernando Sánchez 9a2932b569 Merge branch '39-plugin-tests-missing' 7 years ago
J. Fernando Sánchez 9acee50837 Merge branch 'failed-examples' 7 years ago
J. Fernando Sánchez 85aef3d15f Improved shelf tests
Refactored template tests
7 years ago
J. Fernando Sánchez b6f00385ab Fixed test for failed validation
Note that the schema currently supports both string and object analysis in the
"analysis" field of a result.
7 years ago
J. Fernando Sánchez 8c5f894843 Fixed turtle outformat in playground 7 years ago
J. Fernando Sánchez 9870391088 Run tests from gsiupm/senpy 7 years ago
militarpancho ad2051307a Grouped plugins by plugin Type with and optgroup. This ought to close #42 7 years ago
militarpancho 7fd16a17fb Use the exported values to generate the form in the playground Issue #42 7 years ago
militarpancho 7547fc49af Change params dict structure. #42 7 years ago
militarpancho 7f44f9e85d Fix changes in blueprints api for showing help 7 years ago
militarpancho aaad5e8f2b Add 'help' as a parameter to the API, with two options: "true" and "false". It is false by default.
Modify all the /api blueprint to export the list of available params
7 years ago
J. Fernando Sánchez 4d7e8e7589 Added tests for all "discoverable" plugins
Closes #39
7 years ago
J. Fernando Sánchez 8e4578dc25 Closes #40 7 years ago
J. Fernando Sánchez 24c97256e8 Added serialization of sets 7 years ago
J. Fernando Sánchez c9bc485535 Merge branch '36-estimate-vad' 7 years ago
J. Fernando Sánchez 6d7575bbcd Merge branch '35-timeout-and-blocking-requests' 7 years ago
J. Fernando Sánchez 852bcc72ba Better centroid conversion
Also added **simple** tests for backward and forward conversion.
In future versions we should add thorough tests.

Should close gsi-upm/senpy#31
7 years ago
J. Fernando Sánchez bf5ed1bd7d Merge remote-tracking branch 'drevicko/patch-6' 7 years ago
J. Fernando Sánchez 00da75153a Change conversion to Euclidean distance
* Added neutral point (if present)

Closes !gsi-upm/senpy#37 (Ian's)
7 years ago
J. Fernando Sánchez fa082e11e7 Use flask's server by default
Using this server in production is discouraged, but to implement a
proper asynchronous server with tornado/gevent every blocking call would
have to be converted to a non-blocking call.

Failing to do so causes deadlocks like senpy/senpy#35

For now, it is easier to just use the default server.
7 years ago
militarpancho 3e0f55dcff Improve docs. (Badges missing) 7 years ago
drevicko 6b843a4384 fixes typo in code 7 years ago
drevicko 65d6e47513 Implements Fernando's suggestion in #31
I've added a neutral point definition (in the converters senpy file) as used in pull request #29
7 years ago
drevicko 8d56a0b630 fixes #31
I've used euclidean metric instead of taxicab as I feel it makes more sense (taxicab has bizzare unintuitive effects for points far from the centroids).
7 years ago
drevicko e7ac6e66b0 update _forward_conversion docstring + minor edits 7 years ago
J. Fernando Sánchez 28f29d159a Merge branch 'gh-34-broken-shelf' into 0.8.x 7 years ago
J. Fernando Sánchez c803f60fd4 Merge branch 'drevicko/provide-analyse-traceback-in-log' into 0.8.x 7 years ago
J. Fernando Sánchez 12eae16e37 Merge branch 'drevicko-patch-5' into 0.8.x 7 years ago
Ian Wood b6de72a143 chaged exception logging to 'exception()' in analysie() 7 years ago
J. Fernando Sánchez 0f89b92457 Fixed pickling error in py2.7 7 years ago
J. Fernando Sánchez ea91e3e4a4 Add an option to force the load of shelf plugins
Closes gsi-upm/senpy#34
7 years ago
Ian Wood f76b777b9f don't fail if shelf pickle file broken 7 years ago
drevicko dcc965ea63 removed superfluous 'neutral' centroid
Neutral is included as an 'origin' field. This is partly because emoml has no vocab for "Neutral" in dimensional models.
7 years ago
drevicko 400f647b7b removed unneccessary defaultdict import 7 years ago
Ian Wood ec1a2ff5f9 added 'origin' to VAD representation, incorporated into weighed sum for Cat->VAD conversion 7 years ago
J. Fernando Sánchez 60ef304108 Analysis set as a python list
Closes senpy/senpy#31
7 years ago
Ian Wood 1a9dd07f7e Merge branch 'master' 0.8.7 into patch-6 7 years ago
Ian Wood b80b0c7947 used more specific exception specifier (KeyError) 7 years ago
Ian Wood 1ca6ec52fd fixed weighted average, no explicit treatment of 'neutral' 7 years ago
J. Fernando Sánchez 7927cf1587 add option to show senpy version number
Merge branch 'patch-5' of https://github.com/drevicko/senpy into drevicko-patch-5
7 years ago
J. Fernando Sánchez 4ba9535d56 Merge branches into 0.8.x
'25-validation-errors'
'27-add-method-to-get-list-of-plugins'
'28-fix-multiprocessing-issues'
7 years ago
J. Fernando Sánchez ef40bdb545 Replace gevent with tornado
Closes #28

Added:

* Async test (still missing one that includes the IOLoop)
* Async plugin under tests. To manually try async functionalities:
```
senpy -f tests/
```
7 years ago
J. Fernando Sánchez e0b4c76238 Add plugin method to client
Closes #28
7 years ago
J. Fernando Sánchez 14c86ec38c Set plugin list as a @set and fixed test case
It turns out setting "plugins" as a @list in the context causes the
"plugins" property to expand to its full name.
Removing the type causes a regression of #17, which I initially missed
because the test in #17 was wrong.

Closes #26
7 years ago
J. Fernando Sánchez d3d05b3218 Fixed expansion of "plugins"
Closes #26

There was no need to add @list, and it was causing JSON-LD to expand the
URI of 'plugins'
7 years ago
J. Fernando Sánchez eababcadb0 Analysis as strings or objects in results
Closes #25
7 years ago
drevicko 7efece0224 add option to show senpy version number 7 years ago
drevicko 53138e6942 Estimate VAD by weighted average
Does a weighted average of centroids.

If intensity sums to zero for a category, a 'neutral' category is used or 0 if it's not present. I'm not 100% sure this is the best approach, and the name of the "neutral" category perhaps should use some convention?

Note that if there are no categories present, then no VAD (or other dimensional) estimate is returned. It may be better to use the neutral centroid if it's present in this case also.
7 years ago
J. Fernando Sánchez 6e970d01f2 Merge branch '21-ascii-cant-encode' into 0.8.x 7 years ago
J. Fernando Sánchez 1d0a54ecd2 Merge branch '22-pip-screws-with-logging-config' into 0.8.x 7 years ago
J. Fernando Sánchez 800d4a9c2c Fixed typos in Ian's patch 7 years ago
drevicko 035ef98b7e removed broken "/api" link
In index.html, there is a suggestion to try out the api with a link to "/api". Clicking that link results in a json error report - not ideal. 
Instead, I added text suggesting that a use can find example api url's after clickgin "Analyse!".
7 years ago
J. Fernando Sánchez d7e115d7c2 Encode HEADERS
Closes #21
7 years ago
J. Fernando Sánchez 7e5b55ff9c Run pip with Popen
Closes #22
7 years ago
J. Fernando Sánchez 0c8f98d466 Pre-0.8.6
* Improved debugging (back to using Flask's built-in mechanisms)
* Recursive model loading from json
* Added DEVPORT to Makefile
* Accept json-ld input. Closes #16
* Improved Exception handling in client
* Modified default plugin selection to only include analysis plugins
* More tests
7 years ago
J. Fernando Sánchez cc298742ec Merge branch '17-...' into 0.8.x 7 years ago
J. Fernando Sánchez 250052fb99 Options as a set in the JSON-LD context
Closes #18
7 years ago
J. Fernando Sánchez 603e086606 Fix list of plugins
Closes #17
7 years ago
J. Fernando Sánchez a8614bab0c Accept plugin pipelines
Closes #15
7 years ago
J. Fernando Sánchez c9e6d78183 Fixed alises, added PAD and FSRE
Closes #13
7 years ago
J. Fernando Sánchez 1a582c0843 Filter conversion plugins
Closes #12

* Shows only analysis plugins by default on /api/plugins
* Adds a plugin_type parameter to get other types of plugins
* default_plugin chosen from analysis plugins
7 years ago
J. Fernando Sánchez cbeb3adbdb Added fallback version '0.0'
Installing depends on the VERSION file, so it raies an error if it is
installed in some other way.

ReadTheDocs installs the package so it can generate code docs.
This commit adds a default version 0.0
7 years ago
J. Fernando Sánchez efb305173e Removed future from __init__
Since __init__ is imported by setup.py, future may not be installed yet.

Other options would be:

* Read VERSION -> and that code has to be duplicated in setup.py and
  senpy (to avoid the import, once again)
* Eval version.py
* Do without versioning :)
7 years ago
J. Fernando Sánchez 2288b04c92 Remove iteritems for py2/3 compatibility 7 years ago
J. Fernando Sánchez 99403b3443 Fix for async
Should fix #11
7 years ago
J. Fernando Sánchez a0ff528a4b Improved docs and client
* Client now raises an exception on error
* Added conversion to the documentation
7 years ago
J. Fernando Sánchez 97bd245dfc Changed data directory 7 years ago
J. Fernando Sánchez d8b59d06a4 Converted Ekman2VAD to centroids
* Changed the way modules are imported -> we can now use dotted
  notation (e.g. senpy.plugins.conversion.centroids)
* Refactored ekman2vad's plugin -> generic centroids
* Added some basic tests
7 years ago
J. Fernando Sánchez 453b9f3257 Fixed bugs in Ekman2VAD 7 years ago
J. Fernando Sánchez 5fb858f5fc Fixed error when installing dependencies 7 years ago
J. Fernando Sánchez ba2e18125c Deployment changes
* Docker all the things!
* Make all the things!
* Fixed version.sh
7 years ago
J. Fernando Sánchez 9f6a6f5ecd Loads of changes!
* Added conversion plugins (API might change!)
* Added conversion to the analysis pipeline
* Changed behaviour of --default-plugins (it adds conversion plugins regardless)
* Added emotionModel [sic] and emotionConversion models

//TODO add conversion tests
//TODO add conversion to docs
7 years ago
J. Fernando Sánchez 3cea7534ef New versioning
Use git to automatically fetch the version
7 years ago
J. Fernando Sánchez b4ca5f4a7c Several fixes and changes
* Added interactive debugging
* Better exception logging
* More tests for errors
* Added ONBUILD to dockerfile
  Now creating new images based on senpy's is as easy as:
  ```from senpy:<version>```. This will automatically mount the code to
  /senpy-plugins and install all dependencies
* Added /data as a VOLUME
* Added `--use-wheel` to pip install both on the image and in the
  auto-install function.
* Closes #9

Break compatibilitity:

* Removed ability to (de)activate plugins through the web
7 years ago
J. Fernando Sánchez 3311af2167 Bumped to v0.7.1 7 years ago
J. Fernando Sánchez 20357d2a0d Added gitlab CI 7 years ago
J. Fernando Sánchez e9d7980e42 Merge branch 'jsonplay' into 'master'
Jsonplay

Closes #8

See merge request !9
7 years ago
J. Fernando Sánchez 908090f634 Released v0.7
Bug-fixes and improvements:
* Closes #5
* Closes #1
* Adds Client (beta)
* Added several schemas
* Lighter string representation -> should avoid delays in the analysis
  with plugins that have 'heavy' attributes

Backwards-incompatible changes:
* Context in headers by default
* All schemas include a "@type" argument that is used for autodetection
  in the client

... And possibly many more, this is still <1.0
7 years ago
militarpancho cb963dc438 Playground improved. This closes #8 7 years ago
militarpancho 477cb18db1 Added tabs to choose view for the response. #8 7 years ago
J. Fernando Sánchez fbf0384985 Replaced gevent with threading
* Replaced gevent (testing)
* Trying the slim python image (1/3 of previous size)
7 years ago
militarpancho 7a2c016cc6 added jsoneditor javascript plugin in relation with issue #8 7 years ago
J. Fernando Sánchez b072121e20 Added Model string representation
This should help with performance issues with models that have large
private variables.
7 years ago
J. Fernando Sánchez ceed9b97d0 Entries should be a set instead of lists
This allows for better framing when two entries have the same @id
7 years ago
J. Fernando Sánchez db30257373 Flake8, Semver, Pre-commit
* Added pre-commit: http://pre-commit.com
* Fixed flake8 errors
* Added flake8 pre-commit hooks
* Added pre-commit to Makefile
* Changed VERSION numbering
* Changed versioning to match PEP-0440
7 years ago
J. Fernando Sánchez 7fd69cc690 YAPFed 7 years ago
J. Fernando Sánchez b543a4614e Improved schema validation
* Added debug Dockerfile/Makefile
* Validation of examples in docs
7 years ago
J. Fernando Sánchez bc1f9e4cf5 Split definitions into individual files 7 years ago
J. Fernando Sánchez d72a995fa9 New shelf location and better shelf tests 7 years ago