GithubHelp home page GithubHelp logo

midas's Introduction

HICF website

This is the web front end for the MIDAS sample metadata repository, funded by the Human Innovation Challenge Fund. The website is a Catalyst application, backed by a relational database (we use MySQL).

Installation

Clone the repo:

git clone https://github.com/sanger-pathogens/MIDAS.git

Install prerequisites

CPAN modules

The webapp requires, at a minimum, the following Perl modules:

For now there is no definitive list of lesser dependencies. Start the app and enjoy a game of whack-a-mole with CPAN.

Build tools

We use several nodejs-based build tools, coordinated by Grunt. You'll need to install several dependencies:

Start with node/npm and install the rest using

npm install -g grunt

and similar. For OS X, the easiest way to install way to install node is using Homebrew.

Install node packages

The checkout contains a package.json package list, which can be handed to npm:

cd MIDAS
npm install

(before running npm install you need to configure proxies:

export http_proxy=http://<proxy host>:<proxy port>
export https_proxy=http://<proxy host>:<proxy port>

otherwise downloading packages through the firewall fails.)

You may also need to install grunt-cli as a global package:

npm install -g grunt-cli

Testing

There are two sets of tests. There are Perl tests that exercise the webapp and its integration with the DB, and JS tests that test the front-end.

Perl tests

The perl tests check the page contents and API:

CATALYST_DEBUG=0 DBIC_TRACE=0 prove -lr t

You can turn on catalyst debugging and DBIC query logging by adding environment variables to the command line:

CATALYST_DEBUG=1 DBIC_TRACE=1 prove -lr t

The output will be significantly more verbose.

Front-end tests

The front-end tests use the Mocha testing framework and the ChaiJS assertion library. We use CasperJS, a headless WebKit browser, to test the front-end javascript. The interaction between Mocha and CasperJS is coordinated by mocha-casperjs.

The Perl tests start a headless server and use that, but the front-end tests need a server to be running already. Start it using the run_test_server.sh script:

cd MIDAS/app
sh run_test_server.sh

Run the tests themselves like:

cd MIDAS/test
mocha-casperjs 01_summary.js

midas's People

Contributors

andrewjpage avatar aslett1 avatar bewt85 avatar jgtate avatar js21 avatar satta avatar

Watchers

 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.