moderation: added rules for content moderation #2182
Annotations
5 errors
Python (site, 3.9, postgresql14, opensearch2):
site/zenodo_rdm/moderation/components.py#L1
pydocstyle-check
/home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/components.py:1 at module level:
D100: Missing docstring in public module
/home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/components.py:8 in public method `publish`:
D102: Missing docstring in public method
/home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/components.py:18 in public method `create`:
D102: Missing docstring in public method
/home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/components.py:24 in public method `update`:
D102: Missing docstring in public method
|
Python (site, 3.9, postgresql14, opensearch2):
site/zenodo_rdm/moderation/handlers.py#L1
pydocstyle-check
/home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/handlers.py:1 at module level:
D100: Missing docstring in public module
/home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/handlers.py:5 in public class `BaseScoreHandler`:
D101: Missing docstring in public class
/home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/handlers.py:6 in public method `__init__`:
D107: Missing docstring in __init__
/home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/handlers.py:10 in public method `run`:
D102: Missing docstring in public method
/home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/handlers.py:20 in public class `RecordScoreHandler`:
D101: Missing docstring in public class
/home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/handlers.py:21 in public method `__init__`:
D107: Missing docstring in __init__
/home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/handlers.py:25 in public class `CommunityScoreHandler`:
D101: Missing docstring in public class
/home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/handlers.py:26 in public method `__init__`:
D107: Missing docstring in __init__
|
Python (site, 3.9, postgresql14, opensearch2):
site/zenodo_rdm/moderation/handlers.py#L1
Black format check
--- /home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/handlers.py 2024-10-31 08:20:08.760545+00:00
+++ /home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/handlers.py 2024-10-31 08:28:19.103942+00:00
@@ -12,11 +12,13 @@
rules = current_app.config[self.rules]
for rule in rules:
score += rule(identity, draft=draft, record=record)
breakpoint()
- current_app.logger.warning(f"Moderation score for record({record.metadata['title']}): {score}")
+ current_app.logger.warning(
+ f"Moderation score for record({record.metadata['title']}): {score}"
+ )
class RecordScoreHandler(BaseScoreHandler):
def __init__(self, app=None):
super().__init__(app, rules="RDM_RECORD_MODERATION_SCORE_RULES")
|
Python (site, 3.9, postgresql14, opensearch2):
site/zenodo_rdm/moderation/rules.py#L1
pydocstyle-check
/home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/rules.py:1 at module level:
D100: Missing docstring in public module
/home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/rules.py:17 in public class `DomainTree`:
D101: Missing docstring in public class
/home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/rules.py:18 in public method `__init__`:
D107: Missing docstring in __init__
/home/runner/work/zenodo-rdm/zenodo-rdm/site/zenodo_rdm/moderation/rules.py:42 in public method `get_status`:
D400: First line should end with a period (not 'n')
|
Python (site, 3.9, postgresql14, opensearch2)
Process completed with exit code 1.
|