splent-feature-curation 0.2.0__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.
- splent_feature_curation-0.2.0.dist-info/METADATA +95 -0
- splent_feature_curation-0.2.0.dist-info/RECORD +24 -0
- splent_feature_curation-0.2.0.dist-info/WHEEL +5 -0
- splent_feature_curation-0.2.0.dist-info/licenses/COPYING +674 -0
- splent_feature_curation-0.2.0.dist-info/licenses/COPYING.LESSER +165 -0
- splent_feature_curation-0.2.0.dist-info/top_level.txt +1 -0
- splent_io/splent_feature_curation/__init__.py +67 -0
- splent_io/splent_feature_curation/config.py +11 -0
- splent_io/splent_feature_curation/hooks.py +37 -0
- splent_io/splent_feature_curation/migrations/alembic.ini +36 -0
- splent_io/splent_feature_curation/migrations/env.py +9 -0
- splent_io/splent_feature_curation/migrations/script.py.mako +24 -0
- splent_io/splent_feature_curation/migrations/versions/curation0001_requests.py +75 -0
- splent_io/splent_feature_curation/models.py +143 -0
- splent_io/splent_feature_curation/repositories.py +45 -0
- splent_io/splent_feature_curation/reviewer.py +20 -0
- splent_io/splent_feature_curation/routes.py +178 -0
- splent_io/splent_feature_curation/services.py +447 -0
- splent_io/splent_feature_curation/signals.py +24 -0
- splent_io/splent_feature_curation/templates/curation/admin/_dataset_link.html +7 -0
- splent_io/splent_feature_curation/templates/curation/admin/_flashes.html +5 -0
- splent_io/splent_feature_curation/templates/curation/admin/queue.html +79 -0
- splent_io/splent_feature_curation/templates/curation/admin/request.html +113 -0
- splent_io/splent_feature_curation/templates/hooks/withdrawal_request.html +48 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: splent_feature_curation
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: The review queue of a hub: the datasets its policy sends to review before they are published, and the withdrawals their owners ask for
|
|
5
|
+
License-Expression: LGPL-3.0-or-later
|
|
6
|
+
Requires-Python: >=3.13
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: COPYING
|
|
9
|
+
License-File: COPYING.LESSER
|
|
10
|
+
Requires-Dist: splent_framework>=1.30.0
|
|
11
|
+
Dynamic: license-file
|
|
12
|
+
|
|
13
|
+
# splent_feature_curation
|
|
14
|
+
|
|
15
|
+
The review queue of an OpenHubs hub (GV-2): what a curator looks at before
|
|
16
|
+
the hub acts on it.
|
|
17
|
+
|
|
18
|
+
- **Publications.** Where dataset's `DATASET_PUBLISH_POLICY` is `curated`,
|
|
19
|
+
an account curation does not trust sends its dataset to review instead of
|
|
20
|
+
publishing it. It waits, submitted, and nothing reaches the provider until
|
|
21
|
+
a curator approves it; it is then published in the background, through
|
|
22
|
+
the provider its owner chose. A rejection takes it back to a draft its
|
|
23
|
+
owner changes and sends again, and its owner can take it back from review
|
|
24
|
+
too. A dataset waiting for review cannot be changed: what is approved is
|
|
25
|
+
what is published.
|
|
26
|
+
- **Withdrawals.** The owner of a published dataset asks for it to be
|
|
27
|
+
withdrawn from its page (the button fills dataset's `dataset.view.actions`
|
|
28
|
+
slot), saying why. A curator withdraws it (its DOI then
|
|
29
|
+
answers with a tombstone that says why, 451 for a legal reason) or rejects
|
|
30
|
+
the request, and the dataset stays published.
|
|
31
|
+
- **The queue**, under Administration in the panel, for the accounts whose
|
|
32
|
+
role is in `CURATION_REVIEWER_ROLES`, with the count of what waits on its
|
|
33
|
+
menu entry. Every decision carries a note; the owner is mailed it, and the
|
|
34
|
+
reviewers are mailed when something new waits (with the mail feature).
|
|
35
|
+
|
|
36
|
+
curation is the reviewer of dataset's policy: it implements dataset's
|
|
37
|
+
`PublicationReviewer` and registers itself from `init_feature` with
|
|
38
|
+
`register_publication_reviewer`, so a product whose policy is `curated`
|
|
39
|
+
installs it, or it does not start. It changes datasets only through
|
|
40
|
+
dataset's services, and keeps the requests and who decided them in its own
|
|
41
|
+
table, `curation_request`. It requires auth and dataset 0.8.0 or later, and
|
|
42
|
+
mails with the mail feature when the product has it.
|
|
43
|
+
|
|
44
|
+
| Route | |
|
|
45
|
+
|-------|-|
|
|
46
|
+
| `GET /admin/curation` | The queue |
|
|
47
|
+
| `GET /admin/curation/<request_id>` | One request, with the dataset it is about |
|
|
48
|
+
| `POST /admin/curation/<request_id>/approve`, `.../reject` | The curator's decision, with its note |
|
|
49
|
+
| `POST /datasets/<dataset_id>/withdrawal-request` | The owner asks for a withdrawal |
|
|
50
|
+
| `POST /datasets/<dataset_id>/withdrawal-request/cancel` | The owner takes the request back |
|
|
51
|
+
|
|
52
|
+
## Who is trusted
|
|
53
|
+
|
|
54
|
+
`CURATION_TRUSTED_ACCOUNTS` says which accounts publish without review on a
|
|
55
|
+
curated hub:
|
|
56
|
+
|
|
57
|
+
| Value | Trusted |
|
|
58
|
+
|-------|---------|
|
|
59
|
+
| `none` | no account: every publication is reviewed |
|
|
60
|
+
| `published` (default) | an account with a dataset published on the hub |
|
|
61
|
+
| `carried_over` | an account carried over from an older site (auth's `account_origin`) with a dataset published, the history uvlhub 2.12 gave it (D4) |
|
|
62
|
+
|
|
63
|
+
Whatever the value, a curator is trusted, and an account one of whose
|
|
64
|
+
datasets was withdrawn as spam or malware is not. A trusted account still
|
|
65
|
+
confirms its address first, as dataset's `verified` asks.
|
|
66
|
+
|
|
67
|
+
## Parameters
|
|
68
|
+
|
|
69
|
+
All three are typed in `[tool.splent.config_schema]` and of `derivation`
|
|
70
|
+
bind: the product decides them, and an environment that changes them is
|
|
71
|
+
drift.
|
|
72
|
+
|
|
73
|
+
| Key | Type | Default | |
|
|
74
|
+
|-----|------|---------|-|
|
|
75
|
+
| `CURATION_TRUSTED_ACCOUNTS` | enum: `none`, `published`, `carried_over` | `published` | who publishes without review |
|
|
76
|
+
| `CURATION_REVIEWER_ROLES` | list of `admin`, `staff` | `["admin"]` | the roles of the curators |
|
|
77
|
+
| `CURATION_NOTIFY_REVIEWERS` | bool | `true` | whether the curators are mailed what is new. The owner is mailed every decision either way, with mail |
|
|
78
|
+
|
|
79
|
+
## In the model
|
|
80
|
+
|
|
81
|
+
An optional `curation` node of `repositorio` in openhubs_spl, which
|
|
82
|
+
`publish_curated` (the `curated` value of `DATASET_PUBLISH_POLICY`)
|
|
83
|
+
requires: `publish_curated => curation`, so a curated hub without its
|
|
84
|
+
reviewer does not validate. `docs/openhubs_spl.uvl.patch` was the change of
|
|
85
|
+
`splent_spl_openhubs/openhubs_spl.uvl` that added it.
|
|
86
|
+
|
|
87
|
+
## Develop
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
splent feature:test curation --with dataset
|
|
91
|
+
splent feature:contract splent_feature_curation --write
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
It needs dataset 0.8.0, the release with the policy: until it is out, its
|
|
95
|
+
tests take dataset's working copy (`--with dataset`).
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
splent_feature_curation-0.2.0.dist-info/licenses/COPYING,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
|
2
|
+
splent_feature_curation-0.2.0.dist-info/licenses/COPYING.LESSER,sha256=2n6rt7r999OuXp8iOqW9we7ORaxWncIbOwN1ILRGR2g,7651
|
|
3
|
+
splent_io/splent_feature_curation/__init__.py,sha256=mGb7XAxruf6bKTtu8olCnxk_A1Af1JQmDqL-nPXzDTQ,2551
|
|
4
|
+
splent_io/splent_feature_curation/config.py,sha256=MO0-ChIwObbUe5izmxo82d7VrO5gSoeqomzZZxDB578,381
|
|
5
|
+
splent_io/splent_feature_curation/hooks.py,sha256=tssl2X9MOlvkiOXc3Z75-VXdCc_CBEL5mP22nmzCyzk,1220
|
|
6
|
+
splent_io/splent_feature_curation/models.py,sha256=5A0eiMdOossHDsQ-ICqU5ohd_7tQ5N6e02bISzBhpGo,4931
|
|
7
|
+
splent_io/splent_feature_curation/repositories.py,sha256=NuQhx5cGKadvs9NPPmuUd3MkQULfdADLVO6cksF3cIw,1644
|
|
8
|
+
splent_io/splent_feature_curation/reviewer.py,sha256=0ItBqbl2hAP9a9Vwe6-3lGysaG64sGVIoTCCQVHBqzs,681
|
|
9
|
+
splent_io/splent_feature_curation/routes.py,sha256=-lsbXdWYodMm4MhpSESqdbshCgOTgGF_duTH_jKMAro,6215
|
|
10
|
+
splent_io/splent_feature_curation/services.py,sha256=hfKuKdVl4kK-_AtyaR0iagtO9VEjGzRX6DeN6dXJxZs,18921
|
|
11
|
+
splent_io/splent_feature_curation/signals.py,sha256=v3hLnzdNMXCVwVWlyDrFE4E-s9Kn2hb5DfFcXLpWsD8,912
|
|
12
|
+
splent_io/splent_feature_curation/migrations/alembic.ini,sha256=WA1biGHSZpXO-M7uFtAZVRSV5Fih0VIQY-Yp7G7xGTk,517
|
|
13
|
+
splent_io/splent_feature_curation/migrations/env.py,sha256=MEZtouwkeVcwr0HLQ-ivVH279U6h4MhdNtI0tkJs4_I,321
|
|
14
|
+
splent_io/splent_feature_curation/migrations/script.py.mako,sha256=8_xgA-gm_OhehnO7CiIijWgnm00ZlszEHtIHrAYFJl0,494
|
|
15
|
+
splent_io/splent_feature_curation/migrations/versions/curation0001_requests.py,sha256=ChTgL1-sgNIAG-e3odG4uE8PNeEk2SPCBwV-304Oxdk,2764
|
|
16
|
+
splent_io/splent_feature_curation/templates/curation/admin/_dataset_link.html,sha256=furyOtHdrdjFqySI6pTmS2q7y7YBBnVHyg29CVnAQUY,476
|
|
17
|
+
splent_io/splent_feature_curation/templates/curation/admin/_flashes.html,sha256=bsc4gsQf1OiIW7QMeS2bCg92hCFAwxA4gpeB3x5SXp4,252
|
|
18
|
+
splent_io/splent_feature_curation/templates/curation/admin/queue.html,sha256=CckPIHsJsIYqx0ehmh5ZNTNiE3fVtT_M8jdp_2nrDOM,3720
|
|
19
|
+
splent_io/splent_feature_curation/templates/curation/admin/request.html,sha256=50dcWhqxVh7Q-6ht2ckgaZUJa8ZFofqeErnOG6_8VtQ,6324
|
|
20
|
+
splent_io/splent_feature_curation/templates/hooks/withdrawal_request.html,sha256=FjB_ePdv3ER_kYXBuAc4fqLkLLAPR_dfprBprx0Jb2o,3113
|
|
21
|
+
splent_feature_curation-0.2.0.dist-info/METADATA,sha256=0b4PEQUYojrSdcIR8z1n18tZbURSsr8epSQiKqn7NXc,4479
|
|
22
|
+
splent_feature_curation-0.2.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
23
|
+
splent_feature_curation-0.2.0.dist-info/top_level.txt,sha256=nksrfdr_edPhGPUsCqz08kyNRLBkNc2sInZYzmbZ4TA,10
|
|
24
|
+
splent_feature_curation-0.2.0.dist-info/RECORD,,
|