[#855] 3) request flow backend start #2738
Annotations
32 errors and 12 warnings
Tests (3.11, postgresql14, opensearch2):
invenio_communities/generators.py#L1
Black format check
--- /home/runner/work/invenio-communities/invenio-communities/invenio_communities/generators.py 2024-05-02 19:39:29.265733+00:00
+++ /home/runner/work/invenio-communities/invenio-communities/invenio_communities/generators.py 2024-05-02 19:41:55.571163+00:00
@@ -199,10 +199,11 @@
#
# Community membership generators
#
+
class AuthenticatedButNotCommunityMembers(Generator):
"""Authenticated user not part of community."""
def needs(self, record=None, **kwargs):
"""Required needs."""
@@ -217,10 +218,11 @@
"""
if not record:
return []
community_id = str(record.id)
return [CommunityRoleNeed(community_id, r.name) for r in current_roles]
+
class CommunityRoles(Generator):
"""Base class for community roles generators."""
def roles(self, **kwargs):
|
Tests (3.11, postgresql14, opensearch2):
invenio_communities/permissions.py#L1
Black format check
--- /home/runner/work/invenio-communities/invenio-communities/invenio_communities/permissions.py 2024-05-02 19:39:29.265733+00:00
+++ /home/runner/work/invenio-communities/invenio-communities/invenio_communities/permissions.py 2024-05-02 19:41:55.948431+00:00
@@ -191,16 +191,17 @@
"COMMUNITIES_ALLOW_MEMBERSHIP_REQUESTS",
then_=[
IfPolicyClosed(
"member_policy",
then_=[Disable()],
- else_=[AuthenticatedButNotCommunityMembers()]
+ else_=[AuthenticatedButNotCommunityMembers()],
)
],
- else_=[Disable()]
- ),
- ]
+ else_=[Disable()],
+ ),
+ ]
+
def can_perform_action(community, context):
"""Check if the given action is available on the request."""
action = context.get("action")
identity = context.get("identity")
|
Tests (3.11, postgresql14, opensearch2):
invenio_communities/members/services/service.py#L1
pydocstyle-check
/home/runner/work/invenio-communities/invenio-communities/invenio_communities/members/services/service.py:829 in public method `update_membership_request`:
D102: Missing docstring in public method
/home/runner/work/invenio-communities/invenio-communities/invenio_communities/members/services/service.py:833 in public method `search_membership_requests`:
D102: Missing docstring in public method
/home/runner/work/invenio-communities/invenio-communities/invenio_communities/members/services/service.py:838 in public method `accept_membership_request`:
D102: Missing docstring in public method
/home/runner/work/invenio-communities/invenio-communities/invenio_communities/members/services/service.py:843 in public method `decline_membership_request`:
D102: Missing docstring in public method
|
Tests (3.11, postgresql14, opensearch2):
tests/members/test_members_resource.py#L1
Black format check
--- /home/runner/work/invenio-communities/invenio-communities/tests/members/test_members_resource.py 2024-05-02 19:39:29.273733+00:00
+++ /home/runner/work/invenio-communities/invenio-communities/tests/members/test_members_resource.py 2024-05-02 19:43:58.285961+00:00
@@ -361,10 +361,11 @@
#
# Membership request
#
+
# The `new_user`` module fixture leaks identity across tests, so a pure new user for
# each following test is the way to go.
@pytest.fixture()
def create_user(UserFixture, app, db):
@@ -430,19 +431,23 @@
# Check the timeline
r = client.get(url_of_timeline, headers=headers)
assert 200 == r.status_code
assert 1 == r.json["hits"]["total"]
msg = r.json["hits"]["hits"][0]["payload"]["content"]
- assert 'Can I join the club?' == msg
-
-
-def test_put_membership_requests(client, headers, community_id, owner, new_user_data, db):
+ assert "Can I join the club?" == msg
+
+
+def test_put_membership_requests(
+ client, headers, community_id, owner, new_user_data, db
+):
# update membership request
assert False
-def test_error_handling_for_membership_requests(client, headers, community_id, owner, new_user_data, db):
+def test_error_handling_for_membership_requests(
+ client, headers, community_id, owner, new_user_data, db
+):
# error handling registered
# - permission handling registered
# - duplicate handling registered
assert False
|
Tests (3.11, postgresql14, opensearch2):
tests/members/test_members_resource.py#L414
test_post_membership_requests
assert 201 == 403
+ where 403 = <WrapperTestResponse streamed [403 FORBIDDEN]>.status_code
|
Tests (3.11, postgresql14, opensearch2):
tests/members/test_members_resource.py#L440
test_put_membership_requests
assert False
|
Tests (3.11, postgresql14, opensearch2):
tests/members/test_members_resource.py#L447
test_error_handling_for_membership_requests
assert False
|
Tests (3.11, postgresql14, opensearch2)
Process completed with exit code 1.
|
Tests (3.9, postgresql14, opensearch2):
invenio_communities/generators.py#L1
Black format check
--- /home/runner/work/invenio-communities/invenio-communities/invenio_communities/generators.py 2024-05-02 19:39:31.885326+00:00
+++ /home/runner/work/invenio-communities/invenio-communities/invenio_communities/generators.py 2024-05-02 19:41:43.107573+00:00
@@ -199,10 +199,11 @@
#
# Community membership generators
#
+
class AuthenticatedButNotCommunityMembers(Generator):
"""Authenticated user not part of community."""
def needs(self, record=None, **kwargs):
"""Required needs."""
@@ -217,10 +218,11 @@
"""
if not record:
return []
community_id = str(record.id)
return [CommunityRoleNeed(community_id, r.name) for r in current_roles]
+
class CommunityRoles(Generator):
"""Base class for community roles generators."""
def roles(self, **kwargs):
|
Tests (3.9, postgresql14, opensearch2):
invenio_communities/permissions.py#L1
Black format check
--- /home/runner/work/invenio-communities/invenio-communities/invenio_communities/permissions.py 2024-05-02 19:39:31.885326+00:00
+++ /home/runner/work/invenio-communities/invenio-communities/invenio_communities/permissions.py 2024-05-02 19:41:43.444058+00:00
@@ -191,16 +191,17 @@
"COMMUNITIES_ALLOW_MEMBERSHIP_REQUESTS",
then_=[
IfPolicyClosed(
"member_policy",
then_=[Disable()],
- else_=[AuthenticatedButNotCommunityMembers()]
+ else_=[AuthenticatedButNotCommunityMembers()],
)
],
- else_=[Disable()]
- ),
- ]
+ else_=[Disable()],
+ ),
+ ]
+
def can_perform_action(community, context):
"""Check if the given action is available on the request."""
action = context.get("action")
identity = context.get("identity")
|
Tests (3.9, postgresql14, opensearch2):
invenio_communities/members/services/service.py#L1
pydocstyle-check
/home/runner/work/invenio-communities/invenio-communities/invenio_communities/members/services/service.py:829 in public method `update_membership_request`:
D102: Missing docstring in public method
/home/runner/work/invenio-communities/invenio-communities/invenio_communities/members/services/service.py:833 in public method `search_membership_requests`:
D102: Missing docstring in public method
/home/runner/work/invenio-communities/invenio-communities/invenio_communities/members/services/service.py:838 in public method `accept_membership_request`:
D102: Missing docstring in public method
/home/runner/work/invenio-communities/invenio-communities/invenio_communities/members/services/service.py:843 in public method `decline_membership_request`:
D102: Missing docstring in public method
|
Tests (3.9, postgresql14, opensearch2):
tests/members/test_members_resource.py#L1
Black format check
--- /home/runner/work/invenio-communities/invenio-communities/tests/members/test_members_resource.py 2024-05-02 19:39:31.893326+00:00
+++ /home/runner/work/invenio-communities/invenio-communities/tests/members/test_members_resource.py 2024-05-02 19:43:59.302066+00:00
@@ -361,10 +361,11 @@
#
# Membership request
#
+
# The `new_user`` module fixture leaks identity across tests, so a pure new user for
# each following test is the way to go.
@pytest.fixture()
def create_user(UserFixture, app, db):
@@ -430,19 +431,23 @@
# Check the timeline
r = client.get(url_of_timeline, headers=headers)
assert 200 == r.status_code
assert 1 == r.json["hits"]["total"]
msg = r.json["hits"]["hits"][0]["payload"]["content"]
- assert 'Can I join the club?' == msg
-
-
-def test_put_membership_requests(client, headers, community_id, owner, new_user_data, db):
+ assert "Can I join the club?" == msg
+
+
+def test_put_membership_requests(
+ client, headers, community_id, owner, new_user_data, db
+):
# update membership request
assert False
-def test_error_handling_for_membership_requests(client, headers, community_id, owner, new_user_data, db):
+def test_error_handling_for_membership_requests(
+ client, headers, community_id, owner, new_user_data, db
+):
# error handling registered
# - permission handling registered
# - duplicate handling registered
assert False
|
Tests (3.9, postgresql14, opensearch2):
tests/members/test_members_resource.py#L414
test_post_membership_requests
assert 201 == 403
+ where 403 = <WrapperTestResponse streamed [403 FORBIDDEN]>.status_code
|
Tests (3.9, postgresql14, opensearch2):
tests/members/test_members_resource.py#L440
test_put_membership_requests
assert False
|
Tests (3.9, postgresql14, opensearch2):
tests/members/test_members_resource.py#L447
test_error_handling_for_membership_requests
assert False
|
Tests (3.9, postgresql14, opensearch2)
Process completed with exit code 1.
|
Tests (3.10, postgresql14, opensearch2):
invenio_communities/generators.py#L1
Black format check
--- /home/runner/work/invenio-communities/invenio-communities/invenio_communities/generators.py 2024-05-02 19:39:29.946485+00:00
+++ /home/runner/work/invenio-communities/invenio-communities/invenio_communities/generators.py 2024-05-02 19:42:06.222073+00:00
@@ -199,10 +199,11 @@
#
# Community membership generators
#
+
class AuthenticatedButNotCommunityMembers(Generator):
"""Authenticated user not part of community."""
def needs(self, record=None, **kwargs):
"""Required needs."""
@@ -217,10 +218,11 @@
"""
if not record:
return []
community_id = str(record.id)
return [CommunityRoleNeed(community_id, r.name) for r in current_roles]
+
class CommunityRoles(Generator):
"""Base class for community roles generators."""
def roles(self, **kwargs):
|
Tests (3.10, postgresql14, opensearch2):
invenio_communities/permissions.py#L1
Black format check
--- /home/runner/work/invenio-communities/invenio-communities/invenio_communities/permissions.py 2024-05-02 19:39:29.946485+00:00
+++ /home/runner/work/invenio-communities/invenio-communities/invenio_communities/permissions.py 2024-05-02 19:42:06.556647+00:00
@@ -191,16 +191,17 @@
"COMMUNITIES_ALLOW_MEMBERSHIP_REQUESTS",
then_=[
IfPolicyClosed(
"member_policy",
then_=[Disable()],
- else_=[AuthenticatedButNotCommunityMembers()]
+ else_=[AuthenticatedButNotCommunityMembers()],
)
],
- else_=[Disable()]
- ),
- ]
+ else_=[Disable()],
+ ),
+ ]
+
def can_perform_action(community, context):
"""Check if the given action is available on the request."""
action = context.get("action")
identity = context.get("identity")
|
Tests (3.10, postgresql14, opensearch2):
invenio_communities/members/services/service.py#L1
pydocstyle-check
/home/runner/work/invenio-communities/invenio-communities/invenio_communities/members/services/service.py:829 in public method `update_membership_request`:
D102: Missing docstring in public method
/home/runner/work/invenio-communities/invenio-communities/invenio_communities/members/services/service.py:833 in public method `search_membership_requests`:
D102: Missing docstring in public method
/home/runner/work/invenio-communities/invenio-communities/invenio_communities/members/services/service.py:838 in public method `accept_membership_request`:
D102: Missing docstring in public method
/home/runner/work/invenio-communities/invenio-communities/invenio_communities/members/services/service.py:843 in public method `decline_membership_request`:
D102: Missing docstring in public method
|
Tests (3.10, postgresql14, opensearch2):
tests/members/test_members_resource.py#L1
Black format check
--- /home/runner/work/invenio-communities/invenio-communities/tests/members/test_members_resource.py 2024-05-02 19:39:29.950485+00:00
+++ /home/runner/work/invenio-communities/invenio-communities/tests/members/test_members_resource.py 2024-05-02 19:44:21.974852+00:00
@@ -361,10 +361,11 @@
#
# Membership request
#
+
# The `new_user`` module fixture leaks identity across tests, so a pure new user for
# each following test is the way to go.
@pytest.fixture()
def create_user(UserFixture, app, db):
@@ -430,19 +431,23 @@
# Check the timeline
r = client.get(url_of_timeline, headers=headers)
assert 200 == r.status_code
assert 1 == r.json["hits"]["total"]
msg = r.json["hits"]["hits"][0]["payload"]["content"]
- assert 'Can I join the club?' == msg
-
-
-def test_put_membership_requests(client, headers, community_id, owner, new_user_data, db):
+ assert "Can I join the club?" == msg
+
+
+def test_put_membership_requests(
+ client, headers, community_id, owner, new_user_data, db
+):
# update membership request
assert False
-def test_error_handling_for_membership_requests(client, headers, community_id, owner, new_user_data, db):
+def test_error_handling_for_membership_requests(
+ client, headers, community_id, owner, new_user_data, db
+):
# error handling registered
# - permission handling registered
# - duplicate handling registered
assert False
|
Tests (3.10, postgresql14, opensearch2):
tests/members/test_members_resource.py#L414
test_post_membership_requests
assert 201 == 403
+ where 403 = <WrapperTestResponse streamed [403 FORBIDDEN]>.status_code
|
Tests (3.10, postgresql14, opensearch2):
tests/members/test_members_resource.py#L440
test_put_membership_requests
assert False
|
Tests (3.10, postgresql14, opensearch2):
tests/members/test_members_resource.py#L447
test_error_handling_for_membership_requests
assert False
|
Tests (3.10, postgresql14, opensearch2)
Process completed with exit code 1.
|
Tests (3.12, postgresql14, opensearch2):
invenio_communities/generators.py#L1
Black format check
--- /home/runner/work/invenio-communities/invenio-communities/invenio_communities/generators.py 2024-05-02 19:39:38.477897+00:00
+++ /home/runner/work/invenio-communities/invenio-communities/invenio_communities/generators.py 2024-05-02 19:42:43.930146+00:00
@@ -199,10 +199,11 @@
#
# Community membership generators
#
+
class AuthenticatedButNotCommunityMembers(Generator):
"""Authenticated user not part of community."""
def needs(self, record=None, **kwargs):
"""Required needs."""
@@ -217,10 +218,11 @@
"""
if not record:
return []
community_id = str(record.id)
return [CommunityRoleNeed(community_id, r.name) for r in current_roles]
+
class CommunityRoles(Generator):
"""Base class for community roles generators."""
def roles(self, **kwargs):
|
Tests (3.12, postgresql14, opensearch2):
invenio_communities/permissions.py#L1
Black format check
--- /home/runner/work/invenio-communities/invenio-communities/invenio_communities/permissions.py 2024-05-02 19:39:38.477897+00:00
+++ /home/runner/work/invenio-communities/invenio-communities/invenio_communities/permissions.py 2024-05-02 19:42:44.456078+00:00
@@ -191,16 +191,17 @@
"COMMUNITIES_ALLOW_MEMBERSHIP_REQUESTS",
then_=[
IfPolicyClosed(
"member_policy",
then_=[Disable()],
- else_=[AuthenticatedButNotCommunityMembers()]
+ else_=[AuthenticatedButNotCommunityMembers()],
)
],
- else_=[Disable()]
- ),
- ]
+ else_=[Disable()],
+ ),
+ ]
+
def can_perform_action(community, context):
"""Check if the given action is available on the request."""
action = context.get("action")
identity = context.get("identity")
|
Tests (3.12, postgresql14, opensearch2):
invenio_communities/members/services/service.py#L1
pydocstyle-check
/home/runner/work/invenio-communities/invenio-communities/invenio_communities/members/services/service.py:829 in public method `update_membership_request`:
D102: Missing docstring in public method
/home/runner/work/invenio-communities/invenio-communities/invenio_communities/members/services/service.py:833 in public method `search_membership_requests`:
D102: Missing docstring in public method
/home/runner/work/invenio-communities/invenio-communities/invenio_communities/members/services/service.py:838 in public method `accept_membership_request`:
D102: Missing docstring in public method
/home/runner/work/invenio-communities/invenio-communities/invenio_communities/members/services/service.py:843 in public method `decline_membership_request`:
D102: Missing docstring in public method
|
Tests (3.12, postgresql14, opensearch2):
tests/members/test_members_resource.py#L1
Black format check
--- /home/runner/work/invenio-communities/invenio-communities/tests/members/test_members_resource.py 2024-05-02 19:39:38.485897+00:00
+++ /home/runner/work/invenio-communities/invenio-communities/tests/members/test_members_resource.py 2024-05-02 19:45:15.308485+00:00
@@ -361,10 +361,11 @@
#
# Membership request
#
+
# The `new_user`` module fixture leaks identity across tests, so a pure new user for
# each following test is the way to go.
@pytest.fixture()
def create_user(UserFixture, app, db):
@@ -430,19 +431,23 @@
# Check the timeline
r = client.get(url_of_timeline, headers=headers)
assert 200 == r.status_code
assert 1 == r.json["hits"]["total"]
msg = r.json["hits"]["hits"][0]["payload"]["content"]
- assert 'Can I join the club?' == msg
-
-
-def test_put_membership_requests(client, headers, community_id, owner, new_user_data, db):
+ assert "Can I join the club?" == msg
+
+
+def test_put_membership_requests(
+ client, headers, community_id, owner, new_user_data, db
+):
# update membership request
assert False
-def test_error_handling_for_membership_requests(client, headers, community_id, owner, new_user_data, db):
+def test_error_handling_for_membership_requests(
+ client, headers, community_id, owner, new_user_data, db
+):
# error handling registered
# - permission handling registered
# - duplicate handling registered
assert False
|
Tests (3.12, postgresql14, opensearch2):
tests/members/test_members_resource.py#L414
test_post_membership_requests
assert 201 == 403
+ where 403 = <WrapperTestResponse streamed [403 FORBIDDEN]>.status_code
|
Tests (3.12, postgresql14, opensearch2):
tests/members/test_members_resource.py#L440
test_put_membership_requests
assert False
|
Tests (3.12, postgresql14, opensearch2):
tests/members/test_members_resource.py#L447
test_error_handling_for_membership_requests
assert False
|
Tests (3.12, postgresql14, opensearch2)
Process completed with exit code 1.
|
Tests (3.11, postgresql14, opensearch2)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-node@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Tests (3.11, postgresql14, opensearch2)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/setup-node@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Tests (3.11, postgresql14, opensearch2):
invenio_communities/assets/semantic-ui/js/invenio_communities/administration/components/RecordResourceActions.js#L95
Array.prototype.map() expects a value to be returned at the end of arrow function
|
Tests (3.9, postgresql14, opensearch2)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-node@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Tests (3.9, postgresql14, opensearch2)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/setup-node@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Tests (3.9, postgresql14, opensearch2):
invenio_communities/assets/semantic-ui/js/invenio_communities/administration/components/RecordResourceActions.js#L95
Array.prototype.map() expects a value to be returned at the end of arrow function
|
Tests (3.10, postgresql14, opensearch2)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-node@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Tests (3.10, postgresql14, opensearch2)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/setup-node@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Tests (3.10, postgresql14, opensearch2):
invenio_communities/assets/semantic-ui/js/invenio_communities/administration/components/RecordResourceActions.js#L95
Array.prototype.map() expects a value to be returned at the end of arrow function
|
Tests (3.12, postgresql14, opensearch2)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-node@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Tests (3.12, postgresql14, opensearch2)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/setup-node@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Tests (3.12, postgresql14, opensearch2):
invenio_communities/assets/semantic-ui/js/invenio_communities/administration/components/RecordResourceActions.js#L95
Array.prototype.map() expects a value to be returned at the end of arrow function
|