Package: ckanext-ark
ckanext-arkThis extension provides minter and resolver of theARK Identifier. Inspired byckanext-doi.RequirementsCompatibility with core CKAN versions:CKAN versionCompatible?2.7 and earlierno2.8not tested2.9yesThis extension is compatible with Python 3.7 and 3.8.InstallationTo install ckanext-ark:Activate your CKAN virtual environment, for example:./usr/lib/ckan/default/bin/activateInstall the ckanext-ark Python package into your virtual environment:pipinstallckanext-arkAddarkto theckan.pluginssetting in your CKAN
config file (by default the config file is located at/etc/ckan/default/ckan.ini).Add a filetemplates/package/read_base.htmlin your custom extension
(or modify/usr/lib/ckan/default/src/ckan/ckan/templates/package/read_base.htmlif
you are not using a custom extension):{% ckan_extends %}

  {% block secondary_content %}
    {{ super() }}
    {% snippet "ark/snippets/ark.html" %}
  {% endblock %}Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:sudoserviceapache2reloadInitialize the database:ckan-c/etc/ckan/default/ckan.iniarkinitdbDevelopment InstallationTo install ckanext-ark for development, activate your CKAN virtualenv and
do:gitclonehttps://github.com/depositar/ckanext-ark.gitcdckanext-arkpythonsetup.pydeveloppipinstall-rdev-requirements.txtConfig settingsARK NAAN[REQUIRED]You can request a Name Assigning Authority Number (NAAN) through thisform.ckanext.ark.naan=99999# This NAAN is for test purpose onlyOther ARK configsNameDescriptionDefaultckanext.ark.nma_urlThe URL of NMA (Name Mapping Authority)The same URL asckan.site_urlckanext.ark.shoulderTheShoulderfor subdividing a NAAN namespaceckanext.ark.templateThe template for generating ARKszekERC record (ARK metadata) configsNameDescriptionDefaultckanext.ark.erc_mappingsA mapping from ERC record to CKAN fields[^mapping_when]{"who": "author", "what": "title", "when": ""}ckanext.ark.allow_missing_ercThis controls if still assigning ARKs even if the fields defined in theckanext.ark.erc_mappingsis missing or empty[^missing_when]Trueckanext.ark.erc_support.whoWho made the ARK support commitmentckanext.ark.erc_support.whatWhat the nature of the ARK support commitment wasckanext.ark.erc_support.whenWhen the ARK support commitment was madeckanext.ark.erc_support.commitmentA fuller explanation of the ARK support commitment[^mapping_when]: For the mapping ofwhenfield, the ISO 8601 YYYY-MM-DD is recommended. The date string will be converted toTemporal Enumerated Ranges (TEMPER)format (YYYYMMDD-YYYYMMDD). Note that the date validation is omitted.
[^missing_when]: For thewhenfield, a list containing a single value is not viewed as an empty value.Commandsarkdelete-ark: delete ARK identifier for existed dataset. Accept package's id (name) and ARK identifier (with and withoutark:).ckan-c/etc/ckan/default/ckan.iniarkdelete-ark[NAME]update-ark: give ARK identifiers to existed datasets.ckan-c/etc/ckan/default/ckan.iniarkupdate-arkTestsTo run the tests, do:pytest--ckan-ini=test.iniReleasing a new version of ckanext-arkckanext-ark is available on PyPI ashttps://pypi.python.org/pypi/ckanext-ark. You can follow these steps to publish a new version:Update the version number in thesetup.pyfile. SeePEP 440for how to choose version numbers.Make sure you have the latest version of necessary packages:pipinstall--upgradebuildtwineCreate a source and binary distributions of the new version:python-mbuildFix any errors you get.Upload the source distribution to PyPI:twineuploaddist/*Commit any outstanding changes:gitcommit-agitpushTag the new release of the project on GitHub with the version number from
thesetup.pyfile. For example if the version number insetup.pyis
1.0.1 then do:gittagv1.0.1gitpush--tagsLicenseMIT