fjelltopp / zarr-ckan

The Government of Zambia Ministry of Finance and National Planning project to establish a Zambia Evaluation and Research Repository (ZaRR) based on CKAN (funded by UNICEF).
0 stars 0 forks source link

Harvesting of metadata using OAI-PMH #10

Open ChasNelson1990 opened 5 months ago

ChasNelson1990 commented 5 months ago

The repository supports harvesting of metadata using OAI-PMH.

This is a standard to allow other repositories to harvest data from your repository. EUDAT has an extension developed for this purpose that still seems to be under active maintenance at the time of writing. There is also a CKAN harvester built upon OAI-PMH.

A-Souhei commented 3 months ago

https://github.com/EUDAT-B2FIND/ckanext-oaipmh-server Won't run, here is the stacktrace:

Traceback (most recent call last):
  File "/usr/lib/ckan/.minikubevenv/ckan-ALitmJXH/lib/python3.8/site-packages/flask/app.py", line 2076, in wsgi_app
    response = self.handle_exception(e)
  File "/usr/lib/ckan/.minikubevenv/ckan-ALitmJXH/lib/python3.8/site-packages/flask/app.py", line 2073, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/ckan/.minikubevenv/ckan-ALitmJXH/lib/python3.8/site-packages/flask/app.py", line 1518, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/ckan/.minikubevenv/ckan-ALitmJXH/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/ckan/.minikubevenv/ckan-ALitmJXH/lib/python3.8/site-packages/flask_debugtoolbar/__init__.py", line 157, in dispatch_request
    return view_func(**req.view_args)
  File "/usr/lib/ckan/.minikubevenv/ckan-ALitmJXH/lib/python3.8/site-packages/ckan/views/home.py", line 93, in index
    return base.render(u'home/index.html', extra_vars=extra_vars)
  File "/usr/lib/ckan/.minikubevenv/ckan-ALitmJXH/lib/python3.8/site-packages/ckan/lib/base.py", line 107, in render
    return flask_render_template(template_name, **extra_vars)
  File "/usr/lib/ckan/.minikubevenv/ckan-ALitmJXH/lib/python3.8/site-packages/flask/templating.py", line 147, in render_template
    return _render(
  File "/usr/lib/ckan/.minikubevenv/ckan-ALitmJXH/lib/python3.8/site-packages/flask/templating.py", line 128, in _render
    rv = template.render(context)
  File "/usr/lib/ckan/.minikubevenv/ckan-ALitmJXH/lib/python3.8/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/usr/lib/ckan/.minikubevenv/ckan-ALitmJXH/lib/python3.8/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/usr/lib/ckan/.minikubevenv/ckan-ALitmJXH/lib/python3.8/site-packages/ckan/templates/home/index.html", line 1, in top-level template code
    {% extends "page.html" %}
  File "/usr/lib/ckan/.minikubevenv/ckan-ALitmJXH/lib/python3.8/site-packages/jinja2/environment.py", line 617, in _parse
    return Parser(self, source, name, filename).parse()
  File "/usr/lib/ckan/.minikubevenv/ckan-ALitmJXH/lib/python3.8/site-packages/jinja2/parser.py", line 1030, in parse
    result = nodes.Template(self.subparse(), lineno=1)
  File "/usr/lib/ckan/.minikubevenv/ckan-ALitmJXH/lib/python3.8/site-packages/jinja2/parser.py", line 1013, in subparse
    rv = self.parse_statement()
  File "/usr/lib/ckan/.minikubevenv/ckan-ALitmJXH/lib/python3.8/site-packages/jinja2/parser.py", line 182, in parse_statement
    return ext(self)
  File "/usr/lib/ckan/.minikubevenv/ckan-ALitmJXH/lib/python3.8/site-packages/ckan/lib/jinja_extensions.py", line 120, in parse
    assert searchpath and current_path
AssertionError

I continue the investigation

A-Souhei commented 3 months ago

I have installed harvester with https://github.com/kata-csc/ckanext-oaipmh, but it is not compatible with CKAN v2.10

  File "/usr/lib/ckan/.minikubevenv/ckan-ALitmJXH/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2474, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib/ckan/.minikubevenv/ckan-ALitmJXH/src/ckanext-oaipmh/ckanext/oaipmh/plugin.py", line 4, in <module>
    from ckan.plugins import IRoutes, IConfigurer
ImportError: cannot import name 'IRoutes' from 'ckan.plugins' (/usr/lib/ckan/.minikubevenv/ckan-ALitmJXH/lib/python3.8/site-packages/ckan/plugins/__init__.py)
bootstrap finished
A-Souhei commented 3 months ago

Another extension (not maintained) : https://github.com/openresearchdata/ckanext-oaipmh