Skip to main content

A CKAN extension for embedding Sketchfab models as views.

Project description

ckanext-sketchfab

Travis Coveralls CKAN Python

A CKAN extension for embedding Sketchfab models as views.

Overview

A Sketchfab view can be added to any resource, regardless of whether the original data are related to the model. The view can use either the resource's URL (if the resource links directly to a sketchfab model) or one can be specified when creating the view.

You can see some of the Natural History Museum's 3D scans on Sketchfab, and several examples of the plugin in use in this dataset on the Museum's Data Portal.

Installation

Path variables used below:

  • $INSTALL_FOLDER (i.e. where CKAN is installed), e.g. /usr/lib/ckan/default
  • $CONFIG_FILE, e.g. /etc/ckan/default/development.ini
  1. Clone the repository into the src folder:
cd $INSTALL_FOLDER/src
git clone https://github.com/NaturalHistoryMuseum/ckanext-sketchfab.git
  1. Activate the virtual env:
. $INSTALL_FOLDER/bin/activate
  1. Install the requirements from requirements.txt:
cd $INSTALL_FOLDER/src/ckanext-sketchfab
pip install -r requirements.txt
  1. Run setup.py:
cd $INSTALL_FOLDER/src/ckanext-sketchfab
python setup.py develop
  1. Add 'sketchfab' to the list of plugins in your $CONFIG_FILE:
ckan.plugins = ... sketchfab

Configuration

There are currently no configuration options for this extension.

Usage

After installing, the "Sketchfab" view type will become available for resource maintainers. Add the new view and provide the URL to a Sketchfab model where prompted.

Testing

Test coverage is currently extremely limited.

To run the tests in this extension, there is a Docker compose configuration available in this repository to make it easy.

To run the tests against ckan 2.9.x on Python3:

  1. Build the required images
docker-compose build
  1. Then run the tests. The root of the repository is mounted into the ckan container as a volume by the Docker compose configuration, so you should only need to rebuild the ckan image if you change the extension's dependencies.
docker-compose run ckan

The ckan image uses the Dockerfile in the docker/ folder which is based on openknowledge/ckan-dev:2.9.

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-sketchfab-2.0.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distributions

ckanext_sketchfab-2.0.0-py3.10.egg (5.3 kB view details)

Uploaded Source

ckanext_sketchfab-2.0.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file ckanext-sketchfab-2.0.0.tar.gz.

File metadata

  • Download URL: ckanext-sketchfab-2.0.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for ckanext-sketchfab-2.0.0.tar.gz
Algorithm Hash digest
SHA256 13894ff26e89fcdce0e7819c35c3cdbd951d8392460a3f287c9c696397de30ae
MD5 efd7a6a146adb15abb232fc697aec87b
BLAKE2b-256 438c37ba9539a22e4d467511642843f6b9df9a8b58c8d6215435bb55381ccfa4

See more details on using hashes here.

File details

Details for the file ckanext_sketchfab-2.0.0-py3.10.egg.

File metadata

  • Download URL: ckanext_sketchfab-2.0.0-py3.10.egg
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for ckanext_sketchfab-2.0.0-py3.10.egg
Algorithm Hash digest
SHA256 a4a350e7a83ab056ea3dc5924bafd85b4921735499eb9bd1197aefca49cddd84
MD5 374c8f55d456028052bf9f03a4fee62a
BLAKE2b-256 4e81d73d5b3bad04b7bcece207b4f57bbda7d61ecc701dedac8701846f339840

See more details on using hashes here.

File details

Details for the file ckanext_sketchfab-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ckanext_sketchfab-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 044550c98c372e2f3a1ef9bbea10ca7fa2394a87311ce2246324e9efd88eaad7
MD5 6089d2a3ffc186a47f4117a94fe0cdb5
BLAKE2b-256 6b6c11649b8d6664f524c6ada2442c8531ea5fab18b922898afb68a3756ac8a5

See more details on using hashes here.

Supported by

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