Skip to content

Commit

Permalink
installation: use git dependency for invenio-swh
Browse files Browse the repository at this point in the history
  • Loading branch information
slint committed Nov 30, 2023
1 parent 1f4e4a8 commit 3826f91
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 16 deletions.
2 changes: 2 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ invenio-app-rdm = {version = "~=12.0.0b2.dev3", extras = ["opensearch2"]}
invenio-logging = {extras = ["sentry_sdk"], version = "~=2.0"}
zenodo_rdm = {editable="True", path="./site"}
zenodo_legacy = {editable="True", path="./legacy"}
# TODO: Remove once we fix PyPI package issues
invenio-swh = {git = "https://github.com/inveniosoftware/invenio-swh", ref = "v0.2.1"}
jsonschema = ">=4.17.0,<4.18.0" # due to compatibility issues with alpha
ipython = "!=8.1.0"
uwsgi = ">=2.0"
Expand Down
31 changes: 23 additions & 8 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion site/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ install_requires =
nameparser>=1.1.1
pyinstrument>=4.5.1
sqltap>=0.3.11
invenio_swh>=0.20.0,<1.0.0
# TODO: Add once we fix PyPI package issues
# invenio-swh>=0.2.0,<1.0.0

[options.extras_require]
tests =
Expand Down
8 changes: 4 additions & 4 deletions site/zenodo_rdm/custom_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def field(self):
"obo": "http://purl.obolibrary.org/obo/",
"dc": "http://purl.org/dc/terms/",
"legacy": "",
**CODEMETA_NAMESPACE, # TODO enable when fixed (see https://github.com/zenodo/rdm-project/issues/217)
**CODEMETA_NAMESPACE, # TODO enable when fixed (see https://github.com/zenodo/rdm-project/issues/217)
**JOURNAL_NAMESPACE,
**MEETING_NAMESPACE,
**IMPRINT_NAMESPACE,
Expand Down Expand Up @@ -182,7 +182,7 @@ def field(self):
# obo
RelationshipListCF(name="obo:RO_0002453"),
# codemeta,
*CODEMETA_CUSTOM_FIELDS, # TODO enable when fixed (see https://github.com/zenodo/rdm-project/issues/217)
*CODEMETA_CUSTOM_FIELDS, # TODO enable when fixed (see https://github.com/zenodo/rdm-project/issues/217)
# journal
*JOURNAL_CUSTOM_FIELDS,
# meeting
Expand Down Expand Up @@ -522,7 +522,7 @@ def field(self):
# zenodo custom fields
ZENODO_CUSTOM_FIELDS_UI,
# codemeta
CODEMETA_CUSTOM_FIELDS_UI, # TODO enable when fixed (see https://github.com/zenodo/rdm-project/issues/217)
CODEMETA_CUSTOM_FIELDS_UI, # TODO enable when fixed (see https://github.com/zenodo/rdm-project/issues/217)
# publishing information
{
"section": _("Publishing information"),
Expand All @@ -543,5 +543,5 @@ def field(self):
# Custom fields facets

CUSTOM_FIELDS_FACETS = {
**CODEMETA_FACETS, # TODO enable when fixed (see https://github.com/zenodo/rdm-project/issues/217)
**CODEMETA_FACETS, # TODO enable when fixed (see https://github.com/zenodo/rdm-project/issues/217)
}
4 changes: 1 addition & 3 deletions site/zenodo_rdm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
import idutils
from flask import current_app, url_for
from invenio_app_rdm.records_ui.utils import dump_external_resource
from invenio_i18n import _
from invenio_rdm_records.proxies import current_rdm_records_service as service
from invenio_swh.proxies import current_swh_service as service_swh

from invenio_i18n import _

from zenodo_rdm.openaire.utils import openaire_link


Expand Down Expand Up @@ -137,7 +136,6 @@ def openaire_link_render(record):

def swh_link_render(record):
"""Render the swh link."""

if not current_app.config.get("SWH_ENABLED"):
return None

Expand Down

0 comments on commit 3826f91

Please sign in to comment.