invenio-app-rdm 13.0.0b2.dev13__py2.py3-none-any.whl → 13.0.0b2.dev14__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,6 +17,6 @@
17
17
  #
18
18
  # See PEP 0440 for details - https://www.python.org/dev/peps/pep-0440
19
19
 
20
- __version__ = "13.0.0b2.dev13"
20
+ __version__ = "13.0.0b2.dev14"
21
21
 
22
22
  __all__ = ("__version__",)
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2019-2024 CERN.
3
+ # Copyright (C) 2019-2025 CERN.
4
4
  # Copyright (C) 2019-2022 Northwestern University.
5
5
  # Copyright (C) 2022 TU Wien.
6
6
  # Copyright (C) 2023-2024 Graz University of Technology.
@@ -9,18 +9,13 @@
9
9
  # under the terms of the MIT License; see LICENSE file for more details.
10
10
  """Communities UI blueprints module."""
11
11
 
12
- from flask import Blueprint, current_app, render_template, request
13
- from flask_login import current_user
14
- from invenio_communities.communities.resources.serializer import (
15
- UICommunityJSONSerializer,
16
- )
12
+ from flask import Blueprint, current_app, request
17
13
  from invenio_communities.errors import CommunityDeletedError
18
14
  from invenio_communities.views.ui import (
19
15
  not_found_error,
20
16
  record_permission_denied_error,
21
17
  record_tombstone_error,
22
18
  )
23
- from invenio_i18n import lazy_gettext as _
24
19
  from invenio_pidstore.errors import PIDDeletedError, PIDDoesNotExistError
25
20
  from invenio_rdm_records.collections import search_app_context as c_search_app_context
26
21
  from invenio_records_resources.services.errors import (
@@ -28,6 +23,8 @@ from invenio_records_resources.services.errors import (
28
23
  RecordPermissionDeniedError,
29
24
  )
30
25
 
26
+ from invenio_app_rdm.views import create_url_rule
27
+
31
28
  from ..searchapp import search_app_context
32
29
  from .communities import (
33
30
  communities_browse,
@@ -58,29 +55,24 @@ def create_ui_blueprint(app):
58
55
  )
59
56
 
60
57
  blueprint.add_url_rule(
61
- routes["community-detail"],
62
- view_func=communities_detail,
58
+ **create_url_rule(routes["community-detail"], communities_detail),
63
59
  strict_slashes=False,
64
60
  )
65
61
 
66
62
  blueprint.add_url_rule(
67
- routes["community-home"],
68
- view_func=communities_home,
63
+ **create_url_rule(routes["community-home"], communities_home)
69
64
  )
70
65
 
71
66
  blueprint.add_url_rule(
72
- routes["community-browse"],
73
- view_func=communities_browse,
67
+ **create_url_rule(routes["community-browse"], communities_browse)
74
68
  )
75
69
 
76
70
  blueprint.add_url_rule(
77
- routes["community-static-page"],
78
- view_func=community_static_page,
71
+ **create_url_rule(routes["community-static-page"], community_static_page)
79
72
  )
80
73
 
81
74
  blueprint.add_url_rule(
82
- routes["community-collection"],
83
- view_func=community_collection,
75
+ **create_url_rule(routes["community-collection"], community_collection)
84
76
  )
85
77
  # Register error handlers
86
78
  blueprint.register_error_handler(
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2019-2021 CERN.
3
+ # Copyright (C) 2019-2025 CERN.
4
4
  # Copyright (C) 2019-2022 Northwestern University.
5
5
  # Copyright (C) 2021 TU Wien.
6
6
  #
@@ -23,7 +23,8 @@ from invenio_records_resources.services.errors import (
23
23
  RecordPermissionDeniedError,
24
24
  )
25
25
 
26
- from ...theme.views import create_url_rule
26
+ from invenio_app_rdm.views import create_url_rule
27
+
27
28
  from ..searchapp import search_app_context
28
29
  from .deposits import community_upload, deposit_create, deposit_edit
29
30
  from .filters import (
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2019-2024 CERN.
3
+ # Copyright (C) 2019-2025 CERN.
4
4
  # Copyright (C) 2019-2020 Northwestern University.
5
5
  # Copyright (C) 2021 TU Wien.
6
6
  # Copyright (C) 2023-2024 Graz University of Technology.
@@ -19,15 +19,7 @@ from invenio_i18n import lazy_gettext as _
19
19
  from invenio_pages.views import create_page_view
20
20
  from invenio_users_resources.forms import NotificationsForm
21
21
 
22
-
23
- def create_url_rule(rule, default_view_func):
24
- """Generate rule from string or tuple."""
25
- if isinstance(rule, tuple):
26
- path, view_func = rule
27
-
28
- return {"rule": path, "view_func": view_func}
29
- else:
30
- return {"rule": rule, "view_func": default_view_func}
22
+ from invenio_app_rdm.views import create_url_rule
31
23
 
32
24
 
33
25
  #
@@ -0,0 +1,21 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Copyright (C) 2019-2025 CERN.
4
+ #
5
+ # Invenio App RDM is free software; you can redistribute it and/or modify it
6
+ # under the terms of the MIT License; see LICENSE file for more details.
7
+
8
+ """General views and view utilities."""
9
+
10
+
11
+ def create_url_rule(rule, default_view_func):
12
+ """Generate rule from string or tuple."""
13
+ # TODO: We want to deprecate the use of this kind of "string or 2-tuple" config
14
+ # values, and directly use dictionaries that map exactly to the parameters
15
+ # that `Blueprint.add_url_rule(...)` accepts, with some sane defaults.
16
+ if isinstance(rule, tuple):
17
+ path, view_func = rule
18
+
19
+ return {"rule": path, "view_func": view_func}
20
+ else:
21
+ return {"rule": rule, "view_func": default_view_func}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: invenio-app-rdm
3
- Version: 13.0.0b2.dev13
3
+ Version: 13.0.0b2.dev14
4
4
  Summary: Invenio Research Data Management.
5
5
  Home-page: https://github.com/inveniosoftware/invenio-app-rdm
6
6
  Author: CERN
@@ -97,6 +97,11 @@ https://inveniordm.docs.cern.ch
97
97
  Changes
98
98
  =======
99
99
 
100
+ Version v13.0.0b2.dev14 (released 2025-04-02)
101
+
102
+ - views: extract `create_url_rule` utility and plan for deprecation
103
+ - communities_ui: make routes + views configurable
104
+
100
105
  Version v13.0.0b2.dev13 (released 2025-03-27)
101
106
 
102
107
  - checks: add checks tab to requests (fix record ID retrieval with same logic as record)
@@ -1,9 +1,10 @@
1
- invenio_app_rdm/__init__.py,sha256=igJvn8vZNTgO17CCAu3ikuVM6fX7YvHM16hxgpLju4Q,700
1
+ invenio_app_rdm/__init__.py,sha256=bgblKvo6WIigUQCg4pKhZFqNnXFu8bDJ9Layy7cP0-8,700
2
2
  invenio_app_rdm/cli.py,sha256=G6QqNU2W6n6ICtTMnpeKFXIsdorncDmVXwwwsGH5F2k,2746
3
3
  invenio_app_rdm/config.py,sha256=aQHeG7QxiKx01eDi1Xo7hsOfyAfe_yb8SNrq-CDOYag,50448
4
4
  invenio_app_rdm/ext.py,sha256=PkZhATGJDgYqBJQh41NdvBZWR83mgI3Eej6rj10UVJE,5278
5
5
  invenio_app_rdm/tasks.py,sha256=FyrIQXVuPjms-dNEnLrVmmdwrX_IykJ87gcSNgOR6O0,1373
6
6
  invenio_app_rdm/urls.py,sha256=8S95QSs4yS0rtORsd4veo--rF3LSLwZenoowJ5ubbmM,2496
7
+ invenio_app_rdm/views.py,sha256=SDr9NwZEWQcgT_3GFRYdDf6eUaK9DfnoafIkhUf9nSI,785
7
8
  invenio_app_rdm/administration/__init__.py,sha256=8r9LeoE9fNHZSVS5QsCfVhRU7MAiEOWJk9MA3Y--4F8,251
8
9
  invenio_app_rdm/administration/domains/__init__.py,sha256=Qob5kqjRPxpuSE5yDV2tesN6tmaKp5JcxCxGA8Mrcak,487
9
10
  invenio_app_rdm/administration/domains/domains.py,sha256=vafLa-mqkg_tQLjx328E64P_4mksB5kjBlsfunvdatg,5599
@@ -29,7 +30,7 @@ invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/details
29
30
  invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/records/index.html,sha256=5Ub4uyVsjjTHzbhNe8Y-AAZG5oI28wZs2jQXvSPofXw,700
30
31
  invenio_app_rdm/communities_ui/views/__init__.py,sha256=HsbOWjDobxXGx6WFlTn45JYr0V9yqjCpDXOR_i2wmtw,401
31
32
  invenio_app_rdm/communities_ui/views/communities.py,sha256=t7qDZ8CiEwT9lB9B9_nS7IJn3V80t1i-yN48CU9rAyc,6706
32
- invenio_app_rdm/communities_ui/views/ui.py,sha256=QBf1QyaXZ46OqUZXU5CDdg10e2HqCaVnggIpJIdVwok,3154
33
+ invenio_app_rdm/communities_ui/views/ui.py,sha256=7Pk0AqwmNJHRd8wuZEvC17l7tpcxs5xQzsC4aXQzV-o,3009
33
34
  invenio_app_rdm/fixtures/__init__.py,sha256=XwWy4U66FkpWOEBFfn5EnXfuTKlXnh3HWZNBMDX4Rgk,1512
34
35
  invenio_app_rdm/fixtures/oai_sets.py,sha256=ZoS94FNkIsdEJWHihZRYvFAstp3GBrZ0viDml9mQXOI,621
35
36
  invenio_app_rdm/fixtures/pages.py,sha256=R2DaRV__iXQ8Zh-fGcs9g16rUKEDp0xV47iZUfoLIx0,1887
@@ -79,7 +80,7 @@ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/
79
80
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/locations.html,sha256=27-KyPqb05pu-yRXHvxCgZWRSi5bFP6xf7XBn91sbeA,1741
80
81
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/stats_popup.html,sha256=5SVzfIS15Aro2Itd2BiaLbMXm0cvvwk6ZCdYjuSwhBw,625
81
82
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/version.html,sha256=JpE4e6RpbSR2pQD1rOsfvzD2ur584aRfBWUUap2IMBA,688
82
- invenio_app_rdm/records_ui/views/__init__.py,sha256=4NxQNADuvMsblEsGd3zkKXSNR5_4eLMcFEFYvc6NxVc,5718
83
+ invenio_app_rdm/records_ui/views/__init__.py,sha256=M8eCKOBwsChhQC0alOflXAOl2b-5ke49Bxx6NT7o2vg,5726
83
84
  invenio_app_rdm/records_ui/views/decorators.py,sha256=XUSPpstYyh72IdNaIO4wz3sw1fjI_2DNGsKdUu3ueL4,15769
84
85
  invenio_app_rdm/records_ui/views/deposits.py,sha256=H7LoSmvPzkjVGfhp3TmjMkQkLpJ7jOdmigjVciLqDvA,21536
85
86
  invenio_app_rdm/records_ui/views/filters.py,sha256=Rm55fXJv97cqq8B_6KCe-3PxxHUH4VRu-jd9fTea6r4,6994
@@ -101,7 +102,7 @@ invenio_app_rdm/requests_ui/views/__init__.py,sha256=7QiAyRq8Eu84IXwjzxK63vNeTZn
101
102
  invenio_app_rdm/requests_ui/views/requests.py,sha256=grC2bQWF36xzeftdOSjy_vBWAGSUbupOliPervenF6s,16048
102
103
  invenio_app_rdm/requests_ui/views/ui.py,sha256=DBysYQa__gOCg-pikO6HmoVLmRmMAVWeTBiYhPa7PmA,2359
103
104
  invenio_app_rdm/theme/__init__.py,sha256=QbkxNjjOmGKRlie96HfTXgnFeVQjOX0GdiZnHP7pIhs,277
104
- invenio_app_rdm/theme/views.py,sha256=UJs2_C28BWsXY1JqbRK4_ML1JRtGo1yM2S0_W37JJo4,4545
105
+ invenio_app_rdm/theme/views.py,sha256=sHDaOgCVbBha59S9YK4F68yFo9gg1LdQWyzNzYaEBjo,4312
105
106
  invenio_app_rdm/theme/webpack.py,sha256=5ucwIJQgM1y9EFdRcsxv_ThPs7hXRzdmipVBxoU1McI,5090
106
107
  invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/theme.js,sha256=2-BWDEH3YQPwPt1ey3jUHnMrKTyb0JBPRlydk5_reH8,4151
107
108
  invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/utils.js,sha256=zKROcc3qE64-UhM8ha42K-EDDxAXMupxoocZZ9bjEHo,3452
@@ -524,7 +525,7 @@ invenio_app_rdm/users_ui/views/__init__.py,sha256=SMdY2NJj9GICfr3Xuok7qdNYVtA2bJ
524
525
  invenio_app_rdm/users_ui/views/dashboard.py,sha256=iUn2PrODAwb8ugmMosJKAjPhUzjCiWiAWoXQr9RUFuc,1793
525
526
  invenio_app_rdm/users_ui/views/ui.py,sha256=W_eXM8dLVIrNHQB2UEh37C9BYoHauft6RyvcDNFHovA,1742
526
527
  invenio_app_rdm/utils/files.py,sha256=CruDyO2gDVadSlWEJD-WHpWHeOQ0juh-Ei9jz3D9yjc,3923
527
- invenio_app_rdm-13.0.0b2.dev13.dist-info/licenses/LICENSE,sha256=AZXFHRrZa5s4m9DV7zZr4bPGTMUvcEPCodeV_AmFI8k,1204
528
+ invenio_app_rdm-13.0.0b2.dev14.dist-info/licenses/LICENSE,sha256=AZXFHRrZa5s4m9DV7zZr4bPGTMUvcEPCodeV_AmFI8k,1204
528
529
  tests/__init__.py,sha256=yKVf0yYRuxmXvyAtLjmfpHGVCsEkZOhs_FojAAM_w-8,244
529
530
  tests/conftest.py,sha256=6iR-l-DIpQDxN2LLMu6kbHnLsmAW1m8Lq-j8rNNucf8,8956
530
531
  tests/test_tasks.py,sha256=6l25lcMjL3ZuQr4hsxbAEjSTu_J1aKkOB3ZXqOZZIy0,3712
@@ -557,8 +558,8 @@ tests/ui/test_filters.py,sha256=Q90wsJffjMVir7wNX8taGf2KZleLtPbXZXHLTkBpzLA,284
557
558
  tests/ui/test_signposting_ui.py,sha256=KCSjQlMD2VKlwQCyZYDwYjtVNL35x3u-ZC4ceD5y21w,3847
558
559
  tests/ui/test_static.py,sha256=vO3OQAOhrQESJifnQfM1pw7JYz3J874O8BAb7Cc_PPA,868
559
560
  tests/ui/test_stats_ui.py,sha256=LHa_0hjvpYvliSk_jknWy-90CO82jVElUfK5Ua_ZmfA,3554
560
- invenio_app_rdm-13.0.0b2.dev13.dist-info/METADATA,sha256=cmJEGFSozsFaxrVk461_ppA7Ja4ntogBxi3zCIeHfsQ,12096
561
- invenio_app_rdm-13.0.0b2.dev13.dist-info/WHEEL,sha256=MAQBAzGbXNI3bUmkDsiV_duv8i-gcdnLzw7cfUFwqhU,109
562
- invenio_app_rdm-13.0.0b2.dev13.dist-info/entry_points.txt,sha256=r1vTqYNABeWqRMWitzyR9FnBsAy-KYZKZCp95IziyLY,2070
563
- invenio_app_rdm-13.0.0b2.dev13.dist-info/top_level.txt,sha256=NqTqrntInEAci7EXcNBvouXFMqwyjVQhEI0b7izYRBY,22
564
- invenio_app_rdm-13.0.0b2.dev13.dist-info/RECORD,,
561
+ invenio_app_rdm-13.0.0b2.dev14.dist-info/METADATA,sha256=CvyWAPM3nrlUqRMNhl3D0m--P-EocQePLD-Q4bLG4wc,12263
562
+ invenio_app_rdm-13.0.0b2.dev14.dist-info/WHEEL,sha256=MAQBAzGbXNI3bUmkDsiV_duv8i-gcdnLzw7cfUFwqhU,109
563
+ invenio_app_rdm-13.0.0b2.dev14.dist-info/entry_points.txt,sha256=r1vTqYNABeWqRMWitzyR9FnBsAy-KYZKZCp95IziyLY,2070
564
+ invenio_app_rdm-13.0.0b2.dev14.dist-info/top_level.txt,sha256=NqTqrntInEAci7EXcNBvouXFMqwyjVQhEI0b7izYRBY,22
565
+ invenio_app_rdm-13.0.0b2.dev14.dist-info/RECORD,,