Manages data storage for CKAN/DCOR (import, symlink, etc.)
Project description
This plugin manages how data are stored in DCOR. There are two types of files in DCOR:
Resources uploaded by users, imported from figshare, or imported from a data archive
Ancillary files that are generated upon resource creation, such as condensed DC data, preview images (see ckanext-dc_view).
This plugin implements:
Data storage management. All resources uploaded by a user are moved to /data/users-HOSTNAME/USERNAME-ORGNAME/PK/ID/PKGNAME_RESID_RESNAME and symlinks are created in /data/ckan-HOSTNAME/resources/RES/OUR/CEID. CKAN itself will not notice this. The idea is to have a filesystem overview about the datasets of each user.
Import datasets from figshare. Existing datasets from figshare are downloaded to the /data/depots/figshare directory and, upon resource creation, symlinked there from /data/ckan-HOSTNAME/resources/RES/OUR/CEID (Note that this is an exemption of the data storage management described above). When running the following command, the “figshare-import” organization is created and the datasets listed in figshare_dois.txt are added to CKAN:
ckan -c /etc/ckan/default/ckan.ini import-figshare
Import datasets from an internal depot. The depot should be present at data/depots/internal/ and follow the directory structure 201X/2019-08/20/2019-08-20_1126_c083de* where the allowed file names in this case are
2019-08-20_1126_c083de.sha256sums a file containing SHA256 sums
2019-08-20_1126_c083de_v1.rtdc the actual measurement
2019-08-20_1126_c083de_v1_condensed.rtdc the condensed dataset
2019-08-20_1126_c083de_ad1_m001_bg.png an ancillary image
2019-08-20_1126_c083de_ad2_m002_bg.png another ancillary image
…
ckan -c /etc/ckan/default/ckan.ini import-internal
Please make sure that the necessary file permissions are given in /data.
Installation
pip install ckanext-dcor_depot
Add this extension to the plugins and defaul_views in ckan.ini:
ckan.plugins = [...] dcor_depot ckan.storage_path=/data/ckan-HOSTNAME ckanext.dcor_depot.depots_path=/data/depots ckanext.dcor_depot.users_depot_name=users-HOSTNAME
This plugin stores resources to /data:
mkdir -p /data/depots/users-$(hostname) chown -R www-data /data/depots/users-$(hostname)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file ckanext-dcor_depot-0.7.10.tar.gz
.
File metadata
- Download URL: ckanext-dcor_depot-0.7.10.tar.gz
- Upload date:
- Size: 25.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7ffd721d7a91d186fbd4a7d8b67058effd817fb4076d826c52d204b968545ca |
|
MD5 | 4610aa30bad3ebbdf1e36ea836971143 |
|
BLAKE2b-256 | b7731f8e3031d08a0b16e8c18c2aee3790aa5d3dfe07d5484515e277aae09b78 |