Commit 7f18d1a1 authored by David Mendez's avatar David Mendez
Browse files

Initial commit

parents
{
"env": {
"test": {
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
]
]
}
}
}
node_modules
npm-debug*
.nuxt
\ No newline at end of file
module.exports = {
root: true,
env: {
browser: true,
node: true
},
parserOptions: {
parser: 'babel-eslint'
},
extends: [
'@nuxtjs',
'plugin:nuxt/recommended',
'plugin:vue/recommended',
'eslint:recommended',
'prettier',
'prettier/vue',
'plugin:prettier/recommended'
],
// add your custom rules here
rules: {
// "vue/component-name-in-template-casing": ["error", "PascalCase"],
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
'import/no-unresolved': 0,
'import/no-unassigned-import': 0,
semi: ['error', 'never'],
'no-console': 'off',
'space-before-function-paren': [
'error',
{
anonymous: 'never',
named: 'never',
asyncArrow: 'always'
}
]
},
globals: {
$nuxt: true
}
};
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# Nuxt generate
dist
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless
# IDE / Editor
.idea
.editorconfig
# Service worker
sw.*
# Mac OSX
.DS_Store
# Vim swap files
*.swp
variables:
DOCKER_TLS_CERTDIR: ""
GIT_STRATEGY: clone
REGISTRY_USER: chembl/unichem
APPLICATION: malaria-frontend
RELEASE_IMAGE: $CI_REGISTRY/$REGISTRY_USER/$APPLICATION:$CI_BUILD_REF_NAME
DOCKER_IMAGE: $CI_REGISTRY/$REGISTRY_USER/$APPLICATION
DOCKER_DRIVER: overlay
image: docker:latest
services:
- docker:dind
stages:
- build
# - test
# - deploy
build-dev:
script:
- echo 'hello!'
# build-dev:
# image:
# name: docker/compose:1.25.5
# entrypoint: ["/bin/sh", "-c"]
# stage: build
# only:
# - dev
# # - master
# variables:
# DOCKER_HOST: tcp://docker:2375
# script:
# - echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
# - echo Building ${DOCKER_IMAGE}:${CI_COMMIT_SHORT_SHA}
# - docker-compose build development
# - echo Deploying ${DOCKER_IMAGE}:${CI_COMMIT_SHORT_SHA}
# - docker push ${DOCKER_IMAGE}:${CI_COMMIT_SHORT_SHA}
# build-prod:
# image:
# name: docker/compose:1.25.5
# entrypoint: ["/bin/sh", "-c"]
# stage: build
# only:
# - master
# # - master
# variables:
# DOCKER_HOST: tcp://docker:2375
# script:
# - echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
# - echo Building ${DOCKER_IMAGE}:${CI_COMMIT_SHORT_SHA}
# - docker-compose build production
# - echo Deploying ${DOCKER_IMAGE}:${CI_COMMIT_SHORT_SHA}
# - docker push ${DOCKER_IMAGE}:${CI_COMMIT_SHORT_SHA}
# unit-tests:
# stage: test
# when: manual
# script:
# - echo "ToDo UNIT TESTS"
# only:
# - master
# - dev
# deploy-dev-hx:
# image:
# name: lachlanevenson/k8s-kubectl:latest
# entrypoint: ["/bin/sh", "-c"]
# stage: deploy
# script:
# - echo $KUBE_URL_HX
# - echo "$KUBE_CA_PEM_HX" > "$(pwd)/kube.ca.pem"
# - kubectl config set-cluster ${KUBE_CLUS_NAME_HX} --server="${KUBE_URL_HX}" --certificate-authority="$(pwd)/kube.ca.pem"
# - kubectl config set-credentials ${KUBE_USER_HX} --token="${KUBE_TOKEN_HX}"
# - kubectl config set-context ${KUBE_NAMESPACE_DEV} --cluster=${KUBE_CLUS_NAME_HX} --user=${KUBE_USER_HX}
# - kubectl config use-context ${KUBE_NAMESPACE_DEV}
# - echo ${KUBE_NAMESPACE_DEV} ${KUBE_URL_HH} ${KUBE_CLUS_NAME_HX} ${KUBE_USER_HX}
# - kubectl get pods -n ${KUBE_NAMESPACE_DEV}
# - sed -i "s~<VERSION>~${CI_COMMIT_SHORT_SHA}~" k8s-deployment.yml
# - sed -i "s~<DOCKER_IMAGE>~${DOCKER_IMAGE}~" k8s-deployment.yml
# - kubectl apply -n ${KUBE_NAMESPACE_DEV} -f k8s-deployment.yml
# only:
# - dev
# deploy-dev-hh:
# image:
# name: lachlanevenson/k8s-kubectl:latest
# entrypoint: ["/bin/sh", "-c"]
# stage: deploy
# script:
# - echo $KUBE_URL_HH
# - echo "$KUBE_CA_PEM_HH" > "$(pwd)/kube.ca.pem"
# - kubectl config set-cluster ${KUBE_CLUS_NAME_HH} --server="${KUBE_URL_HH}" --certificate-authority="$(pwd)/kube.ca.pem"
# - kubectl config set-credentials ${KUBE_USER_HH} --token="${KUBE_TOKEN_HH}"
# - kubectl config set-context ${KUBE_NAMESPACE_DEV} --cluster=${KUBE_CLUS_NAME_HH} --user=${KUBE_USER_HH}
# - kubectl config use-context ${KUBE_NAMESPACE_DEV}
# - echo ${KUBE_NAMESPACE_DEV} ${KUBE_URL_HH} ${KUBE_CLUS_NAME_HH} ${KUBE_USER_HH}
# - kubectl get pods -n ${KUBE_NAMESPACE_DEV}
# - sed -i "s~<VERSION>~${CI_COMMIT_SHORT_SHA}~" k8s-deployment.yml
# - sed -i "s~<DOCKER_IMAGE>~${DOCKER_IMAGE}~" k8s-deployment.yml
# - kubectl apply -n ${KUBE_NAMESPACE_DEV} -f k8s-deployment.yml
# only:
# - dev
# deploy-prod-hx:
# image:
# name: lachlanevenson/k8s-kubectl:latest
# entrypoint: ["/bin/sh", "-c"]
# stage: deploy
# script:
# - echo $KUBE_URL_HX
# - echo "$KUBE_CA_PEM_HX" > "$(pwd)/kube.ca.pem"
# - kubectl config set-cluster ${KUBE_CLUS_NAME_HX} --server="${KUBE_URL_HX}" --certificate-authority="$(pwd)/kube.ca.pem"
# - kubectl config set-credentials ${KUBE_USER_HX} --token="${KUBE_TOKEN_HX}"
# - kubectl config set-context ${KUBE_NAMESPACE_PROD} --cluster=${KUBE_CLUS_NAME_HX} --user=${KUBE_USER_HX}
# - kubectl config use-context ${KUBE_NAMESPACE_PROD}
# - echo ${KUBE_NAMESPACE_DEV} ${KUBE_URL_HX} ${KUBE_CLUS_NAME_HX} ${KUBE_USER_HX}
# - kubectl get pods -n ${KUBE_NAMESPACE_PROD}
# - sed -i "s~<VERSION>~${CI_COMMIT_SHORT_SHA}~" k8s-deployment.yml
# - sed -i "s~<DOCKER_IMAGE>~${DOCKER_IMAGE}~" k8s-deployment.yml
# - kubectl apply -n ${KUBE_NAMESPACE_PROD} -f k8s-deployment.yml
# when: manual
# only:
# - master
# deploy-prod-hh:
# image:
# name: lachlanevenson/k8s-kubectl:latest
# entrypoint: ["/bin/sh", "-c"]
# stage: deploy
# script:
# - echo $KUBE_URL_HH
# - echo "$KUBE_CA_PEM_HH" > "$(pwd)/kube.ca.pem"
# - kubectl config set-cluster ${KUBE_CLUS_NAME_HH} --server="${KUBE_URL_HH}" --certificate-authority="$(pwd)/kube.ca.pem"
# - kubectl config set-credentials ${KUBE_USER_HH} --token="${KUBE_TOKEN_HH}"
# - kubectl config set-context ${KUBE_NAMESPACE_PROD} --cluster=${KUBE_CLUS_NAME_HH} --user=${KUBE_USER_HH}
# - kubectl config use-context ${KUBE_NAMESPACE_PROD}
# - echo ${KUBE_NAMESPACE_DEV} ${KUBE_URL_HH} ${KUBE_CLUS_NAME_HH} ${KUBE_USER_HH}
# - kubectl get pods -n ${KUBE_NAMESPACE_PROD}
# - sed -i "s~<VERSION>~${CI_COMMIT_SHORT_SHA}~" k8s-deployment.yml
# - sed -i "s~<DOCKER_IMAGE>~${DOCKER_IMAGE}~" k8s-deployment.yml
# - kubectl apply -n ${KUBE_NAMESPACE_PROD} -f k8s-deployment.yml
# when: manual
# only:
# - master
# after_script:
# - echo "End of script"
{
"printWidth": 120,
"semi": false,
"singleQuote": true
}
\ No newline at end of file
{
"[vue]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "octref.vetur"
},
"prettier.disableLanguages": [],
"prettier.printWidth": 120,
"eslint.autoFixOnSave": true,
"eslint.alwaysShowStatus": true,
"eslint.validate": [
{
"language": "vue",
"autoFix": true
},
{
"language": "javascript",
"autoFix": true
},
{
"language": "javascriptreact",
"autoFix": true
}
],
"vetur.format.defaultFormatter.js": "prettier-eslint",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
\ No newline at end of file
FROM node:lts
LABEL maintainer="heinzke@ebi.ac.uk"
ENV APP_SOURCE /usr/src/malaria
RUN mkdir -p $APP_SOURCE
WORKDIR $APP_SOURCE
RUN apt-get update -qq -y && \
apt-get upgrade -qq -y && \
apt-get install -qq -y git
COPY . $APP_SOURCE
ARG DELAYED_JOBS_API
ENV DELAYED_JOBS_API $DELAYED_JOBS_API
RUN npm install && npm run build
ENV HOST 0.0.0.0
EXPOSE 3000
ENTRYPOINT [ "npm", "start" ]
Copyright 2020 Lina Heinzke
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# unichem-portal
> large-scale non-redundant database of pointers between chemical structures and chemistry resources.
## Build Setup
``` bash
# install dependencies
$ npm run install
# serve with hot reload at localhost:3000
$ npm run dev
# build for production and launch server
$ npm run build
$ npm run start
# generate static project
$ npm run generate
```
For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).
import axios from 'axios'
export default class ChemblAPI {
delayedJobsAPI() {
const path = process.env.delayedJobsApiUrl
return axios.create({
baseURL: path,
withCredentials: false,
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
'Cache-Control': 'no-cache'
}
})
}
// resultFileAPI() {
// const path = 'http://hx-rke-wp-webadmin-04-worker-3.caas.ebi.ac.uk:30316/'
// }
}
export default class TestData {
getData() {
return {
values: [
[-28.17443912180648, 1.0],
[-24.919042378950337, 0.0],
[-21.663645636094195, 0.0],
[-18.408248893238053, 0.0],
[-15.152852150381909, 3.0],
[-11.897455407525765, 5.0],
[-8.642058664669623, 10.0],
[-5.386661921813481, 43.0],
[-2.1312651789573387, 108.0],
[1.1241315638988034, 142.0],
[4.379528306754949, 168.0],
[7.634925049611091, 206.0],
[10.890321792467233, 186.0],
[14.145718535323375, 177.0],
[17.401115278179518, 149.0],
[20.65651202103566, 155.0],
[23.9119087638918, 117.0],
[27.167305506747944, 119.0],
[30.422702249604082, 116.0],
[33.67809899246023, 86.0],
[36.93349573531638, 96.0],
[40.18889247817251, 69.0],
[43.44428922102866, 55.0],
[46.6996859638848, 50.0],
[49.955082706740946, 40.0],
[53.21047944959708, 31.0],
[56.46587619245323, 24.0],
[59.721272935309365, 25.0],
[62.97666967816551, 17.0],
[66.23206642102164, 15.0],
[69.4874631638778, 14.0],
[72.74285990673394, 14.0],
[75.99825664959008, 9.0],
[79.25365339244624, 6.0],
[82.50905013530237, 4.0],
[85.76444687815851, 7.0],
[89.01984362101464, 8.0],
[92.27524036387081, 5.0],
[95.53063710672694, 3.0],
[98.78603384958308, 9.0],
[102.04143059243924, 8.0],
[105.29682733529538, 5.0],
[108.55222407815151, 2.0],
[111.80762082100765, 3.0],
[115.06301756386381, 5.0],
[118.31841430671994, 2.0],
[121.57381104957608, 3.0],
[124.82920779243221, 5.0],
[128.08460453528838, 4.0],
[131.3400012781445, 3.0],
[134.59539802100062, 2.0],
[137.8507947638568, 2.0],
[141.10619150671295, 2.0],
[144.36158824956908, 2.0],
[147.61698499242522, 4.0],
[150.87238173528138, 3.0],
[154.12777847813751, 3.0],
[157.38317522099365, 1.0],
[160.63857196384976, 0.0],
[163.89396870670595, 1.0],
[167.14936544956208, 3.0],
[170.40476219241822, 3.0],
[173.66015893527435, 1.0],
[176.91555567813052, 0.0],
[180.17095242098665, 0.0],
[183.42634916384276, 0.0],
[186.68174590669895, 0.0],
[189.93714264955508, 1.0],
[193.19253939241122, 1.0],
[196.44793613526735, 0.0],
[199.70333287812352, 0.0],
[202.95872962097965, 2.0],
[206.2141263638358, 0.0],
[209.4695231066919, 1.0],
[212.7249198495481, 1.0],
[215.98031659240422, 0.0],
[219.23571333526036, 1.0],
[222.4911100781165, 0.0],
[225.74650682097268, 1.0],
[229.00190356382876, 1.0],
[232.25730030668495, 0.0],
[235.5126970495411, 0.0],
[238.76809379239722, 0.0],
[242.02349053525336, 1.0],
[245.2788872781095, 0.0],
[248.53428402096563, 0.0],
[251.78968076382176, 1.0],
[255.04507750667793, 0.0],
[258.3004742495341, 0.0],
[261.55587099239017, 0.0],
[264.81126773524636, 0.0],
[268.06666447810244, 0.0],
[271.32206122095863, 0.0],
[274.5774579638147, 0.0],
[277.8328547066709, 0.0],
[281.0882514495271, 0.0],
[284.34364819238317, 1.0],
[287.59904493523936, 0.0],
[290.85444167809544, 0.0],
[294.10983842095163, 0.0],
[297.3652351638077, 0.0],
[300.6206319066639, 0.0],
[303.8760286495201, 0.0],
[307.1314253923762, 0.0],
[310.38682213523236, 1.0],
[313.64221887808844, 0.0],
[316.89761562094463, 0.0],
[320.1530123638007, 1.0],
[323.4084091066569, 0.0],
[326.66380584951304, 0.0],
[329.9192025923692, 1.0],
[333.17459933522537, 0.0],
[336.42999607808144, 0.0],
[339.68539282093764, 1.0],
[342.9407895637937, 0.0],
[346.1961863066499, 0.0],
[349.45158304950604, 0.0],
[352.7069797923622, 0.0],
[355.96237653521837, 0.0],
[359.21777327807445, 1.0],
[362.47317002093064, 0.0],
[365.7285667637867, 0.0],
[368.9839635066429, 0.0],
[372.239360249499, 0.0],
[375.4947569923552, 0.0],
[378.75015373521137, 0.0],
[382.00555047806745, 0.0],
[385.26094722092364, 0.0],
[388.5163439637797, 0.0],
[391.7717407066359, 0.0],
[395.027137449492, 0.0],
[398.2825341923482, 0.0],
[401.5379309352044, 0.0],
[404.79332767806045, 0.0],
[408.04872442091664, 0.0],
[411.3041211637727, 0.0],
[414.5595179066289, 0.0],
[417.814914649485, 0.0],
[421.0703113923412, 1.0],
[424.3257081351973, 0.0],
[427.58110487805345, 0.0],
[430.83650162090964, 0.0],
[434.0918983637657, 0.0],
[437.3472951066219, 0.0],
[440.602691849478, 0.0],
[443.8580885923342, 0.0],
[447.1134853351903, 0.0],
[450.36888207804645, 0.0],
[453.62427882090265, 0.0],
[456.8796755637587, 0.0],
[460.1350723066149, 0.0],
[463.390469049471, 0.0],
[466.6458657923272, 0.0],
[469.90126253518326, 0.0],
[473.15665927803946, 0.0],
[476.41205602089565, 0.0],
[479.6674527637517, 0.0],
[482.9228495066079, 0.0],
[486.178246249464, 0.0],
[489.4336429923202, 0.0],
[492.6890397351764, 0.0],
[495.94443647803246, 0.0],
[499.19983322088865, 0.0],
[502.4552299637447, 0.0],
[505.7106267066009, 0.0],
[508.966023449457, 0.0],
[512.2214201923132, 0.0],
[515.4768169351694, 0.0],
[518.7322136780255, 0.0],
[521.9876104208815, 0.0],
[525.2430071637377, 0.0],
[528.4984039065939, 0.0],
[531.75380064945, 0.0],
[535.0091973923062, 0.0],
[538.2645941351623, 0.0],
[541.5199908780185, 0.0],
[544.7753876208747, 0.0],
[548.0307843637307, 0.0],
[551.2861811065868, 0.0],
[554.541577849443, 0.0],
[557.7969745922992, 0.0],
[561.0523713351554, 0.0],
[564.3077680780115, 0.0],
[567.5631648208675, 0.0],
[570.8185615637237, 2.0],
[574.0739583065799, 0.0],
[577.329355049436, 0.0],
[580.5847517922921, 0.0],
[583.8401485351483, 0.0],
[587.0955452780045, 0.0],
[590.3509420208607, 0.0],
[593.6063387637167, 0.0],
[596.8617355065728, 0.0],
[600.117132249429, 0.0],
[603.3725289922852, 0.0],
[606.6279257351413, 0.0],
[609.8833224779975, 0.0],
[613.1387192208535, 0.0],
[616.3941159637097, 0.0],
[619.6495127065659, 1.0]
],
t1: 171.91550243418868,
t10: 58.079560454031885,
t50: 20.413561435785848,
counts: { t50: 1190, t10: 238, t1: 23 }
}
}
}
# ASSETS
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.