invenio-app-rdm 13.0.0b3.dev16__py2.py3-none-any.whl → 13.0.0b3.dev18__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.
Files changed (42) hide show
  1. invenio_app_rdm/__init__.py +1 -1
  2. invenio_app_rdm/communities_ui/sitemap.py +63 -0
  3. invenio_app_rdm/communities_ui/views/communities.py +9 -8
  4. invenio_app_rdm/communities_ui/views/ui.py +1 -1
  5. invenio_app_rdm/config.py +14 -0
  6. invenio_app_rdm/records_ui/sitemap.py +44 -0
  7. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/detail.html +46 -47
  8. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/access-form.html +1 -1
  9. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/citation.html +1 -1
  10. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/creatibutors.html +9 -9
  11. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/description.html +1 -1
  12. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/details.html +22 -22
  13. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/meta.html +8 -8
  14. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/communities.html +6 -6
  15. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/details.html +8 -8
  16. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/export.html +2 -2
  17. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/keywords_subjects.html +1 -1
  18. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/licenses.html +2 -2
  19. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/locations.html +1 -1
  20. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/manage_menu.html +1 -1
  21. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/metrics.html +1 -1
  22. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/technical_metadata.html +2 -2
  23. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/versions.html +1 -1
  24. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/stats.html +2 -2
  25. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/subjects.html +1 -1
  26. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/doi.html +2 -2
  27. invenio_app_rdm/records_ui/views/records.py +2 -1
  28. invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/community-submission/index.html +2 -2
  29. invenio_app_rdm/requests_ui/views/requests.py +6 -3
  30. invenio_app_rdm/theme/{static → templates/semantic-ui/invenio_app_rdm}/robots.txt +4 -0
  31. invenio_app_rdm/theme/views.py +6 -2
  32. {invenio_app_rdm-13.0.0b3.dev16.dist-info → invenio_app_rdm-13.0.0b3.dev18.dist-info}/METADATA +16 -3
  33. {invenio_app_rdm-13.0.0b3.dev16.dist-info → invenio_app_rdm-13.0.0b3.dev18.dist-info}/RECORD +41 -38
  34. {invenio_app_rdm-13.0.0b3.dev16.dist-info → invenio_app_rdm-13.0.0b3.dev18.dist-info}/WHEEL +1 -1
  35. tests/conftest.py +126 -8
  36. tests/ui/conftest.py +6 -8
  37. tests/ui/test_robotstxt.py +35 -0
  38. tests/ui/test_sitemaps.py +85 -0
  39. tests/ui/test_static.py +0 -25
  40. {invenio_app_rdm-13.0.0b3.dev16.dist-info → invenio_app_rdm-13.0.0b3.dev18.dist-info}/entry_points.txt +0 -0
  41. {invenio_app_rdm-13.0.0b3.dev16.dist-info → invenio_app_rdm-13.0.0b3.dev18.dist-info}/licenses/LICENSE +0 -0
  42. {invenio_app_rdm-13.0.0b3.dev16.dist-info → invenio_app_rdm-13.0.0b3.dev18.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
- invenio_app_rdm/__init__.py,sha256=Q0vXNeDts4DzUCAVkBt7DTtlo26Ee6X1SNM8YIFnIfo,700
1
+ invenio_app_rdm/__init__.py,sha256=naxTWzl2UqXLcnHBCAjUWuKJ-4j6NInxM5qRiHa6oxs,700
2
2
  invenio_app_rdm/cli.py,sha256=G6QqNU2W6n6ICtTMnpeKFXIsdorncDmVXwwwsGH5F2k,2746
3
- invenio_app_rdm/config.py,sha256=xfA5wbNl9L1U-LZXdMCHz509LlvyHinPXAa_YPxDxQM,50880
3
+ invenio_app_rdm/config.py,sha256=F9VyDXDkiSXYtFkixtFUTw4x4AKaYs26HBSuJpJGDdU,51375
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/views.py,sha256=SDr9NwZEWQcgT_3GFRYdDf6eUaK9DfnoafIkhUf9nSI,785
@@ -26,13 +26,14 @@ invenio_app_rdm/administration/views/__init__.py,sha256=2z29bPLUgK4jR_ztgNk4LunT
26
26
  invenio_app_rdm/administration/views/ui.py,sha256=IInmlFgWv6mUfKTHEUfe_czwY6u01j4SYyGMDS2hBsI,543
27
27
  invenio_app_rdm/communities_ui/__init__.py,sha256=7hAwfcQHeSbqIYHyuHqLhJgYXg6NxId4U9NueCQR3uo,325
28
28
  invenio_app_rdm/communities_ui/searchapp.py,sha256=0V_3WNBSf7di1Ml4O4FqlWZ0J9MBLN4F9AtBxF5cQcI,862
29
+ invenio_app_rdm/communities_ui/sitemap.py,sha256=Q7IeUUwd_yi9A7-Q2gcI52vxyN87nVWwDoIbwO-hpTs,2348
29
30
  invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/collections/collection.html,sha256=h4OsqTvZ_qOfa99FKcMf2dH3lQ0VfESVpu7u8A-HHW8,2030
30
31
  invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/collections/macros.html,sha256=a7sVjrW99c_dbGcxc6miSYq8aKvENqXRUgjb6gxN-P4,1824
31
32
  invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/details/browse/index.html,sha256=3cp9pSf1ItKA-PHm2hnmc_x7pIryTFxpxk_yfrgFz3o,2125
32
33
  invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/records/index.html,sha256=5Ub4uyVsjjTHzbhNe8Y-AAZG5oI28wZs2jQXvSPofXw,700
33
34
  invenio_app_rdm/communities_ui/views/__init__.py,sha256=HsbOWjDobxXGx6WFlTn45JYr0V9yqjCpDXOR_i2wmtw,401
34
- invenio_app_rdm/communities_ui/views/communities.py,sha256=t7qDZ8CiEwT9lB9B9_nS7IJn3V80t1i-yN48CU9rAyc,6706
35
- invenio_app_rdm/communities_ui/views/ui.py,sha256=CiwVuk6dqx4sJaT-3nwpo9y-XNLUnO589x9Ln4hXoV8,3009
35
+ invenio_app_rdm/communities_ui/views/communities.py,sha256=21QuhN6m1uWjKrDaxzuZekVQbVetqDQ5Nm2On-tmljQ,6725
36
+ invenio_app_rdm/communities_ui/views/ui.py,sha256=YZ9yiZazEutwkpR4xEolLe6mUtiTJrxVdCOtQGAILOw,3007
36
37
  invenio_app_rdm/fixtures/__init__.py,sha256=XwWy4U66FkpWOEBFfn5EnXfuTKlXnh3HWZNBMDX4Rgk,1512
37
38
  invenio_app_rdm/fixtures/oai_sets.py,sha256=ZoS94FNkIsdEJWHihZRYvFAstp3GBrZ0viDml9mQXOI,621
38
39
  invenio_app_rdm/fixtures/pages.py,sha256=v1ipq8ues_m3y3Y5pSfcIeKNPI5bhwAbUZcpbE_z_ZA,2053
@@ -41,43 +42,44 @@ invenio_app_rdm/fixtures/data/pages.yaml,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
41
42
  invenio_app_rdm/fixtures/pages/.gitkeep,sha256=1HVs32jZTGcMkk-dV9RHGPZm5FdydwFIZDW1epflLF8,68
42
43
  invenio_app_rdm/records_ui/__init__.py,sha256=c4_HH3R7fTOp7AnNQSF4P9h_mwOvL0SE9tkpo6SBnT8,327
43
44
  invenio_app_rdm/records_ui/searchapp.py,sha256=QD5fTdimVUC5K4ERVBjgXHZdbC3ZkgcR8LSIxFTPBQY,2697
45
+ invenio_app_rdm/records_ui/sitemap.py,sha256=erWpwi8lx17ATicBo3dTwMiEEwHTilL8xTAkNCC3J4U,1619
44
46
  invenio_app_rdm/records_ui/utils.py,sha256=0ljPFPC1dAEY_ySZSIT_LRYka2bfsUyvFk_QQAmhYQ4,2687
45
47
  invenio_app_rdm/records_ui/previewer/__init__.py,sha256=T32i_ssGKONDpNB3gECpn20ubHvGYYVrNuIgCADioOM,267
46
48
  invenio_app_rdm/records_ui/previewer/iiif_simple.py,sha256=lGxB3g0hNVJDWnq5jV_KrKPwC-LR1C51DMjas1-UpBM,1589
47
49
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/deposit.html,sha256=x1JF-cRmkbSSeroh2SWgKHIwGc34FaPJiaYQlwiUkQw,2413
48
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/detail.html,sha256=0a6IafQL0I9Vo_TErRkn4voZAirWSSrNZSgMY_Lgegw,20349
50
+ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/detail.html,sha256=q-Aw6yvgRzN0myK-eb_7toiMmuwyjOYXJ0skChkQ83I,20852
49
51
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/draft_not_found.html,sha256=_FPflgqVZ556Xw349mHPSFb0FOhxYkIHfmUUTX53_LU,624
50
52
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/export.html,sha256=2h-FGJvNKS9ASZ0mErL2vz5jXQYiLL8u8rTO2_D3FVQ,1166
51
53
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/iiif_preview.html,sha256=RningdsVBXsJ8qnQjzurf0Ty8R5Tq08eS31s53c3DNE,444
52
54
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/restricted_with_doi_tombstone.html,sha256=d2_LrLbWG_vQuR-Gz8P2nrgGuBZONk36kGBMT6iW3uE,987
53
55
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/search.html,sha256=MdDMzWNIqvZRH-7Blvb9lBdJCA-TK0MXdPpyVWjjBo8,606
54
56
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/tombstone.html,sha256=oXt0IHIF_AL3b0zLfBgl_meMBzDupNBwFaRGD2EIofY,1902
55
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/access-form.html,sha256=lCi9_NmOeFy3JcAStqKaaTtuUta9wxkCwOtMAKkZweM,2314
56
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/citation.html,sha256=zQO0X5Fdk9MG_ODPoe2w4RMGUp35eF7KD_6u4rf332A,561
57
+ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/access-form.html,sha256=rLkoNmouAMV8S6fAU3_PtGuqDjFTACniyiosGAKjcN0,2317
58
+ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/citation.html,sha256=kLtpjahv3CHa1NvRmSirbv7st53q9F3K7LNYTCdvCuk,564
57
59
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/contact.html,sha256=czuC-Ec5zJaKzFOaqhz7JqhWiCS3U3NKaQmPw9-rzks,403
58
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/creatibutors.html,sha256=vOC6Tnlkn3wrYUfLQDVWRTRFmy3jgv1E9vIMwRV13XI,2090
59
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/description.html,sha256=wqLb_Z6cJ026KEDedJMSsQhQnKWpe7TnMuMVwFAMDX0,912
60
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/details.html,sha256=jdXr5U6YS8UllEuJjjSzusJJ1XkdE75V2q97h43D0NA,12095
60
+ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/creatibutors.html,sha256=43fnhdtCdec6d3s9B__7biS4vp0opvcMYh-1_jncYbA,2231
61
+ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/description.html,sha256=UGUy-EOWggvBRCZT-H418yMW4PzYgn-5QFcmgZx1P8U,930
62
+ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/details.html,sha256=Lru32FfQm1oQxTa-beZ-Q1HlGj3CFin1dgV4pOXGdeU,12278
61
63
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/doi.html,sha256=bveXC9JvZVjPKQrtZ8FFUV-fIHEN4nB1VSyomR_obxA,473
62
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/meta.html,sha256=guLBzq2zQM9VqGVnRKZ2XHZcAk0YEK1VAf3wEM-mk2M,1732
64
+ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/meta.html,sha256=CbojPWKp0PpXetywwbKW0a7jM_83t8LSbVmYiSEm-L8,1819
63
65
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar.html,sha256=PjmX-aH2YVZl67Q9ydFDOTLlrEwV2hgz64dRfftFF0A,426
64
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/stats.html,sha256=74xWPQNHoFbhN1an-p9SEAFUbW-TwCsBEUAaOEyNgWQ,4370
65
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/subjects.html,sha256=Wu7MCXzGj41K38-VXi-kStvc8fm3Ck68uJ1egfFK0dw,1509
66
+ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/stats.html,sha256=z9eiFSeJO5yw_hZjTZDot3lxXGYzBFIUvKqGhkpMt7E,4388
67
+ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/subjects.html,sha256=bYER2zAbf7XtM5sMXNzO1GwaLHpZQbdhhMZiMP5yRwU,1518
66
68
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/citations.html,sha256=5Sdg_gwGOgm0qLRv4-CUmDNx7PYlOsa5XPGjDdx7k20,258
67
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/communities.html,sha256=GxxKbXxVg5lKcSEzVeYJXyz7qUL7yhsZnhXY3lE-vNU,1561
68
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/details.html,sha256=Ip3wBnfpS8U9fBH2q9nZbt7znAzUKvVrbz3QkeBUMUM,1988
69
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/export.html,sha256=DoDrQFd_OJcJzqBEQ2FRbcfJpD3TLRjESU68mBLWVyU,1392
69
+ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/communities.html,sha256=Mv6hMKj190MFjx_y768SgsD9KrJ0K3_bd3vzMj2SxbA,1603
70
+ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/details.html,sha256=J5z4zxhSZDcKE2ZEdyhcRMIKKVCyKGE6DTeGysijwRU,2123
71
+ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/export.html,sha256=RfPvs17eTUkWfWA6o9jRWqjUeDyTKL0XyreGR0UXLt4,1404
70
72
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/external_resources.html,sha256=Ia92YMRlxuGRTMsWU4hQTLJDeRy8BX8bnSSaLXKst4Y,1934
71
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/keywords_subjects.html,sha256=LvsA6JiosfwSSwUUg6--3xx1OZepvN7mxQdIWyl9caE,708
72
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/licenses.html,sha256=ktAwgEUpB6X8uMk9-ThNEg0_CkyTqfBurTudXNd6mFo,3131
73
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/locations.html,sha256=i1EnmQrnmSAYfocoMYtneAB7JyUI309whyu3bZJTR6M,715
74
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/manage_menu.html,sha256=RdX32DFR0Skau0sBmNCfY51u7gkBvJbokGCWHeic5Qc,1493
75
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/metrics.html,sha256=3OptZ6iQYaQ3GjNw5O-h9FloISUzFE0nSNTmazjTQgQ,520
76
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/technical_metadata.html,sha256=N5VUwCygKG-zXvyu0YeFJb7A0eHIcKWuMAVm9Kbrb_M,658
77
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/versions.html,sha256=sPYG81XFcU1ND6roeYmN4SY419iyvQj9ozCv9Pctw5E,932
73
+ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/keywords_subjects.html,sha256=8FTUt6MVRvEsj89qDxP6eK2feyv2UI0fgICoT99cUIU,717
74
+ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/licenses.html,sha256=K1wutmzuIaS7Wq3kyii0fYXs9JM8rQkJo2o3nQG9bSY,3140
75
+ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/locations.html,sha256=6o5nQyXP0V158KMBsOpKMeuLGcw_lAhnZIyGpaogbMk,721
76
+ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/manage_menu.html,sha256=C2Y96zEZAiDmAq5gOTKLKHpUnGktCZDgihBy4LKse98,1496
77
+ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/metrics.html,sha256=6aS28YC8U7VDWn2vI2ckYtzm9wVWacGZ4a7Pu5D3BBI,526
78
+ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/technical_metadata.html,sha256=ptS8h6orgDhFFGXeZBCNBltELy_g9fUtS1bMTzieCPk,676
79
+ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/versions.html,sha256=fIa8R0blN2rWkrP0K43qvSTye4Gt6-5yo3HN5FLdLTA,935
78
80
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/creatibutors.html,sha256=N53nwtlEZjxweCx70qFJa1s6uL1pPSzWZgk8p1vodE4,4277
79
81
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/detail.html,sha256=YEF5tR22t2QUO-tKpjsS4gKhYMZpfyjbO6wWf8LKhJw,10598
80
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/doi.html,sha256=NZUtJSCwQScJsmz7vxglslEVqPwG7Ldul_wl7yce0fg,1489
82
+ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/doi.html,sha256=_i79JuwZFbD9JcLvuryyKIY3mLV1SFnGJ_EFHRnTbbg,1510
81
83
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/files.html,sha256=Xsq_HiM_cTGKgmoE1HAXje8iYe3d0wIJoesk22Xn7vU,8761
82
84
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/locations.html,sha256=27-KyPqb05pu-yRXHvxCgZWRSi5bFP6xf7XBn91sbeA,1741
83
85
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/stats_popup.html,sha256=5SVzfIS15Aro2Itd2BiaLbMXm0cvvwk6ZCdYjuSwhBw,625
@@ -86,7 +88,7 @@ invenio_app_rdm/records_ui/views/__init__.py,sha256=9DaDls04IQv7fYttDjLofIWGsRRj
86
88
  invenio_app_rdm/records_ui/views/decorators.py,sha256=MUUmgGuigmFMigcpyJbNvM0yPKUyeAw5LE6MJ69BoFA,15883
87
89
  invenio_app_rdm/records_ui/views/deposits.py,sha256=KRR_fpl98EhNZie0Q-_uZtgG2QKsQAW2fhb-kvnQ4s4,21561
88
90
  invenio_app_rdm/records_ui/views/filters.py,sha256=Rm55fXJv97cqq8B_6KCe-3PxxHUH4VRu-jd9fTea6r4,6994
89
- invenio_app_rdm/records_ui/views/records.py,sha256=GdxG3JnXrV1QT0KxOqeYWoDGIiZRZ9w5poihPPd-wTo,16428
91
+ invenio_app_rdm/records_ui/views/records.py,sha256=u3zvyMk5ADvzC6WhUlxFqjdJMIcuBAwh7PdV_TPg2KE,16454
90
92
  invenio_app_rdm/redirector/__init__.py,sha256=AYCTGmfbmkHW3YJXMqXlWBXcBrUsta-QmL9ULX2bjwA,243
91
93
  invenio_app_rdm/redirector/resource.py,sha256=XuH6ZK0HVE5LdXoorlm8aI3deizvnZ5gFa9d1ihYosk,3312
92
94
  invenio_app_rdm/redirector/views.py,sha256=CTJ3EGEFKfc0lFwNb9pwH7MbMLiqaWnF8LA3xGIwahc,563
@@ -94,17 +96,17 @@ invenio_app_rdm/requests_ui/__init__.py,sha256=wc2y0djrYmH9_vUq39P0IWW6R63FVXfKH
94
96
  invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/community-inclusion/index.html,sha256=wcJC7ZG4hznfVEEe_ydmsb1UNNTIWvUbLFhY35k-VQs,389
95
97
  invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/community-invitation/community_dashboard.html,sha256=3soWIke5l4eRAmZw2UeW6wu-AcT6ms4K_9U6DIYxMmw,1153
96
98
  invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/community-invitation/user_dashboard.html,sha256=ppUbbIROa_zED4WFTB6qqRbbJxewzjc6wKDzKhVglak,778
97
- invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/community-submission/index.html,sha256=DxAmmGPtZxhWnnzSOzOFsnyfeTANbrz9pAtHavuAlRA,3446
99
+ invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/community-submission/index.html,sha256=nJIHevyCGQua_H67IV0mnFiQjNjcQYsZTieQgvP48JY,3452
98
100
  invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/guest-access-request/index.html,sha256=Ywy6XPMdtWBxMN8guLfO59v8UzjdT2VolNYHAVM50l8,1958
99
101
  invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/macros/request_header.html,sha256=Iado6BmcFFswmvQ9IrdtgSyAzJr5AIT2BP2IDg-B-8U,2695
100
102
  invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/subcommunity/index.html,sha256=eEYjTnVL-L30Dm_1LvSNKSx3QEHRoxMGHLupvu_1nMM,1453
101
103
  invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/subcommunity-invitation/index.html,sha256=347Saf8Fv78uevCbK2nFiOtNFUT0QyZSZS7lgoNzHdQ,1448
102
104
  invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/user-access-request/index.html,sha256=ltSP9sYPnpmCKMDYpZYU25Wxr3Dfqe2RNDxm6bVjX_I,1779
103
105
  invenio_app_rdm/requests_ui/views/__init__.py,sha256=7QiAyRq8Eu84IXwjzxK63vNeTZnowZ5P85xtw7XgRjs,397
104
- invenio_app_rdm/requests_ui/views/requests.py,sha256=Ww3ewDciAvcrheOwtirS6Qewj21FQ8R1b42Og0_r_3w,16149
106
+ invenio_app_rdm/requests_ui/views/requests.py,sha256=kcjeTAsXYJTHQZiLUFkX2UI6EisJrdZQFcP0PnRm5do,16235
105
107
  invenio_app_rdm/requests_ui/views/ui.py,sha256=DBysYQa__gOCg-pikO6HmoVLmRmMAVWeTBiYhPa7PmA,2359
106
108
  invenio_app_rdm/theme/__init__.py,sha256=QbkxNjjOmGKRlie96HfTXgnFeVQjOX0GdiZnHP7pIhs,277
107
- invenio_app_rdm/theme/views.py,sha256=Ucn6o7mF8qR7gtOeliKC73gIBhy5LgY65rvteC1Uiog,4312
109
+ invenio_app_rdm/theme/views.py,sha256=mrcxejY9PlYwEqh8f0ojKX4CtmD9jz4f9rU-5aLZszU,4457
108
110
  invenio_app_rdm/theme/webpack.py,sha256=aPWl26SIJApTCN9IESlUwbCXNaUC5yAoGJFSC-omOwk,5247
109
111
  invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/theme.js,sha256=EBda1oklPz8u6cDz5fHU8EeDjUqyNMzOL8Quik-lCks,4592
110
112
  invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/utils.js,sha256=oTCQkmr7j6FwVsOfM6hsKrPHfadW7m9IurrqYVDgxDw,3628
@@ -347,7 +349,6 @@ invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/z
347
349
  invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_TW/translations.json,sha256=2-PuJiIAPYQhYFP3pMWEFLAkHGecuT40_Qm33dtm2Xk,9377
348
350
  invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/scripts/compileCatalog.js,sha256=O1G3n8drTU_MaMxfHmvwnPXWKbb5-9oSD_vdCocck1I,1216
349
351
  invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/scripts/initCatalog.js,sha256=PKt4RTa29L53rjB_hZnEHahZA4YprWDtWq4nlO7Z0p0,728
350
- invenio_app_rdm/theme/static/robots.txt,sha256=aBc1Jm1Y4Tgbl2oCaK-12akWEkeXexCjSLTjB6yiuHM,205
351
352
  invenio_app_rdm/theme/static/icons/licenses/cc-by-icon.svg,sha256=Aogts2TDR_M090vHNBA2UhEDu79cdTPyjnoNmeDxFII,9719
352
353
  invenio_app_rdm/theme/static/icons/licenses/cc-by-nc-eu-icon.svg,sha256=rJQn1RpDLLHUjVXs3nsxfduzOta1HZ1hBAhtNsvLtcU,15478
353
354
  invenio_app_rdm/theme/static/icons/licenses/cc-by-nc-icon.svg,sha256=65P9CKCvlT-AL8a1mkf1ugPBnQqyBVpDBgiSg20fa8w,15083
@@ -380,6 +381,7 @@ invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/intro_section.html,s
380
381
  invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/javascript.html,sha256=20O9okaOd_bqpBbuq9K0zqY0UUNXaFVKIslgPArs67U,364
381
382
  invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/page.html,sha256=zwIZmRWIJpz9UQpEqM3oTaSzlmek6tdP8VDR1Mugka0,951
382
383
  invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/page_cover.html,sha256=D-NNfCX38wRjHOq1kzPPncKKUd0b9U1al-NMy48dKvU,357
384
+ invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/robots.txt,sha256=KlcyEFTFpgcsDnKNoFTWM2U5uNchvsYJtoS0PsMAG9M,315
383
385
  invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/searchbar.html,sha256=tvzez_2CE86wl_lipD44MD1swZcZw5uYqXEvvPMkBIo,2222
384
386
  invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/site_footer.html,sha256=C0xluZe7KCkvRKeeMIt6P8v_EfWyuMCQ_JQvlI0M9Xw,1037
385
387
  invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/files_integrity_report/email/files_integrity_report.html,sha256=mwbLrf2xabxq0dLQzUNWGHeYVoySo9GaaydT-FKC9g8,1237
@@ -477,9 +479,9 @@ invenio_app_rdm/users_ui/views/__init__.py,sha256=SMdY2NJj9GICfr3Xuok7qdNYVtA2bJ
477
479
  invenio_app_rdm/users_ui/views/dashboard.py,sha256=iUn2PrODAwb8ugmMosJKAjPhUzjCiWiAWoXQr9RUFuc,1793
478
480
  invenio_app_rdm/users_ui/views/ui.py,sha256=W_eXM8dLVIrNHQB2UEh37C9BYoHauft6RyvcDNFHovA,1742
479
481
  invenio_app_rdm/utils/files.py,sha256=CruDyO2gDVadSlWEJD-WHpWHeOQ0juh-Ei9jz3D9yjc,3923
480
- invenio_app_rdm-13.0.0b3.dev16.dist-info/licenses/LICENSE,sha256=AZXFHRrZa5s4m9DV7zZr4bPGTMUvcEPCodeV_AmFI8k,1204
482
+ invenio_app_rdm-13.0.0b3.dev18.dist-info/licenses/LICENSE,sha256=AZXFHRrZa5s4m9DV7zZr4bPGTMUvcEPCodeV_AmFI8k,1204
481
483
  tests/__init__.py,sha256=yKVf0yYRuxmXvyAtLjmfpHGVCsEkZOhs_FojAAM_w-8,244
482
- tests/conftest.py,sha256=FQ_aSBxGo0gNfV64RJ117GcmgjVbZKwpxF9_3VNdNJY,7931
484
+ tests/conftest.py,sha256=kxOf2CiULBuE9m-ncNv4AtofUVx7iSnvVljlsdI_iCE,11507
483
485
  tests/test_tasks.py,sha256=YAf2mryFK6Vfzk2053XLBA2e92vbNCTWqJ6ThWhGOuQ,6645
484
486
  tests/test_utils.py,sha256=nvj59DibjRZgLzwnch83tyCw9R1DEuDSQhU7v7mEOT0,1897
485
487
  tests/test_version.py,sha256=c_ayM-WLlD0Q6z939sBnFpMTY160TmFg-9-hGsPa7FE,410
@@ -503,16 +505,17 @@ tests/redirector/__init__.py,sha256=yKVf0yYRuxmXvyAtLjmfpHGVCsEkZOhs_FojAAM_w-8,
503
505
  tests/redirector/conftest.py,sha256=KAbp0R8tgGoNvMr8mJ1G2AZX6PzLw-PChtbucrLn5_o,1676
504
506
  tests/redirector/test_redirector.py,sha256=iATYglIw3QSoUKpspQCAM4SaG_WmzjL7r1Nmew_KlGY,1002
505
507
  tests/ui/__init__.py,sha256=yKVf0yYRuxmXvyAtLjmfpHGVCsEkZOhs_FojAAM_w-8,244
506
- tests/ui/conftest.py,sha256=3Msw0lfBoboQ7X-oZv_wGN7UF6StUpHPRVzRvbjhpoI,3472
508
+ tests/ui/conftest.py,sha256=Yx6_wQtAaPG3dll4UtxxN37nEr87Y_8kos8TzrijHbw,3380
507
509
  tests/ui/test_deposits.py,sha256=BehQzo1r3_f4Uc9jcXRddd9bS5GfQ3jRRYOM0AMbi3w,3792
508
510
  tests/ui/test_export_formats.py,sha256=pCXJCTp9ykEWb2oB-ynGjQDhFaVsOs31ym0stwfWCaQ,909
509
511
  tests/ui/test_file_download.py,sha256=o4JHkFyJxZDaQ5NHRZR_PV98jS9UtklbOZPpduzwWKw,2436
510
512
  tests/ui/test_filters.py,sha256=Q90wsJffjMVir7wNX8taGf2KZleLtPbXZXHLTkBpzLA,284
513
+ tests/ui/test_robotstxt.py,sha256=Gn0bVPJTDRQH6DO5GGZyD6iMel1UxWRHP5MnGQZ0j18,1138
511
514
  tests/ui/test_signposting_ui.py,sha256=KCSjQlMD2VKlwQCyZYDwYjtVNL35x3u-ZC4ceD5y21w,3847
512
- tests/ui/test_static.py,sha256=vO3OQAOhrQESJifnQfM1pw7JYz3J874O8BAb7Cc_PPA,868
515
+ tests/ui/test_sitemaps.py,sha256=hPeGbo9v5Q55swr-ZyudAVYm7aJ6lCKV51Vtupk450Q,3180
513
516
  tests/ui/test_stats_ui.py,sha256=LHa_0hjvpYvliSk_jknWy-90CO82jVElUfK5Ua_ZmfA,3554
514
- invenio_app_rdm-13.0.0b3.dev16.dist-info/METADATA,sha256=GPwRcGyrnNnAk7WI6gYPFpXqf-JAehp4aYogAtzKmsY,14216
515
- invenio_app_rdm-13.0.0b3.dev16.dist-info/WHEEL,sha256=egKm5cKfE6OqlHwodY8Jjp4yqZDBXgsj09UsV5ojd_U,109
516
- invenio_app_rdm-13.0.0b3.dev16.dist-info/entry_points.txt,sha256=rfzEeOEdtGy99NlpWzeW-32CoO5XrEpBvlZwLD2Th88,2158
517
- invenio_app_rdm-13.0.0b3.dev16.dist-info/top_level.txt,sha256=NqTqrntInEAci7EXcNBvouXFMqwyjVQhEI0b7izYRBY,22
518
- invenio_app_rdm-13.0.0b3.dev16.dist-info/RECORD,,
517
+ invenio_app_rdm-13.0.0b3.dev18.dist-info/METADATA,sha256=2SLNGl2lJ-3siWYEeFYCbCrmWOjTNWgjbFXupmtuKys,14632
518
+ invenio_app_rdm-13.0.0b3.dev18.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
519
+ invenio_app_rdm-13.0.0b3.dev18.dist-info/entry_points.txt,sha256=rfzEeOEdtGy99NlpWzeW-32CoO5XrEpBvlZwLD2Th88,2158
520
+ invenio_app_rdm-13.0.0b3.dev18.dist-info/top_level.txt,sha256=NqTqrntInEAci7EXcNBvouXFMqwyjVQhEI0b7izYRBY,22
521
+ invenio_app_rdm-13.0.0b3.dev18.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.8.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any
tests/conftest.py CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  # Copyright (C) 2019-2025 CERN.
4
- # Copyright (C) 2019-2021 Northwestern University.
4
+ # Copyright (C) 2019-2025 Northwestern University.
5
5
  # Copyright (C) 2024-2025 Graz University of Technology.
6
6
  #
7
7
  # Invenio App RDM is free software; you can redistribute it and/or modify it
@@ -9,6 +9,9 @@
9
9
 
10
10
  """Common pytest fixtures and plugins."""
11
11
 
12
+ import copy
13
+ from collections import namedtuple
14
+
12
15
  # Monkey patch Werkzeug 2.1
13
16
  # Flask-Login uses the safe_str_cmp method which has been removed in Werkzeug
14
17
  # 2.1. Flask-Login v0.6.0 (yet to be released at the time of writing) fixes the
@@ -27,8 +30,6 @@ except AttributeError:
27
30
 
28
31
  security.safe_str_cmp = hmac.compare_digest
29
32
 
30
- from collections import namedtuple
31
-
32
33
  import pytest
33
34
  from flask_security import login_user
34
35
  from flask_security.utils import hash_password
@@ -67,6 +68,12 @@ def subjects_service(app):
67
68
  return current_service_registry.get("subjects")
68
69
 
69
70
 
71
+ @pytest.fixture(scope="module")
72
+ def records_service(app):
73
+ """Records service."""
74
+ return current_service_registry.get("records")
75
+
76
+
70
77
  pytest_plugins = ("celery.contrib.pytest",)
71
78
 
72
79
 
@@ -168,10 +175,16 @@ def client_with_login(client, users):
168
175
  return client
169
176
 
170
177
 
178
+ def create_vocabulary_type(id_, pid_type):
179
+ """Create vocabulary type."""
180
+ vocabulary_service = current_service_registry.get("vocabularies")
181
+ return vocabulary_service.create_type(system_identity, id_, pid_type)
182
+
183
+
171
184
  @pytest.fixture(scope="module")
172
185
  def resource_type_type(app):
173
186
  """Resource type vocabulary type."""
174
- return vocabulary_service.create_type(system_identity, "resourcetypes", "rsrct")
187
+ return create_vocabulary_type("resourcetypes", "rsrct")
175
188
 
176
189
 
177
190
  @pytest.fixture(scope="module")
@@ -207,7 +220,7 @@ def resource_type_item(app, resource_type_type):
207
220
  @pytest.fixture(scope="module")
208
221
  def languages_type(app):
209
222
  """Language vocabulary type."""
210
- return vocabulary_service.create_type(system_identity, "languages", "lng")
223
+ return create_vocabulary_type("languages", "lng")
211
224
 
212
225
 
213
226
  @pytest.fixture(scope="module")
@@ -260,13 +273,118 @@ def subject_item(app, subjects_mesh_scheme, subjects_service):
260
273
  return subj
261
274
 
262
275
 
276
+ @pytest.fixture(scope="module")
277
+ def communitytypes_type(app):
278
+ """Creates and retrieves a vocabulary type."""
279
+ return create_vocabulary_type("communitytypes", "comtyp")
280
+
281
+
282
+ @pytest.fixture(scope="module")
283
+ def communitytypes(communitytypes_type):
284
+ """Community types."""
285
+ vocabulary_service = current_service_registry.get("vocabularies")
286
+ type_dicts = [
287
+ {"id": "organization", "title": {"en": "Organization"}},
288
+ {"id": "event", "title": {"en": "Event"}},
289
+ {"id": "topic", "title": {"en": "Topic"}},
290
+ {"id": "project", "title": {"en": "Project"}},
291
+ ]
292
+ [t.update({"type": "communitytypes"}) for t in type_dicts]
293
+ types = [
294
+ vocabulary_service.create(identity=system_identity, data=t) for t in type_dicts
295
+ ]
296
+ vocabulary_service.indexer.refresh()
297
+ return types
298
+
299
+
300
+ @pytest.fixture()
301
+ def community_input():
302
+ """Community input dict."""
303
+ return {
304
+ "access": {
305
+ "visibility": "public",
306
+ "member_policy": "open",
307
+ "record_policy": "open",
308
+ },
309
+ "slug": "my_community_id",
310
+ "metadata": {
311
+ "title": "My Community",
312
+ # "description": "This is an example Community.",
313
+ "type": {"id": "event"},
314
+ # "curation_policy": "This is the kind of records we accept.",
315
+ # "website": "https://inveniosoftware.org/",
316
+ },
317
+ }
318
+
319
+
263
320
  RunningApp = namedtuple(
264
321
  "RunningApp",
265
- ["app", "location", "resource_type_item", "language_item", "subject_item"],
322
+ [
323
+ "app",
324
+ "location",
325
+ "resource_type_item",
326
+ "language_item",
327
+ "subject_item",
328
+ "communitytypes",
329
+ ],
266
330
  )
267
331
 
268
332
 
269
333
  @pytest.fixture
270
- def running_app(app, location, resource_type_item, language_item, subject_item):
334
+ def running_app(
335
+ app, location, resource_type_item, language_item, subject_item, communitytypes
336
+ ):
271
337
  """Fixture mimicking a running app."""
272
- return RunningApp(app, location, resource_type_item, language_item, subject_item)
338
+ return RunningApp(
339
+ app, location, resource_type_item, language_item, subject_item, communitytypes
340
+ )
341
+
342
+
343
+ @pytest.fixture()
344
+ def create_record(running_app, minimal_record, records_service):
345
+ """Record creation and publication function fixture."""
346
+ files_service = records_service.draft_files
347
+
348
+ def _create_record(identity=None, data=minimal_record, files=None):
349
+ """Create and publish an RDMRecord.
350
+
351
+ Optionally assign it files.
352
+ """
353
+ idty = identity or system_identity
354
+ data_copy = copy.deepcopy(data)
355
+ if files:
356
+ data_copy["files"] = {"enabled": True}
357
+
358
+ draft_data = records_service.create(idty, data_copy)._record
359
+ pid_value_of_draft = draft_data.pid.pid_value
360
+ if files:
361
+ files_service.init_files(idty, pid_value_of_draft, [f.data for f in files])
362
+ for f in files:
363
+ files_service.set_file_content(
364
+ idty,
365
+ id_=pid_value_of_draft,
366
+ file_key=f.data["key"],
367
+ stream=f.content,
368
+ content_length=f.content.getbuffer().nbytes,
369
+ )
370
+ files_service.commit_file(
371
+ idty, id_=pid_value_of_draft, file_key=f.data["key"]
372
+ )
373
+
374
+ record_result = records_service.publish(idty, id_=pid_value_of_draft)
375
+ return record_result
376
+
377
+ return _create_record
378
+
379
+
380
+ @pytest.fixture()
381
+ def create_community(running_app, community_input):
382
+ """Community creation function fixture."""
383
+ community_service = current_service_registry.get("communities")
384
+
385
+ def _create_community(identity=None, data=community_input):
386
+ """Create a community."""
387
+ idty = identity or system_identity
388
+ return community_service.create(idty, data)
389
+
390
+ return _create_community
tests/ui/conftest.py CHANGED
@@ -20,7 +20,7 @@ from flask_webpackext.manifest import (
20
20
  )
21
21
  from invenio_access.permissions import any_user, authenticated_user, system_identity
22
22
  from invenio_app.factory import create_ui
23
- from invenio_rdm_records.proxies import current_rdm_records
23
+ from invenio_rdm_records.proxies import current_rdm_records_service
24
24
  from invenio_search import current_search
25
25
 
26
26
 
@@ -67,11 +67,9 @@ def index_templates(running_app):
67
67
 
68
68
 
69
69
  @pytest.fixture()
70
- def record(running_app, minimal_record):
70
+ def record(running_app, minimal_record, create_record):
71
71
  """Create and publish a record."""
72
- s = current_rdm_records.records_service
73
- draft = s.create(system_identity, minimal_record)
74
- return s.publish(system_identity, draft.id)
72
+ return create_record(data=minimal_record)
75
73
 
76
74
 
77
75
  @pytest.fixture()
@@ -83,7 +81,7 @@ def draft_with_file(running_app, minimal_record, users):
83
81
  user_identity = Identity(users["user1"].id)
84
82
  user_identity.provides.add(any_user)
85
83
  user_identity.provides.add(authenticated_user)
86
- record_service = current_rdm_records.records_service
84
+ record_service = current_rdm_records_service
87
85
  file_service = record_service.draft_files
88
86
 
89
87
  draft = record_service.create(user_identity, minimal_record)
@@ -95,7 +93,7 @@ def draft_with_file(running_app, minimal_record, users):
95
93
  "metadata": {
96
94
  "description": "Published article PDF.",
97
95
  },
98
- }
96
+ },
99
97
  ]
100
98
  file_service.init_files(system_identity, draft.id, file_to_initialise)
101
99
  content = BytesIO(b"test file content")
@@ -113,5 +111,5 @@ def draft_with_file(running_app, minimal_record, users):
113
111
  @pytest.fixture()
114
112
  def record_with_file(draft_with_file):
115
113
  """Create and publish a record with file."""
116
- record_service = current_rdm_records.records_service
114
+ record_service = current_rdm_records_service
117
115
  return record_service.publish(system_identity, draft_with_file.id)
@@ -0,0 +1,35 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Copyright (C) 2022 CERN.
4
+ # Copyright (C) 2025 Northwestern University.
5
+ #
6
+ # Invenio-RDM is free software; you can redistribute it and/or modify
7
+ # it under the terms of the MIT License; see LICENSE file for more details.
8
+
9
+ import pytest
10
+ from invenio_cache import current_cache
11
+ from invenio_sitemap import SitemapIndexCache
12
+
13
+
14
+ @pytest.fixture
15
+ def cache_for_sitemap_index(app):
16
+ """Primed cache with a sitemap index entry."""
17
+ try:
18
+ cache = SitemapIndexCache(current_cache)
19
+ cache.delete_included_and_higher(0)
20
+ cache.set(0, "unimportant data")
21
+ yield cache
22
+ finally:
23
+ cache.delete_included_and_higher(0)
24
+
25
+
26
+ def test_robotstxt(app, client, cache_for_sitemap_index):
27
+ """Check if robots.txt returns a string response."""
28
+ response = client.get("/robots.txt")
29
+
30
+ assert 200 == response.status_code
31
+ assert type(response.text) == str
32
+ assert "Disallow: /search" in response.text
33
+ assert "Disallow: /api" in response.text
34
+ assert "Disallow: /administration" in response.text
35
+ assert "Sitemap: https://127.0.0.1:5000/sitemap_index_0.xml" in response.text
@@ -0,0 +1,85 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Copyright (C) 2025 Northwestern University.
4
+ #
5
+ # Invenio-App-RDM is free software; you can redistribute it and/or modify
6
+ # it under the terms of the MIT License; see LICENSE file for more details.
7
+
8
+ """Test sitemaps."""
9
+
10
+ import datetime
11
+
12
+ import time_machine
13
+ from invenio_communities.proxies import current_communities
14
+
15
+ from invenio_app_rdm.communities_ui.sitemap import SitemapSectionOfCommunities
16
+ from invenio_app_rdm.records_ui.sitemap import SitemapSectionOfRDMRecords
17
+
18
+
19
+ def test_sitemap_section_of_communities(running_app, community_input, create_community):
20
+ # by default converted to UTC w/ time 00:00:00
21
+ with time_machine.travel(datetime.date(2025, 3, 27)):
22
+ community_input["slug"] = "my-test-community-1"
23
+ c1 = create_community(data=community_input)
24
+ community_input["slug"] = "my-test-community-2"
25
+ community_input["access"]["visibility"] = "restricted"
26
+ c2 = create_community(data=community_input)
27
+ with time_machine.travel(datetime.date(2025, 3, 28)):
28
+ community_input["slug"] = "my-test-community-3"
29
+ community_input["access"]["visibility"] = "public"
30
+ community_input["metadata"]["page"] = "A page to be indexed."
31
+ c3 = create_community(data=community_input)
32
+
33
+ current_communities.service.indexer.refresh() # index in search engine
34
+ section = SitemapSectionOfCommunities()
35
+
36
+ entries = [section.to_dict(entity) for entity in section.iter_entities()]
37
+
38
+ expected_entries = [
39
+ {
40
+ "loc": "https://127.0.0.1:5000/communities/my-test-community-3/records",
41
+ "lastmod": "2025-03-28T00:00:00Z",
42
+ },
43
+ {
44
+ "loc": "https://127.0.0.1:5000/communities/my-test-community-3/about",
45
+ "lastmod": "2025-03-28T00:00:00Z",
46
+ },
47
+ {
48
+ "loc": "https://127.0.0.1:5000/communities/my-test-community-1/records",
49
+ "lastmod": "2025-03-27T00:00:00Z",
50
+ },
51
+ ]
52
+ assert expected_entries == entries
53
+
54
+
55
+ def test_sitemap_section_of_records(
56
+ running_app, minimal_record, create_record, records_service
57
+ ):
58
+ # by default converted to UTC w/ time 00:00:00
59
+ with time_machine.travel(datetime.date(2025, 3, 27)):
60
+ minimal_record["title"] = "my-test-record-1"
61
+ r1 = create_record(data=minimal_record)
62
+ minimal_record["title"] = "my-test-record-2"
63
+ minimal_record["access"]["record"] = "restricted"
64
+ r2 = create_record(data=minimal_record)
65
+ with time_machine.travel(datetime.date(2025, 3, 28)):
66
+ minimal_record["title"] = "my-test-record-3"
67
+ minimal_record["access"]["record"] = "public"
68
+ r3 = create_record(data=minimal_record)
69
+
70
+ records_service.indexer.refresh()
71
+ section = SitemapSectionOfRDMRecords()
72
+
73
+ entries = [section.to_dict(entity) for entity in section.iter_entities()]
74
+
75
+ expected_entries = [
76
+ {
77
+ "loc": f"https://127.0.0.1:5000/records/{r3.id}",
78
+ "lastmod": "2025-03-28T00:00:00Z",
79
+ },
80
+ {
81
+ "loc": f"https://127.0.0.1:5000/records/{r1.id}",
82
+ "lastmod": "2025-03-27T00:00:00Z",
83
+ },
84
+ ]
85
+ assert expected_entries == entries
tests/ui/test_static.py DELETED
@@ -1,25 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # Copyright (C) 2022 CERN.
4
- #
5
- # Invenio-RDM is free software; you can redistribute it and/or modify
6
- # it under the terms of the MIT License; see LICENSE file for more details.
7
-
8
-
9
- def test_static(app, client, es_clear):
10
- """Check if robots.txt returns a string response."""
11
-
12
- # Save the current static folder to revert after finishing the test.
13
- app_static_folder = app.static_folder
14
- # Use as static folder the one of the blueprint we are testing.
15
- app.static_folder = app.blueprints["invenio_app_rdm"].static_folder
16
-
17
- response = client.get("/robots.txt")
18
-
19
- assert response.status_code == 200
20
- assert type(response.text) == str
21
- assert "Disallow: /search" in response.text
22
- assert "Disallow: /api" in response.text
23
- assert "Disallow: /administration" in response.text
24
-
25
- app.static_folder = app_static_folder