Code Monkey home page Code Monkey logo

rdmo-plugins-rocrate's Introduction

ROcrate Export Plugin

This is an export plugin for RDMO, that was created during the RDMO Hackathon 2023

It aims to export RDMO projects in the RO-Crate format. The user can select which datasets of the RDMO project are included in the RO-Crate export.

The RDMO attributes are mapped to the RO-Crate metadata properties in the rdmo-rocrate.toml config file. The RO-Crate files are constructed with the help of the ro-crate-py library. The export function creates a zip file containing the ro-crate-metadata.json, a JSON-LD file, filled the with metadata values that were extracted from the RDMO project. Individual datasets can be selected to be included in the export, when the project contains datasets. The metadata of each dataset is added to the ro-crate-metadata.json file and empty folders are created for each dataset (for the directory tree).

Setup

Install the plugin in your RDMO virtual environment using pip (directly from GitHub):

pip install git+https://github.com/rdmorganiser/rdmo-plugins-rocrate.git

The dependencies ro-crate-py and tomli will be installed automatically. Add the rdmo_plugins_rocrate app to your INSTALLED_APPS in `config/settings/local.py``:

from . import INSTALLED_APPS
INSTALLED_APPS = ['rdmo_plugins_rocrate'] + INSTALLED_APPS

Add the export plugins to the PROJECT_EXPORTS in config/settings/local.py:

from django.utils.translation import gettext_lazy as _
from . import PROJECT_EXPORTS

PROJECT_EXPORTS += [
    ('rocrate', _('as ROCrate JSON'), 'rdmo_plugins_rocrate.exports.rocrate.rocrate.ROCrateExport')
]

As default the export will be as a zip file download. For development purposes there is a web preview setting available. This feature can be configured by a boolean setting in the rdmo-app with the name ROCRATE_EXPORT_WEB_PREVIEW, it can be omitted and will default to False.

'''
A boolean setting to enable the web preview feature of the rocrate export plugin.
Default: False
Purpose: Local development
'''
ROCRATE_EXPORT_WEB_PREVIEW = True # default is False and this setting can be omitted

Please visit the RDMO documentation for detailed information.

rdmo-plugins-rocrate's People

Contributors

henningtimm avatar jochenklar avatar jwindeck avatar m6121 avatar mypydavid avatar triole avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.