Skip to main content

The extension to feedback on CKAN datasets such as review, number of downloads,use-cases,resolved-problems, and way of use

Project description

ckanext-feedback

codecov

このCKAN Extensionはデータ利用者からのフィードバックを得るための機能を提供します。 本Extensionの利用者からの意見・要望や活用事例の報告を受け付ける仕組み等によって、データ利用者はデータの理解が進みデータ利活用が促進され、データ提供者はデータのニーズ理解やデータ改善プロセスの効率化が行えます。

This CKAN Extension provides functionality to obtain feedback from data users. The mechanism for receiving opinions/requests and reports on usage examples from users of this extension will help data users understand data and promote data utilization, while data providers will be able to understand data needs and improve the data improvement process. You can improve efficiency.

フィードバックにより利用者と提供者間でデータを改善し続けるエコシステムを実現することができます。

Feedback enables an ecosystem between users and providers that continually improves the data.

Main features

  • 👀 集計情報の可視化機能(ダウンロード数、利活用数、課題解決数)
    • Visualization function for aggregate information (number of downloads, number of uses, number of problems solved)
  • 💬 データおよび利活用方法に対するコメント・評価機能
    • Comment and evaluation function for data and usage methods
  • 🖼 データを利活用したアプリやシステムの紹介機能
    • Feature to introduce apps and systems that utilize data
  • 🏆 データを利活用したアプリやシステムの課題解決認定機能
    • Problem-solving certification function for apps and systems that utilize data

Quick Start

CKANの環境に本Extensionを適用する手順を示します。

前提

  • 以下の環境にインストールされている CKAN 2.10.4 に本Extensionを追加することを想定しています。
    • OS: Linux
    • ディストリビューション: Ubuntu 22.04
    • Python 3.10.13

手順

  1. CKAN環境にckanext-feedbackをインストールする

    • venvなどの仮想環境でCKANを実行している場合は、仮想環境をアクティブにしてから実行してください。
    pip install ckanext-feedback
    
  2. 以下のコマンドでCKANの設定を行うファイル(ckan.ini)を開く

    • ckan.ini が存在しているパスを指定してください。
    • パスが不明な場合、 find / -name ckan.ini などを実行して検索してください
    vim /etc/ckan/ckan.ini
    
  3. 以下の行にfeedbackを追加

    ckan.plugins = stats ・・・ recline_view feedback
    
  4. フィードバック機能に必要なテーブルを作成する

    ckan db upgrade -p feedback
    
    • ckan.ini が見つからないなどのエラーが出る場合、 ckan -c <ckan.iniのパス> db upgrade -p feedback としてください。

構成

本Extensionを構成する3つのモジュール

設定や管理に関するドキュメント

開発者向け

Docker環境で本Extensionの開発を行う手順を示します。

前提

  • 以下のDocker環境で CKAN 本体と本Extensionを実行することを想定しています。
    • OS: Linux
    • ディストリビューション: Ubuntu 22.04
    • Docker 27.4.0

ビルド方法

  1. ckanext-feedbackをローカル環境にGitHub上からクローンする

    git clone https://github.com/c-3lab/ckanext-feedback.git
    
  2. ckanext-feedback/development ディレクトリに移動し、そのディレクトリにあるcontainer_setup.shを実行し、コンテナを起動

  3. 同じく、ckanext-feedback/development ディレクトリにいる状態で feedback_setup.sh を実行し、ckanext-feedbackをインストールして必要なテーブルを作成する。

    • feedback_setup.sh の実行中に The feedback config file not found と表示される場合がありますが、問題はありません。
    • The feedback config file とは、 feedback_config.json が該当し、オンオフ機能の詳細ドキュメントで解説しています。
  4. http://localhost:5000にアクセスする

LinterとFomatterの設定

  1. poetryをインストールする

    pip install poetry
    
  2. LinterとFomatterを使えるようにする

    poetry install
    poetry run pre-commit install
    
    • 以後、git commit 時に、staging されているファイルに対して isort, black, pflake8 が実行され、それらによる修正が発生すると、commit されなくなる。
    • 手動で isort, black, pflake8 を行いたい場合、poetry run pre-commit で可能。

参考ドキュメント

テスト

  1. 上記のビルド方法に従い、ビルドを行う

  2. コンテナ内に入る

    docker exec -it --user root ckan-docker-ckan-dev-1 /bin/bash
    
  3. その他の必要なものをインストールする

    pip install -r /srv/app/src/ckan/dev-requirements.txt
    pip install pytest-ckan
    
  4. ディレクトリを移動

    cd /usr/lib/python3.10/site-packages/ckanext/feedback/tests
    
  5. テストを実行

    CKAN_SQLALCHEMY_URL= CKAN_DATASTORE_READ_URL= CKAN_DATASTORE_WRITE_URL= pytest -s --ckan-ini=config/test.ini --cov=ckanext.feedback --cov-branch --disable-warnings ./
    

LICENSE

AGPLv3 LICENSE

CopyRight

Copyright (c) 2023 C3Lab

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ckanext_feedback-1.3.8.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ckanext_feedback-1.3.8-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file ckanext_feedback-1.3.8.tar.gz.

File metadata

  • Download URL: ckanext_feedback-1.3.8.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.16

File hashes

Hashes for ckanext_feedback-1.3.8.tar.gz
Algorithm Hash digest
SHA256 62dae8a9f7c23e0ae06b2b6aad1383badb9800b0e067c7dc5e78ceb845fa6465
MD5 9b69a115cde4c3242a1bf2ba1342eabd
BLAKE2b-256 14222285e12f915ff587971e52dfde7ef79abf73b3cdbf25ea2176004d2d254d

See more details on using hashes here.

File details

Details for the file ckanext_feedback-1.3.8-py3-none-any.whl.

File metadata

File hashes

Hashes for ckanext_feedback-1.3.8-py3-none-any.whl
Algorithm Hash digest
SHA256 28738101abef63405c34582340c57b764a0ef615cf5b5679958f2a425475271b
MD5 3bbf910294c4cbfdcf0baca132737db8
BLAKE2b-256 84eb86424d09cb2e3eb061757feb820bc57382875b816b7b298a6d34e36ca7e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page