diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-05 06:46:55 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-05 06:46:55 +0000 |
commit | fbf9cbb8b2dd5901beceba96f1fcccd2b17abf22 (patch) | |
tree | eed798c3eaab37d66c61e91ea98cda5d7efa04ce | |
parent | dd8a5325f134719d6cea49c1c560e58e66cabe92 (diff) |
automatic import of python-ckanext-dcor-schemasopeneuler20.03
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-ckanext-dcor-schemas.spec | 313 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 315 insertions, 0 deletions
@@ -0,0 +1 @@ +/ckanext-dcor_schemas-0.17.2.tar.gz diff --git a/python-ckanext-dcor-schemas.spec b/python-ckanext-dcor-schemas.spec new file mode 100644 index 0000000..fe44e16 --- /dev/null +++ b/python-ckanext-dcor-schemas.spec @@ -0,0 +1,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 @@ -0,0 +1 @@ +b4d82a9070dbd3c21fa94bae73cb42b9 ckanext-dcor_schemas-0.17.2.tar.gz |