1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
|
%global _empty_manifest_terminate_build 0
Name: python-ckanext-dcor-schemas
Version: 0.17.2
Release: 1
Summary: Introduces or lifts restrictions (authorization) for managing data and metadata on DCOR
License: AGPLv3+
URL: https://github.com/DCOR-dev/ckanext-dcor_schemas
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/79/b1/496dfb4954d9a639d0536f205e0b3a384ae5cd05beed17f925082d7b630e/ckanext-dcor_schemas-0.17.2.tar.gz
BuildArch: noarch
Requires: python3-dclab
Requires: python3-dcor-shared
Requires: python3-slugify
Requires: python3-rq
%description
|PyPI Version| |Build Status| |Coverage Status|
This module introduces/lifts restrictions (authorization) for the management
of data and meta data on DCOR. The corresponding UI elements are modified
accordingly:
- Authorization (auth.py)
- datasets: do not allow deleting datasets unless they are drafts
- datasets: allow purging of deleted datasets
- datasets: do not allow switching to a more restrictive license
- datasets: do not allow changing the name (slug)
- datasets: do not allow adding resources to non-draft datasets
- datasets: do not allow to set the visibility of a public dataset to private
- datasets: do not allow uploading datasets via the web interface
- organization: do not allow bulk_update_delete (e.g. datasets by organization admins)
- resources: do not allow deleting resources unless they are drafts
- resources: only allow changing the "description"
- resources: do not allow setting a resource id when uploading
- user: allow all logged-in users to create datasets, circles, and collections
- Validation (validate.py)
- datasets: force user to select authors
- datasets: author list "authors" is CSV
- datasets: parse DOI field (remove URL part)
- datasets: force user to select a license
- datasets: restrict to basic CC licenses
- datasets: automatically generate dataset name (slug) using random characters
if necessary (does not apply to admins)
- datasets: a dataset without resources is considered to be a draft;
it's state cannot be set to "active"
- datasets: the state of a dataset that does not contain at least one
valid .rtdc resource cannot be set to "active"
- resources: do not allow uploading resources with the same name
for a dataset (important for ckanext-dcor_depot)
- resources: make sure the resource name matches the file name of the
upload; this is actually implemented in plugin.before_create
(IResourceController) and not in validate.py
- resources: custom resource name is overridden during upload
- resources: do not allow weird characters in resource names
- resources: restrict upload data extensions to .rtdc, .csv, .tsv, .pdf,
.txt, .png, .jpg, .tif, .py, .ipynb, .ini
- resources: configuration metadata (using `dclab.dfn.config_funcs`)
- IPermissionLabels (plugin.py)
- Allow a user A to see user B's private dataset if the private dataset
is in a group that user A is a member of.
- UI Dataset:
- hide "add new resource" button in ``templates/package/resources.html``
- add field ``authors`` (csv list)
- add field ``doi`` (validator parses URLs)
- add field ``references`` (parses arxiv, bioRxiv, DOI, links)
- add CC license file ``licenses.json`` (only show less restrictive licenses
when editing the dataset)
- UI Organization:
- remove "Delete" button in bulk view
- UI Resource:
- Do not show these variables (because they are redundant):
['last modified', 'revision id', 'url type', 'state', 'on same domain']
(``templates/package/resource_read.html``)
- Show DC config data via "toggle-more"
- Add supplementary resource schema via json files located in
`dcor_schemas/resource_schema_supplements`
- Background jobs:
- set the mimetype for each dataset
- populate "dc:sec:key" metadata for each DC dataset
- generates sha256 hash upon resource creation
- Configuration keywords:
- the ``ckanext.dcor_schemas.allow_public_datasets`` boolean parameter
can be used to disable the creation of public datasets (e.g. for DCOR-med).
- the ``ckanext.dcor_schemas.json_resource_schema_dir`` parameter
can be used to specify a directory containing .json files that
define the supplementary resource schema. The default is
``package`` which means that the supplementary resource schema of
this extension is used.
- API extensions:
- ``resource_schema_supplements`` returns a dictionary of the
current supplementary resource schema
- ``supported_resource_suffixes`` returns a list of supported
resource suffixes
- CLI:
- add CKAN command `list-zombie-users` for users with no datasets and
no activity for a certain amount of time
- add CKAN command `run-jobs-dcor-schemas` that runs all background
jobs for all resources (if not already done)
%package -n python3-ckanext-dcor-schemas
Summary: Introduces or lifts restrictions (authorization) for managing data and metadata on DCOR
Provides: python-ckanext-dcor-schemas
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-ckanext-dcor-schemas
|PyPI Version| |Build Status| |Coverage Status|
This module introduces/lifts restrictions (authorization) for the management
of data and meta data on DCOR. The corresponding UI elements are modified
accordingly:
- Authorization (auth.py)
- datasets: do not allow deleting datasets unless they are drafts
- datasets: allow purging of deleted datasets
- datasets: do not allow switching to a more restrictive license
- datasets: do not allow changing the name (slug)
- datasets: do not allow adding resources to non-draft datasets
- datasets: do not allow to set the visibility of a public dataset to private
- datasets: do not allow uploading datasets via the web interface
- organization: do not allow bulk_update_delete (e.g. datasets by organization admins)
- resources: do not allow deleting resources unless they are drafts
- resources: only allow changing the "description"
- resources: do not allow setting a resource id when uploading
- user: allow all logged-in users to create datasets, circles, and collections
- Validation (validate.py)
- datasets: force user to select authors
- datasets: author list "authors" is CSV
- datasets: parse DOI field (remove URL part)
- datasets: force user to select a license
- datasets: restrict to basic CC licenses
- datasets: automatically generate dataset name (slug) using random characters
if necessary (does not apply to admins)
- datasets: a dataset without resources is considered to be a draft;
it's state cannot be set to "active"
- datasets: the state of a dataset that does not contain at least one
valid .rtdc resource cannot be set to "active"
- resources: do not allow uploading resources with the same name
for a dataset (important for ckanext-dcor_depot)
- resources: make sure the resource name matches the file name of the
upload; this is actually implemented in plugin.before_create
(IResourceController) and not in validate.py
- resources: custom resource name is overridden during upload
- resources: do not allow weird characters in resource names
- resources: restrict upload data extensions to .rtdc, .csv, .tsv, .pdf,
.txt, .png, .jpg, .tif, .py, .ipynb, .ini
- resources: configuration metadata (using `dclab.dfn.config_funcs`)
- IPermissionLabels (plugin.py)
- Allow a user A to see user B's private dataset if the private dataset
is in a group that user A is a member of.
- UI Dataset:
- hide "add new resource" button in ``templates/package/resources.html``
- add field ``authors`` (csv list)
- add field ``doi`` (validator parses URLs)
- add field ``references`` (parses arxiv, bioRxiv, DOI, links)
- add CC license file ``licenses.json`` (only show less restrictive licenses
when editing the dataset)
- UI Organization:
- remove "Delete" button in bulk view
- UI Resource:
- Do not show these variables (because they are redundant):
['last modified', 'revision id', 'url type', 'state', 'on same domain']
(``templates/package/resource_read.html``)
- Show DC config data via "toggle-more"
- Add supplementary resource schema via json files located in
`dcor_schemas/resource_schema_supplements`
- Background jobs:
- set the mimetype for each dataset
- populate "dc:sec:key" metadata for each DC dataset
- generates sha256 hash upon resource creation
- Configuration keywords:
- the ``ckanext.dcor_schemas.allow_public_datasets`` boolean parameter
can be used to disable the creation of public datasets (e.g. for DCOR-med).
- the ``ckanext.dcor_schemas.json_resource_schema_dir`` parameter
can be used to specify a directory containing .json files that
define the supplementary resource schema. The default is
``package`` which means that the supplementary resource schema of
this extension is used.
- API extensions:
- ``resource_schema_supplements`` returns a dictionary of the
current supplementary resource schema
- ``supported_resource_suffixes`` returns a list of supported
resource suffixes
- CLI:
- add CKAN command `list-zombie-users` for users with no datasets and
no activity for a certain amount of time
- add CKAN command `run-jobs-dcor-schemas` that runs all background
jobs for all resources (if not already done)
%package help
Summary: Development documents and examples for ckanext-dcor-schemas
Provides: python3-ckanext-dcor-schemas-doc
%description help
|PyPI Version| |Build Status| |Coverage Status|
This module introduces/lifts restrictions (authorization) for the management
of data and meta data on DCOR. The corresponding UI elements are modified
accordingly:
- Authorization (auth.py)
- datasets: do not allow deleting datasets unless they are drafts
- datasets: allow purging of deleted datasets
- datasets: do not allow switching to a more restrictive license
- datasets: do not allow changing the name (slug)
- datasets: do not allow adding resources to non-draft datasets
- datasets: do not allow to set the visibility of a public dataset to private
- datasets: do not allow uploading datasets via the web interface
- organization: do not allow bulk_update_delete (e.g. datasets by organization admins)
- resources: do not allow deleting resources unless they are drafts
- resources: only allow changing the "description"
- resources: do not allow setting a resource id when uploading
- user: allow all logged-in users to create datasets, circles, and collections
- Validation (validate.py)
- datasets: force user to select authors
- datasets: author list "authors" is CSV
- datasets: parse DOI field (remove URL part)
- datasets: force user to select a license
- datasets: restrict to basic CC licenses
- datasets: automatically generate dataset name (slug) using random characters
if necessary (does not apply to admins)
- datasets: a dataset without resources is considered to be a draft;
it's state cannot be set to "active"
- datasets: the state of a dataset that does not contain at least one
valid .rtdc resource cannot be set to "active"
- resources: do not allow uploading resources with the same name
for a dataset (important for ckanext-dcor_depot)
- resources: make sure the resource name matches the file name of the
upload; this is actually implemented in plugin.before_create
(IResourceController) and not in validate.py
- resources: custom resource name is overridden during upload
- resources: do not allow weird characters in resource names
- resources: restrict upload data extensions to .rtdc, .csv, .tsv, .pdf,
.txt, .png, .jpg, .tif, .py, .ipynb, .ini
- resources: configuration metadata (using `dclab.dfn.config_funcs`)
- IPermissionLabels (plugin.py)
- Allow a user A to see user B's private dataset if the private dataset
is in a group that user A is a member of.
- UI Dataset:
- hide "add new resource" button in ``templates/package/resources.html``
- add field ``authors`` (csv list)
- add field ``doi`` (validator parses URLs)
- add field ``references`` (parses arxiv, bioRxiv, DOI, links)
- add CC license file ``licenses.json`` (only show less restrictive licenses
when editing the dataset)
- UI Organization:
- remove "Delete" button in bulk view
- UI Resource:
- Do not show these variables (because they are redundant):
['last modified', 'revision id', 'url type', 'state', 'on same domain']
(``templates/package/resource_read.html``)
- Show DC config data via "toggle-more"
- Add supplementary resource schema via json files located in
`dcor_schemas/resource_schema_supplements`
- Background jobs:
- set the mimetype for each dataset
- populate "dc:sec:key" metadata for each DC dataset
- generates sha256 hash upon resource creation
- Configuration keywords:
- the ``ckanext.dcor_schemas.allow_public_datasets`` boolean parameter
can be used to disable the creation of public datasets (e.g. for DCOR-med).
- the ``ckanext.dcor_schemas.json_resource_schema_dir`` parameter
can be used to specify a directory containing .json files that
define the supplementary resource schema. The default is
``package`` which means that the supplementary resource schema of
this extension is used.
- API extensions:
- ``resource_schema_supplements`` returns a dictionary of the
current supplementary resource schema
- ``supported_resource_suffixes`` returns a list of supported
resource suffixes
- CLI:
- add CKAN command `list-zombie-users` for users with no datasets and
no activity for a certain amount of time
- add CKAN command `run-jobs-dcor-schemas` that runs all background
jobs for all resources (if not already done)
%prep
%autosetup -n ckanext-dcor-schemas-0.17.2
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-ckanext-dcor-schemas -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 0.17.2-1
- Package Spec generated
|