React Frontend of cBioPortal 🎉
Branch: master
Clone or download
inodb Merge pull request #1975 from leexgh/exon-column-in-mutation-table
exon number column and HGVSc column in mutation table
Latest commit 565655e Feb 22, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci e2e fixes exon/hgvsc column Feb 22, 2019
.github Create ISSUE_TEMPLATE.md Jan 22, 2019
end-to-end-tests e2e fixes exon/hgvsc column Feb 22, 2019
env Automated master to release-2.1.0 merge Feb 12, 2019
loaders Add automated test writer/formatter to build when in dev mode Nov 8, 2017
resources Build header component to display significant mutational signatures Aug 9, 2018
scripts e2e fixes exon/hgvsc column Feb 22, 2019
src Always try to show exon info Feb 21, 2019
typings Merge remote-tracking branch 'origin/master' into release-2.1.0 Feb 20, 2019
.babelrc migrate clincical information tables to use reactablemsk component Nov 17, 2016
.bootstraprc fix extraction of styles to make sure css from lazy loading is extrac… Apr 3, 2017
.codeclimate.yml Fix codeclimate/codeclimate-eslint#127 Oct 17, 2016
.eslintignore file structure Sep 27, 2016
.eslintrc.json added ts-loader to webpack config Oct 7, 2016
.gitignore e2e fixes exon/hgvsc column Feb 22, 2019
LICENSE Initial commit Aug 25, 2016
OPEN-SOURCE-DOCUMENTATION Bundle the licence for the included colour scheme Feb 20, 2018
Procfile heroku: include protocol Feb 11, 2019
README.md Migrate to yarn package manager Jan 22, 2019
app.json Migrate to yarn package manager Jan 22, 2019
font-awesome.config.js fix extraction of styles to make sure css from lazy loading is extrac… Apr 3, 2017
karma.conf.js Update dependencies based on npm audit Dec 10, 2018
my-index.ejs Change resolution of CBIOPORTAL_URL to keep protocol configuration Feb 11, 2019
netlify.toml Set yarn to latest version 1.13.0 Jan 25, 2019
package.json e2e fixes exon/hgvsc column Feb 22, 2019
pom.xml Fix yarn version in pom.xml Jan 28, 2019
sass-resources.scss Upgrade to webpack 3, use forked ts complilation, optimize sass resou… Dec 27, 2017
tests.webpack.js fix tests broken by enzyme upgrade 2->3 Jan 2, 2019
tsconfig.json Refactored oncoprinter Dec 21, 2018
tsconfig.ts add new ts lint rules and upgrade tslint Aug 22, 2017
tslint.json Add cancer summary results bar graph. Sep 11, 2017
vendor-bundles.webpack.config.js Upgrade to React 16.6.3 Jan 2, 2019
webpack.config.js Automated master to release-2.1.0 merge Feb 12, 2019
yarn.lock Merge remote-tracking branch 'origin/master' into release-2.1.0 Feb 20, 2019

README.md

cbioportal-frontend

Join the chat at https://gitter.im/cBioPortal/public-chat

Live demo

Master: http://cbioportal-frontend.herokuapp.com/patient?studyId=prad_fhcrc&caseId=00-090

Rc: http://cbioportal-frontend-rc.herokuapp.com/patient?studyId=prad_fhcrc&caseId=00-090

Test status & Code Quality

Branch master rc
Status CircleCI CircleCI

codecov

Code Climate

Deployment

Deploy

This is the frontend code for cBioPortal using React, MobX and TypeScript. The frontend for the new patient view is now completely in this repo. The results view page is currently being replaced one tab at a time by mounting certain React components to the results page (JSP) in the backend repo

Make sure you have installed the node version specified in package.json. You might want to use NVM to install the particular version.

Remove old compiled node_modules if exists

rm -rf node_modules

To install all app and dev dependencies

yarn install --frozen-lockfile

To build DLLs in common-dist folder (must be done prior to start of dev server)

yarn run buildDLL:dev

To start dev server with hot reload enabled

# set the environment variables you want based on what branch you're branching
# from
export BRANCH_ENV=master # or rc if branching from rc
# export any custom external API URLs by editing env/custom.sh
yarn run start

Example pages:

To run unit/integration tests (need to have API URL defined in .env)

yarn run test

To run unit/integration tests in watch mode

yarn run test:watch

To run unit/integration tests in watch mode (where specName is a fragment of the name of the spec file (before .spec.))

yarn run test:watch -- --grep=#specName#

To run linting

yarn run lint

precommit hook

There is a precommit hook installed that lint checks the typescript in this project. The hook can be viewed in package.json. You can skip it with

git commit -n

Changing the URL of API

If the version of the desired API URL is the same as the one used to generate the typescipt client, one can change the API_ROOT variable for development in my-index.ejs. If the version is different, make sure the API endpoint works with the checked in client by changing the API URL in package.json and running:

# set the environment variables you want based on what branch you're branching
# from
export BRANCH_ENV=master # or rc if branching from rc
# export any custom external API URLs by editing env/custom.sh
yarn run updateAPI
yarn run test

Check in cBioPortal context

Go to http://cbioportal.org (master branch) or http://cbioportal.org/beta/ (rc branch)

In your browser console set:

localStorage.setItem("localdev",true)

This will use whatever you are running on localhost:3000 to serve the JS (i.e. you need to have the frontend repo running on port 3000). To unset do:

localStorage.setItem("localdev",false)

or clear entire local storage

localStorage.clear()

You can also use a heroku deployed cbioportal-frontend pull request for serving the JS by setting localStorage to:

localStorage.setItem("heroku", "cbioportal-frontend-pr-x")

Change x to the number of your pull request.

Run e2e tests

Install webdriver-manager, which manages standalone Selenium installation:

yarn install -g webdriver-manager

Run updater to get necessary binaries

webdriver-manager update

Start the webdriver-manager

webdriver-manager start

In one terminal run frontend (this will get mounted inside whatever CBIOPORTAL_URL is pointing to)

# set the environment variables you want based on what branch you're branching
# from
export BRANCH_ENV=master # or rc if branching from rc
# export any custom external API URLs by editing env/custom.sh
yarn run start

In another terminal run the e2e tests

# set the environment variables you want based on what branch you're branching
# from
export BRANCH_ENV=master # or rc if branching from rc
# export any custom external API URLs in env/custom.sh
cd end-to-end-tests
yarn install
yarn run test-webdriver-manager