errorlib: context support in sentry

* Introduces support for HTTP, and user context in sentry, by
  exploiting information provided in req object when available.
  (closes #1960) (PR #2147)

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
WebSearch: kwalitee fix

* Runs `autopep8` on `websearch_services_regression_tests.py`.
  (PR #2352)

Signed-off-by: Federico Poli <federico.poli@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
WebSearch: new Journal Hint Service

* Adds the Journal Hint Service, that displays
  'Were you looking for a journal reference? Try: <link>'
  when the user search for a raw journal reference.
  (PR #2352)

* Adds unit and regression tests for the new search service.

* Adds two unit tests to `search_from_reference`, just to be sure that
  it accepts unicode.

Signed-off-by: Federico Poli <federico.poli@cern.ch>
Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
WebSearch: smarter journal hint

* Improves the JournalHintService implementation by directly
  a brief representation of a record when one is found.
  (PR #2352)

* Additionally, suggests to use find rawref "foo" when "foo"
  is searched for, rather than journal:"bar".

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
BibSort: improved washers

* Improves speed and realiability of BibSort washers by properly
  exploiting textutils.decode_to_unicode() and
  textutils.translate_to_ascii() functions.
  (PR #2283)

* Improves speed of textutils.translate_to_ascii().
  (addresses #1754)

* Introduces new washer
  _sort_nosymbols_case_insensitive_strip_accents().

* Makes unidecode dependency mandatory.

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
BibDocFile: bibdocfile.BibDoc memory fix

* Fixes a memory leak in BibDocFile module where BibDoc instances were
  referring to BibDocFiles and viceversa, by using weakref.ref().
  (closes #2082) (PR #2136)

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Reported-by: Thorsten Schwander <thorsten.schwander@gmail.com>
Tested-by: Tibor Simko <tibor.simko@cern.ch>
errorlib: fix Sentry context syntax issue

* Fixes Python syntax issue that slipped in the Sentry context support
  commit d73bd94b2fbe8666af31dfec25c334c466e6f6df.
  (addresses #1960) (PR #2147)

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
BibCirculation: fix for CERN returnees

Acked-by: Tibor Simko <tibor.simko@cern.ch>
jsonalchemy: validation fixes

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
uploader: typos fixes

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
records: better PID list

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
uploader: files to link addition

* Adds new option for linking files with record via custom FFL MARC
  field.

* Adds `legacy` step to uploader insert worflow for filling-up "bibxxx"
  tables.  (addresses #1772)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
previewer: addition of support for Documents

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
uploader: support for relative document paths

* Allows specifying relative paths in FFT tags.  (closes #1191)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
workflows: snapshot generation fix

* Fixes the generation of snapshots to take into consideration
  the new ObjectVersion's ERROR and WAITING.

* Adds a new test to cover this issue.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
oaiharvester: record splitting improvement

* Improves the splitting of records from OAI-PMH requests to also
  handle the case of MARCXML from other Invenio instances.

* Defers the splitting logic to a XML parser and moves some utility
  functions to a new utils file in the new module structure.

* Adds tests for these utility functions.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
workflows: Holding Pen file serving fix

* Fixes the file serving used in Holding Pen details pages
  to also serve files that were automatically prefixed with
  uuid's.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
legacy: get_most_popular_field_values fix

* Properly checks if tags parameter is of string type.

Signed-off-by: Javier Martin Montull <javier.martin.montull@cern.ch>
collect: addition of sorting filter

Signed-off-by: Javier Martin Montull <javier.martin.montull@cern.ch>
uploader: initial manage command implementation

* Adds basic `inveniomanage uplaoder insert -f FILE` command.
  (addresses #1772)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>