intbitset: initialization from iterator

* Fixes initialization from an iterator, by peeking
  for the iterator protocol signature in the object
  used to initialize an intbitset data structure thus
  avoiding calling max() in case pre-allocation is
  needed, which would consume the whole iterator
  before allowing the data to be extracted (and
  that would crash when max() is called on an
  empty iterator).
  (closes #1698)

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
OAIHarvest: respect hidden fields

* No longer expose hidden fields via OAI-PMH MARCXML export
  format, following CFG_BIBFORMAT_HIDDEN_TAGS
  configuration.

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
WebSubmit: file stamper option to copy metadata

* Introduces the "--skip-metadata" option to the file stamper.
  If enabled, the file stamper will not copy the PDF metadata from the input
  file to the (stamped) output file. Otherwise, the file stamper will attempt
  to copy all PDF metadata.  (closes #1569)

Signed-off-by: Nikolaos Kasioumis <nikolaos.kasioumis@cern.ch>
Acked-by: Tibor Simko <tibor.simko@cern.ch>
WebSession: Python-2.4 combatibility issue fix

* In Python-2.4 tuples don't have the index attribute. Converting a tuple to a
  list will provide that attribute.

Signed-off-by: Nikolaos Kasioumis <nikolaos.kasioumis@cern.ch>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
WebSession: disable ORCID login

* Disables ORCID login by removing the string 'orcid' from variable
  CFG_OAUTH2_PROVIDERS in file invenio.conf. (closes #1667)

* Creates a regression test into file websession_regression_tests.py
  that checks if the login page has any kind of openid, oauth1 or
  oauth2 login and fails if so.

* Changes a typo in access_control_config.py and removes the
  consumer_key and consumer_secret value from orcid entry in the
  CFG_OAUTH2_CONFIGURATIONS dictionary.

Signed-off-by: Petros Ioannidis <petros.ioannidis@cern.ch>
Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>
I18N: updates to the Persian translation
WebSearch: fix detailed record page tab tracebacks

* Fixes tracebacks in certain detailed record page tabs
  (usage, files, etc).

* Fixes keywords tab that was not showing proper page body.

* Adds regression tests for each tab in order to prevent this error
  from happening again.

Reported-by: Fredrik Nygård Carlsen <me@frecar.no>
Reported-by: Ole Rønning <olerng@gmail.com>
Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
I18N: fix wrong msgids in Persian translation

* Fixes wrong msgid strings in Persian translation.
  Now "msgcmp --use-fuzzy --use-untranslated en.po fa.po"
  yields perfect match.

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
WebSearch: initial support for recjson output

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
errorlib:  support for Sentry logging

* Optionally captures exceptions and sends them to the Sentry logging
  platform, if directed by the new CFG_ERRORLIB_SENTRY_URI configuration
  variable. (closes #1726)

* Adds raven python package to requirements-extra

Signed-off-by: Fredrik Nygård Carlsen <me@frecar.no>
Reviewed-by: Tibor Simko <tibor.simko@cern.ch>
installation: README.rst with build status badges

* Adds new documentation file README.rst which is essentially
  identical to README, plus contains extra links to Travis build
  status badges, bringing them onto the GitHub home page.

  This is done because apparently GitHub only recognises file
  formats by extensions, so badges cannot be easily introduced
  into plain README files (that we still keep as per GNU autotools
  practices).

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
installation: GnuPG key server location update

* Updates location from where to get the GnuPG keys; the old
  location was not working anymore since quite a while.

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
Merge branch 'maint-1.0' into maint-1.1

* maint-1.0:
  installation: GnuPG key server location update
  installation: README.rst with build status badges

* Merge note: amended README.rst badge to use maint-1.1.

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
Merge branch 'maint-1.1'

* maint-1.1:
  installation: GnuPG key server location update
  installation: README.rst with build status badges
  WebSession: Python-2.4 combatibility issue fix
  WebSubmit: file stamper option to copy metadata

* Merge note: amended README.rst badge to use master,
  and removed Python-2.4 compatibiity fix that is not
  needed since master requires Python-2.6 at least.

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
global: file renaming

Signed-off-by: Tibor Simko <tibor.simko@cern.ch>
global: new code structure

* Adds Sphinx documentation.

* Moves Jinja2 templates to the new code structure
  `invenio/modules/<name>/templates/<name>/index.html`.

* Adds new tag module developed by Krzysztof Lis
  <krzysztof.lis@cern.ch>.

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Co-authored-by: Esteban J. G. Gabancho <esteban.gabancho@cern.ch>
Co-authored-by: Krzysztof Lis <krzysztof.lis@cern.ch>
Co-authored-by: Adrian-Tudor Panescu <adrian.tudor.panescu@cern.ch>

NOTE: beware, patch amended by Tibor to use new file names
documentation: initial release with manage command

NOTE: beware, patch amended by Tibor to use new file names
workflows: move to new structure and fixes

* Fixes handling BibWorkflowObject created by the user outside
  of the workflow. When BibWorkflowObject is created by user and
  its in RUNNING version and it doesnt have id_workflow it will
  be the object that worfklow is working on (data and state will
  be changed). There will be extra INITIAL object created to save
  state of the object at the begining. It allows the user to know
  object id befor processing it.

* Adds more things to redis sorting.

* Refactors the logging system in BibWorkflowObject and
  BibWorkflowEngine, adding new logging handlers to save
  logs to both database and stream output.

* Logs are now added using the API of the logging module,
  for example obj.log.info instead of obj.log_info as before.

  NOTE: There is however a known issue that log.debug is
        not functioning properly - possibly due to Celery
        resetting logging levels.

* Changes the BibWorkflowObject model to store extra_data
  in the same way as data. Meaning, using the "hack" made
  for storing data as LargeBinary. This means that outside
  the scope of workflow tasks, obj.get_extra_data() and
  obj.set_extra_data() must be used to access and update this
  field.

* Updated the new logging structure to work better
  overall and fit with the new code structure.

Co-authored-by: Wojciech Ziolek <wojciech.ziolek@cern.ch>
Co-authored-by: Jan Aage Lavik <jan.age.lavik@cern.ch>

NOTE: beware, patch amended by Tibor to use new file names
base: blueprint static folder check addition

Signed-off-by: Adrian-Tudor Panescu <adrian.tudor.panescu@cern.ch>

NOTE: beware, patch amended by Tibor to use new file names
cache: use CFG_DATABASE_NAME as CACHE_PREFIX if not specified

NOTE: beware, patch amended by Tibor to use new file names