session: docs, PEP8 and PEP257 improvements

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
base: fix database create error message

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
workflows: cleaning of engine calls

* Removes generation of another object snapshot when continuing a
  workflow causing many duplications in the database.

* Reuses the same workflow when continuing a workflow, as it was
  originally intended.

* Improves current workflow integration to be cleaner, using defined
  interfaces instead of updating closed variables.

* Adds new restart point, 'first', to re-start a workflow engine from
  first object and/or first task (callback).

* Removes resetting of engine `extra_data` when restarting workflow.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
BibClassify: case insensitive taxonomy

* Fixes a bug where the look-up of ontology names from the
  taxonomies were forced to lower case.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
BibClassify: PEP8 and PEP257 fix

* Improves PEP8 and PEP257 across ontology_reader.

* NOTE Removes any rdflib checks which are no longer needed as this
  library is (1) mandatory and (2) mandatory at a high version.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
BibClassify: error handling and PEP8

* Adds a new exception type TaxonomyError when there is a problem
  reading the ontology passed to legacy BibClassify.

* Performs some PEP8 fixes across ontology_reader.py and engine.py.

Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>
Reviewed-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
legacy: fix field xml output generation

* Addresses issue when unnecessary string conversion could cause
  problems with unicode data.  (closes #2233)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
base: fix for demosite populate extra info

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
formatter: fix mediaelement video view

* NOTE Detailed record page needs javascript in the <head> tag.
  (closes #1999)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
legacy: webhelp docs move

* Addresses issue with not discovered help pages.  (closes #2244)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
formatter: display records with no recid

* Fixes issue in 'Default_HTML_detailed' template when record does not
  have a 'recid'.  (PR #2272)

Reviewed-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>
search: loading of Bloodhound using requirejs

* Adds the missing export of twitter's typeahead.js and properly
  loads it with requirejs at search typeahead.

Signed-off-by: Kamil Neczaj <kamil.neczaj@cern.ch>
search: configuration of facets per collection

* Adds FacetCollection model with db upgrade.

Signed-off-by: Kamil Neczaj <kamil.neczaj@cern.ch>
Reviewed-by: Javier Martin Montull <javier.martin.montull@cern.ch>
search: flask-admin module to configure facets

* Adds Flask-Admin module available at /admin/facetcollection/.

Signed-off-by: Kamil Neczaj <kamil.neczaj@cern.ch>
Reviewed-by: Javier Martin Montull <javier.martin.montull@cern.ch>
search: facets relation definition move

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
global: Invenio 1.9999.4.dev

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
tests: registry addition for testsuites

* Adds registry style loading of testsuites.  (closes #2211)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
formatter: display record with no record id

* Fixes an issue 'Default_HTML_detailed' template when record does not
  have a 'recid'.

* Handling this issue in the template has a unexpected side-effect
  this commit handles the issue in the back-end.  (PR #2278)

Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>
search: fix for return key handling in search form

* Fixes an issue where pressing the return key in the simple search
  dropdown caused the form to be submitted with no data. (closes #2253)
  (PR #2282)

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Joe MacMahon <joe.macmahon@cern.ch>
legacy: indexer recjson value fix

* Prevents BibIndex to crash when indexing `recjson` values.
  (closes #2285)

* Fixes problem with unicode strings.

Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>