Skip to content

Commit

Permalink
dependencies: invenio 3.4
Browse files Browse the repository at this point in the history
* Upgrades to invenio 3.4.

Co-Authored-by: Peter Weber <[email protected]>
  • Loading branch information
rerowep committed Dec 23, 2020
1 parent f565f54 commit c1d9253
Show file tree
Hide file tree
Showing 9 changed files with 548 additions and 878 deletions.
1,318 changes: 506 additions & 812 deletions poetry.lock

Large diffs are not rendered by default.

56 changes: 17 additions & 39 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,24 @@ python = ">= 3.6, < 3.8"
## when the python code will be executed a conflict exception will be raised.
#------------------------------------------------------------------------------
# Default from Invenio
Babel = ">=2.4.0"
Flask-BabelEx = ">=0.9.3"
lxml = ">=4.3.0,<5.0.0"

## Third party invenio modules used by RERO ILS
invenio-oaiharvester = {tag = "v1.0.0a4", git = "https://github.com/inveniosoftware/invenio-oaiharvester.git"}
invenio-circulation = {tag = "v1.0.0a29", git = "https://github.com/inveniosoftware/invenio-circulation.git"}

## Invenio 3.2.1 base modules used by RERO ILS
## Invenio 3.4 base modules used by RERO ILS
# same as invenio metadata extras without invenio-search-ui
invenio-indexer = ">=1.1.1,<1.2.0"
invenio-jsonschemas = ">=1.1.0,<1.2.0"
invenio-indexer = ">=1.2.0,<1.3.0"
invenio-jsonschemas = ">=1.1.1,<1.2.0"
invenio-oaiserver = ">=1.2.0,<1.3.0"
invenio-pidstore = ">=1.2.0,<1.3.0"
invenio-records-rest = ">=1.7.1,<1.8.0"
invenio-records-ui= ">=1.2.0a1,<1.3.0"
invenio-records = ">=1.3.1,<1.4.0"

# TODO: to be removed if we know how to configure pytest-celery comming with version 1.2.2
invenio-celery = "<1.2.2"
invenio-pidstore = ">=1.2.1,<1.3.0"
invenio-records-rest = ">=1.8.0,<1.9.0"
invenio-records-ui= ">=1.2.0,<1.3.0"
invenio-records = ">=1.4.0,<1.6.0"

## Default from Invenio
invenio = {version = ">=3.3.0,<3.4.0", extras = ["base", "postgresql", "auth", "elasticsearch7" ]}
uwsgi = ">=2.0"
uwsgitop = ">=0.11"
uwsgi-tools = ">=1.1.1"
invenio = {version = ">=3.4.0,<5.4.0", extras = ["base", "postgresql", "auth", "elasticsearch7", "docs", "tests" ]}

## RERO ILS specific python modules
PyYAML = ">=5.3.1"
Expand All @@ -60,7 +53,7 @@ redisbeat = "*"
jsonpickle = "*"
ciso8601 = "*"
# TODO: to be removed when the thumbnail will be refactored
invenio-userprofiles = {git = "https://github.com/rero/invenio-userprofiles.git", tag = "reroprofile"}
invenio-userprofiles = {git = "https://github.com/rero/invenio-userprofiles.git", tag = "invenio-3.4"}

## Additionnal constraints on python modules
# solves fixture 'celery_config' not found
Expand All @@ -69,43 +62,28 @@ markdown-captions = "*"

## Deployment
# sentry
invenio-logging = { version = ">=1.3.0,<1.4.0", extras = ["sentry-sdk", "sentry"] }
# invenio-logging = { version = ">=1.3.0,<1.4.0", extras = ["sentry-sdk", "sentry"] }
python-dotenv = "^0.13.0"

## Third party optional modules used by RERO ILS
invenio-sip2 = {git = "https://github.com/inveniosoftware-contrib/invenio-sip2.git", optional = true}
flask-cors = ">3.0.8"
celery = "^5.0.0"
lxml = ">=4.6.2"
celery = ">=5.0.0"
cryptography = ">3.2"

[tool.poetry.dev-dependencies]
## Python packages development dependencies (order matters)
#----------------------------------------------------------
## Default from Invenio
## Default from Invenio
pytest-invenio = ">=1.4.0,<1.5.0"
Sphinx = ">=3,<4"
Flask-Debugtoolbar = ">=0.10.1"
Sphinx = ">=3.0.4"
check-manifest = ">=0.35"
coverage = ">=4.5.3"
isort = ">=4.3"
mock = ">=2.0.0"
marshmallow = ">=3.0.0,<4.0.0"
pydocstyle = ">=3.0.0"
# TODO: Delete 6.0.0 limitation when pytest_pep8 will use Pep8Item.from_parent
# Cf. https://bitbucket.org/pytest-dev/pytest-pep8/issues/25/pep8item-should-use-from_parent-method
pytest = ">=4.6.4,<5.4"
pytest-cov = ">=2.7.1"
pytest-invenio = ">=1.2.1,<1.3.0"
pytest-mock = ">=1.6.0"
pytest-pep8 = ">=1.0.6"
pytest-random-order = ">=0.5.4"
pytest-runner = ">=3.0.0,<5"
safety = ">=1.8"
docutils = "*"
## RERO ILS specific python packages
safety = ">=1.8"
mock = ">=2.0.0"
autoflake = ">=1.3.1"
appnope = { version = "*", optional = true }
pylint = "^2.6.0"

[tool.poetry.extras]
## Python extra packages dependencies
Expand Down
4 changes: 2 additions & 2 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

[pytest]
live_server_scope = module
pep8ignore =
ignore =
docs/conf.py ALL
config.py E501
addopts = --pep8 --doctest-glob="*.rst" --doctest-modules --cov=rero_ils --cov-report=term-missing --ignore=setup.py -m "not external"
addopts = --pydocstyle --doctest-glob="*.rst" --doctest-modules --cov=rero_ils --cov-report=term-missing --ignore=setup.py -m "not external"
testpaths = docs tests rero_ils

# not displaying all the PendingDeprecationWarnings from invenio
Expand Down
3 changes: 3 additions & 0 deletions rero_ils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ def _(x):
# this parameter using the 'default_currency' field
RERO_ILS_DEFAULT_CURRENCY = 'CHF'


# Base templates
# ==============
#: Global base template.
Expand All @@ -160,6 +161,8 @@ def _(x):

# Theme configuration
# ===================
#: The Invenio theme.
APP_THEME = ['bootstrap3']
#: Brand logo.
THEME_LOGO = 'images/logo_rero_ils.png'
#: Site name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,3 @@ <h5 class="d-inline-block">{{ _('Export Formats') }}:</h5>
{%- endblock record_body %}

{%- endblock body %}

{%- block javascript %}
{{ super() }}
{% assets "rero_ils_documents_detailed_js" %}
<script src="{{ ASSET_URL }}"></script>
{% endassets %}
{% endblock javascript %}
3 changes: 1 addition & 2 deletions rero_ils/theme/templates/rero_ils/javascript.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@

#}
{%- block javascript %}
{{ webpack['manifest.js']}}
{{ webpack['vendor.js']}}
{{ webpack['theme.js']}}
{{ webpack['reroils_public.js']}}
{{ node_assets('@rero/rero-ils-ui/dist/search-bar', patterns=['polyfills-es5*.js','main-es5*.js'], tags='nomodule defer') }}
{{ node_assets('@rero/rero-ils-ui/dist/search-bar', patterns=['polyfills-es2015*.js','main-es2015*.js'], tags='type="module"') }}
Expand Down
2 changes: 0 additions & 2 deletions rero_ils/theme/templates/rero_ils/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,5 @@
{%- endblock page_body -%}

{%- block javascript %}
{{ webpack['vendor.js']}}
{{ webpack['reroils_public.js']}}
{{ node_assets('@rero/rero-ils-ui/dist/public-search', tags='defer') }}}
{%- endblock javascript %}
27 changes: 16 additions & 11 deletions rero_ils/theme/webpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,24 @@
{{ webpack['base.js']}}
"""

from flask_webpackext import WebpackBundle
from invenio_assets.webpack import WebpackThemeBundle

theme = WebpackBundle(
theme = WebpackThemeBundle(
__name__,
'assets',
entry={
'global': './scss/rero_ils/styles.scss',
'reroils_public': './js/reroils/public.js'
},
dependencies={
'popper.js': '1.16.1',
'jquery': '~3.2.1',
'bootstrap': '~4.5.3',
'font-awesome': '~4.7.0'
default='bootstrap3',
themes={
'bootstrap3': dict(
entry={
'global': './scss/rero_ils/styles.scss',
'reroils_public': './js/reroils/public.js'
},
dependencies={
'popper.js': '1.16.1',
'jquery': '~3.2.1',
'bootstrap': '~4.5.3',
'font-awesome': '~4.7.0',
}
)
}
)
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
import pytest
from dotenv import load_dotenv

pytest_plugins = [
pytest_plugins = (
'fixtures.circulation',
'fixtures.metadata',
'fixtures.organisations',
'fixtures.acquisition',
'fixtures.sip2',
]
'fixtures.sip2'
)


@pytest.fixture(scope='module')
Expand Down

0 comments on commit c1d9253

Please sign in to comment.