Skip to main content

License Tests Codecov Python CKAN CKAN CKAN

ckanext-ark

This extension provides minter and resolver of the ARK Identifier. Inspired by ckanext-doi.

Requirements

Compatibility with core CKAN versions:

CKAN version Compatible?
2.8 and earlier no
2.9 yes
2.10 yes
2.11 yes

This extension is compatible with Python 3.8, 3.9, and 3.10.

Installation

To install ckanext-ark:

  1. Activate your CKAN virtual environment, for example:
  . /usr/lib/ckan/default/bin/activate
  1. Install the ckanext-ark Python package into your virtual environment:
  pip install ckanext-ark
  1. Add ark to the ckan.plugins setting in your CKAN config file (by default the config file is located at /etc/ckan/default/ckan.ini).

  2. Add a file templates/package/read_base.html in your custom extension (or modify /usr/lib/ckan/default/src/ckan/ckan/templates/package/read_base.html if you are not using a custom extension):

  {% ckan_extends %}

  {% block secondary_content %}
    {{ super() }}
    {% snippet "ark/snippets/ark.html" %}
  {% endblock %}
  1. Create the database tables:
  ckan -c /etc/ckan/default/ckan.ini db upgrade -p ark
  1. Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:
  sudo service apache2 reload

Development Installation

To install ckanext-ark for development, activate your CKAN virtualenv and do:

  git clone https://github.com/depositar/ckanext-ark.git
  cd ckanext-ark
  python setup.py develop
  pip install -r dev-requirements.txt

Config settings

ARK NAAN [REQUIRED]

You can request a Name Assigning Authority Number (NAAN) through this form.

  ckanext.ark.naan = 99999 # This NAAN is for test purpose only

Other ARK configs

Name Description Default
ckanext.ark.nma_url The URL of NMA (Name Mapping Authority) The same URL as ckan.site_url
ckanext.ark.shoulder The Shoulder for subdividing a NAAN namespace
ckanext.ark.template The template for generating ARKs zek

ERC record (ARK metadata) configs

Name Description Default
ckanext.ark.erc_mappings A mapping from ERC record to CKAN fields1 {"who": "author", "what": "title", "when": ""}
ckanext.ark.allow_missing_erc This controls if still assigning ARKs even if the fields defined in the ckanext.ark.erc_mappings is missing or empty2 True
ckanext.ark.erc_support.who Who made the ARK support commitment
ckanext.ark.erc_support.what What the nature of the ARK support commitment was
ckanext.ark.erc_support.when When the ARK support commitment was made
ckanext.ark.erc_support.commitment A fuller explanation of the ARK support commitment

Commands

ark

  1. delete-ark: delete ARK identifier for existed dataset. Accept package's id (name) and ARK identifier (with and without ark:).
  ckan -c /etc/ckan/default/ckan.ini ark delete-ark [NAME]
  1. update-ark: give ARK identifiers to existed datasets.
  ckan -c /etc/ckan/default/ckan.ini ark update-ark

Tests

To run the tests, do:

  pytest --ckan-ini=test.ini

Releasing a new version of ckanext-ark

ckanext-ark is available on PyPI as https://pypi.python.org/pypi/ckanext-ark. You can follow these steps to publish a new version:

  1. Update the version number in the setup.py file. See PEP 440 for how to choose version numbers.

  2. Make sure you have the latest version of necessary packages:

  pip install --upgrade build twine
  1. Create a source and binary distributions of the new version:
  python -m build

Fix any errors you get.

  1. Upload the source distribution to PyPI:
  twine upload dist/*
  1. Commit any outstanding changes:
  git commit -a
  git push
  1. Tag the new release of the project on GitHub with the version number from the setup.py file. For example if the version number in setup.py is 1.0.1 then do:
  git tag v1.0.1
  git push --tags

License

MIT

  1. For the mapping of when field, the ISO 8601 YYYY-MM-DD is recommended. The date string will be converted to Temporal Enumerated Ranges (TEMPER) format (YYYYMMDD-YYYYMMDD). Note that the date validation is omitted. ↩

  2. For the when field, a list containing a single value is not viewed as an empty value. ↩

Metadata

Release files for ckanext-ark 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ckanext-ark 1.0.5
File Size Uploaded
ckanext_ark-1.0.5.tar.gz 15.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ckanext-ark 1.0.5
File Interpreter ABI Platform
ckanext_ark-1.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 31.6 kB

Release files / ckanext_ark-1.0.5.tar.gz

Download URL ckanext_ark-1.0.5.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
51537c53aa3cadd43658d1796573b8ab1f53d4fc30fad6bd133261462dac8790
BLAKE2b-256 checksum
How to use checksums
8406155a72afd908e4f0fb77d6cc3e14e72af09168a3c20fecff1cb1526eeec9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.16

Release files / ckanext_ark-1.0.5-py3-none-any.whl

Download URL ckanext_ark-1.0.5-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
055052abde3d4a1c65175adbf9df9f1c3df55a8711fa58a15461cab0e0398801
BLAKE2b-256 checksum
How to use checksums
fb40913a4b5cdb811ef24482bb4d51d725bf2690383c473943142fc9650b82e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.16

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page