oarepo-runtime 1.5.55__py3-none-any.whl → 1.5.57__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,6 @@
1
1
  import json
2
2
  import logging
3
+ import os
3
4
  import re
4
5
  from functools import cached_property
5
6
  from urllib.parse import urljoin
@@ -24,6 +25,7 @@ from invenio_base.utils import obj_or_import_string
24
25
  from invenio_jsonschemas import current_jsonschemas
25
26
  from invenio_records_resources.proxies import current_service_registry
26
27
 
28
+
27
29
  logger = logging.getLogger("oarepo_runtime.info")
28
30
 
29
31
 
@@ -65,10 +67,20 @@ class InfoResource(Resource):
65
67
  @response_handler()
66
68
  def repository(self):
67
69
  """Repository endpoint."""
70
+ links = {
71
+ "self": url_for(request.endpoint, _external=True),
72
+ "models": url_for("oarepo_runtime_info.models", _external=True),
73
+ }
74
+ try:
75
+ import invenio_requests # noqa
76
+ links["requests"] = api_url_for("requests.search", _external=True)
77
+ except ImportError:
78
+ pass
79
+
68
80
  ret = {
69
81
  "name": current_app.config.get("THEME_SITENAME", ""),
70
82
  "description": current_app.config.get("REPOSITORY_DESCRIPTION", ""),
71
- "version": get_package_version("repo"),
83
+ "version": os.environ.get("DEPLOYMENT_VERSION", "local development"),
72
84
  "invenio_version": get_package_version("oarepo"),
73
85
  "transfers": [
74
86
  "local-file",
@@ -76,10 +88,7 @@ class InfoResource(Resource):
76
88
  # TODO: where to get these? (permissions?)
77
89
  # "direct-s3",
78
90
  ],
79
- "links": {
80
- "self": url_for(request.endpoint, _external=True),
81
- "models": url_for("oarepo_runtime_info.models", _external=True),
82
- },
91
+ "links": links,
83
92
  }
84
93
  self.call_components("repository", data=ret)
85
94
  return ret, 200
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: oarepo-runtime
3
- Version: 1.5.55
3
+ Version: 1.5.57
4
4
  Summary: A set of runtime extensions of Invenio repository
5
5
  Description-Content-Type: text/markdown
6
6
  License-File: LICENSE
@@ -41,7 +41,7 @@ oarepo_runtime/datastreams/writers/validation_errors.py,sha256=wOCXdniR6so_4Expd
41
41
  oarepo_runtime/datastreams/writers/yaml.py,sha256=XchUJHQ58E2Mfgs8elImXbL38jFtI8Hfoye6yaR0gKI,1482
42
42
  oarepo_runtime/i18n/__init__.py,sha256=h0knW_HwiyIt5TBHfdGqN7_BBYfpz1Fw6zhVy0C28fM,111
43
43
  oarepo_runtime/info/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
- oarepo_runtime/info/views.py,sha256=bH0FWS3SHpUmACeXOVwTIcSHa8qQvo19jMYEAEYhTu8,11110
44
+ oarepo_runtime/info/views.py,sha256=YdjzwPhG5YxRfz-7WLvHlqrlHi98rmKEcZpdN4opUII,11342
45
45
  oarepo_runtime/records/__init__.py,sha256=3vzRsAPxl4d5QOnGyls-vUg4E6PunmR4ACObtacMAIQ,1038
46
46
  oarepo_runtime/records/dumpers/__init__.py,sha256=OmzNhLdMNKibmCksnj9eTX9xPBG30dziiK3j3bAAp3k,233
47
47
  oarepo_runtime/records/dumpers/edtf_interval.py,sha256=YCShZAoqBQYaxVilEVotS-jXZsxxoXO67yu2urhkaMA,1198
@@ -119,9 +119,9 @@ oarepo_runtime/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
119
119
  oarepo_runtime/utils/functools.py,sha256=gKS9YZtlIYcDvdNA9cmYO00yjiXBYV1jg8VpcRUyQyg,1324
120
120
  oarepo_runtime/utils/path.py,sha256=V1NVyk3m12_YLbj7QHYvUpE1wScO78bYsX1LOLeXDkI,3108
121
121
  tests/pkg_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
122
- oarepo_runtime-1.5.55.dist-info/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
123
- oarepo_runtime-1.5.55.dist-info/METADATA,sha256=QkP7AUW4cdDHjbJ8UwGLkmUlp23l_q57oFfIr9B4FB0,4720
124
- oarepo_runtime-1.5.55.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
125
- oarepo_runtime-1.5.55.dist-info/entry_points.txt,sha256=QrlXAKuPDVBinaSh_v3yO9_Nb9ZNmJCJ0VFcCW-z0Jg,327
126
- oarepo_runtime-1.5.55.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
127
- oarepo_runtime-1.5.55.dist-info/RECORD,,
122
+ oarepo_runtime-1.5.57.dist-info/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
123
+ oarepo_runtime-1.5.57.dist-info/METADATA,sha256=04oSbVDUfVteCk31LJXU2XE4oBIWgfhDyeYMDVEOeFY,4720
124
+ oarepo_runtime-1.5.57.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
125
+ oarepo_runtime-1.5.57.dist-info/entry_points.txt,sha256=QrlXAKuPDVBinaSh_v3yO9_Nb9ZNmJCJ0VFcCW-z0Jg,327
126
+ oarepo_runtime-1.5.57.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
127
+ oarepo_runtime-1.5.57.dist-info/RECORD,,