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>
previewer: d3js csv previewer

* Adds d3js csv previewer.

Signed-off-by: Adrian Pawel Baran <adrian.pawel.baran@cern.ch>
Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
oauthclient: save orcid in extra data

* Saves the orcid of the user in the extra data column of
  remoteACCOUNT.

Signed-off-by: Javier Martin Montull <javier.martin.montull@cern.ch>
oauthclient: missing attribute addition

* Adds missing attribute to `OAuthRejectedRequestError` constructor.
  (closes #2483)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
sqlalchemy: fix mysql primary key creation

* Fixes checking of Text type supporting the case of NullType
  column type.

Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>
workflows: template renaming

* Renames the template hp_details to hp_details_base in preparation
  of better template structure.

Reviewed-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>
workflows: template fixes

* Adds new block workflow_completed to hp_details_base template.

* Adds template hp_details to extend from hp_details_base.

Reviewed-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>
oauthclient: authorize url fix

* Changes authorize url to redirect to login form instead of register.
  (closes #2487)

* Moves imports inside functions.

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>
workflows: template naming fix

* Removes the hp prefix from holdingpen templates.

Reviewed-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@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>