Giter Club home page Giter Club logo

mvcgi's Introduction

mvcgi

BioThings Studio data plugin demo

A data plugin is defined by at least a manifest file and a parser.

manifest.json

It contains different sections:

  • "dumper": tells the studio where to get data from

    • "data_url" : a string, or a list of strings, containins URLs. Currently supported protocols are: http, https, and ftp. http/https must not be mixed with ftp (only one protocol supported)

    • "uncompress": true|false. tells the studio to try to uncompress downloaded data. Currently supports zip, gz, bz2 and xz format.

    • "release": Optiona. Format: "module:function", refers to a function returning a string as a release.

             By default, if not provided, dumper will try to
             find release information from data_url itself. If http is used,
             Last-Modified or ETag HTTP headers will be considered to set a release.
             If ftp, MDTM will be used. Both will result in a timestamp-like format,
             such as YYYY-mm-dd. If a list of URLs is specified, this logic will be applied
             to the latest one in the list.
             
             If no such information is available, this field can be specified as a hook
             returning a release number (as a string). The signature takes "self" as the
             only argument and will represent the active dumper instance (function will
             actually be monkey-patched to the dumper instance). Any method/property is
             available to determine the release number, specifically, self.__class__.SRC_URLS
             containing the URLs defined abobe. self.client can be used to inspect these URLs
             further, and corresponds to either an ftplib.FTP or request.Session instance.
      
  • "upload": tells the studio how to parse and upload data once it's been dumped locally

    • "parser" : Format "module:fuction", where function takes a data folder path as argument (ie. where the data was downloaded). While parsing data, it should return or yield dict with at least "_id" key present.

    • "on_duplicates" : what to do if duplicates are found (parser returns dict with same _id). Can be either error|ignore|merge. (merge will merge dict together, see biothings.utils.dataload.merge_struct function

  • "__metadata__": describes the datasource, exposed through /metadata endpoint.

    • "license_url": points to license page

    • "license": license name if any

    • "url": datasource main web page

mvcgi's People

Contributors

sirloon avatar hongiiv avatar

Watchers

James Cloos 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.