Giter Site home page Giter Site logo

vincib / datashare-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from icij/datashare-client

0.0 1.0 0.0 92.76 MB

Better analyze information, in all its forms

Home Page: https://datashare.icij.org

License: GNU Affero General Public License v3.0

JavaScript 60.64% HTML 0.16% Vue 38.19% Makefile 0.04% CSS 0.92% Shell 0.05%

datashare-client's Introduction

Datashare

Circle CI

Download

https://datashare.icij.org/

Documentation

Datashare's user guide can be found here: https://icij.gitbook.io/datashare/

Backend

This repository is only the frontend part of Datashare.

Please find the backend here : https://github.com/ICIJ/datashare.

Requirements

You need Yarn installed on your machine (tested with version 1.9.4).

Vue CLI requires Node.js version 8.9 or above (8.11.0+ recommended) [source].

Tested with Node.js LTS 10.15.2.

Install

  • Install system dependencies for canvas support in testing environement:
sudo apt-get install libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev build-essential g++
sudo yarn global add @vue/cli
  • Install dependencies:
yarn
  • Serve with hot reload at localhost:9009
yarn serve

Build Setup

# install / update dependencies
yarn

# serve with hot reload at localhost:9009
yarn serve

# build for production with minification
yarn build

# lint and fixe files
yarn lint

# run unit tests serially with jest
make unit

# run e2e tests
yarn test:e2e

# run all tests
yarn test

For a detailed explanation on how things work, check out the guide and docs for vue-loader.

How to run with datashare backend locally

Datashare backend allows to index, find names and provide file preview or download. It can be run alongside the dev frontend for manual testing with the benefits of hot reloading with yarn serve.

You have to either run the backend docker container, or the java code if you are willing to modify the backend code.

There are three parameters to use when using the backend in dev mode :

  • run the web server with -w
  • allow Cross Origin requests (from the front to the back) with --cors <pattern>
  • points to the data directory (where the source files are located, the directory must be called data) with -d

โš ๏ธ Caution : In both case, you need to add "elasticsearch" and "redis" as known hosts in your /etc/hosts file, on line 127.0.0.1.

127.0.0.1 localhost elasticsearch redis

with docker

You can just use the datashare.sh script that will download and launch the services used by datashare (i.e. redis and elasticsearch) :

cd where/is/your/data
/path/to/datashare.sh -w --cors '*'

Then the script will ask you where your data is, you can just type enter as by default it is the current directory. And when the NLP models should be stored.

with java code

There is a shell script launchBack.sh at the root of the datashare backend repository.

After having compiled java code, you can launch the script with :

./launchBack -d /path/to/data
  • NOTE 1 : /path/to/data must end with data
  • NOTE 2 : the --cors is already set in the shell script

Run tests inside Majestic

Majestic is a "zero config GUI for Jest". First, you need to install it globally:

npm install -g majestic

Then run Majestic and open localhost:4000:

yarn run test:unit:majestic

Internationalisation

To retrieve the list of the keys translated into English but not present in the other languages files :

./bin/compareTranslations.sh

datashare-client's People

Contributors

annelhote avatar pirhoo avatar soliine avatar bamthomas avatar sabrinadz avatar dependabot[bot] avatar mvanzalu 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.