Commit Graph

1173 Commits

Author SHA1 Message Date
Severiano Badajoz
140e6d8552 add lint-staged 2020-05-20 15:04:53 -07:00
Severiano Badajoz
35cfddca19 add eslint-prettier 2020-05-20 14:57:59 -07:00
Matt Weiden
efdae22fbe Lengthen e2e test timeout to account for page load (#1488) 2020-05-20 14:55:43 -07:00
Severiano Badajoz
b06b08ce33 Fix centroid label + continuous color-by interactions (#1484)
* add case to removing labels

* add disabled state to centroid button

* fix centroid test button clicking order

* don't accidentally un-toggle first color
2020-05-20 14:02:10 -07:00
Colin Megill
bc5b01da0f Break out anno plus button (#1473)
* break out plus button

* remove menu item

* padding, remove icon

* icon padding
2020-05-20 16:22:29 -04:00
Severiano Badajoz
ce819383af re-enable front-end lint test (#1483)
* change lint to only src

* reenable lint all
2020-05-19 15:46:04 -07:00
Bruce Martin
2992d17c1d add more detasets to hosted site (#1481)
* add more detasets to hosted site

* fix build
2020-05-19 14:24:27 -07:00
Severiano Badajoz
c34a68304e remove all linting errors on client/src (#1463)
* run eslint --fix

* camelcase

* camelCase config part 1

* part 2

* part 3 - removing subscripts

* fix "class-methods-use-this"

* fix "class-methods-use-this"

* fix eslint ignores

* add eslint ignore for set state in update

* reformat comments to appease eslint

* add a11y features

* sort-comp fix

* a11y fix

* add ignore for set state in update

* add a11y htmlFor

* remove unused toast

* remove unnecessary bind

* add ignore for set state in update

* add rel="noopener noreferrer"

Using target="_blank" without rel="noopener noreferrer" is a security risk: see https://mathiasbynens.github.io/rel-noopener

* use arrow function to bind

* remove unused definitions/declarations

* prettier

* remove unused state

* add comments to empty catch blocks remove curly brackets

* escape '

* use eqeqeq

* switch from default export

* remove ignore log

* remove static

* fix import

* revert subscripting config

* clean-up

* remove unnecessary subscript

* fix new errors from master

* change category click handler to a class property

* fix camelcase changes that slipped by

* unused import

* Fix newly introduced ESLint errors from addGenes
2020-05-19 12:38:29 -07:00
Colin Megill
5fc76edf2d Factor adding genes into own component (#1480)
* factor out add genes to own component

* correct import
2020-05-19 11:41:49 -04:00
Matt Weiden
e21997799c Upgrade python requirements to click>=7.1.2 (#1472)
6.7 does not have the `hidden` flag used in the code. Users building the
app with an older version of click within the current range specified by
requirements.txt may fail.
2020-05-14 10:04:28 -07:00
Matt Weiden
730410c5e1 Autoformat python to fix lint errors (#1470)
* Autoformat python to fix lint errors

* Fix lint errors not caught by black
2020-05-12 13:19:38 -07:00
Matt Weiden
e55595cc55 Fix smoke tests to work with remote deployments of cellxgene (#1469)
* Add test for terms of service

* Add workaround for chromium CSP require-trusted-types-for error
2020-05-12 13:01:57 -07:00
Bruce Martin
c1bf491a96 Hooks for sentry integration (#1460)
* add sentry webpack plugin

* allow override of webpack config

* work around cheerio inability to parse jinga templates

* webpack can not minify jinja templates

* allow script injection to specify other attributes

* allow script injection to specify other attributes

* Adjustments to make plugin systems work

* Add sourcemaps for javascript in prod webpack

* Update .gitignore

* Fix spelling errors

Co-authored-by: Matt Weiden <538456+mweiden@users.noreply.github.com>
2020-05-08 15:59:56 -07:00
Colin Megill
9026e0ce41 Sci notation on continuous legend (#1450)
* sci notation on continuous legend

* significant digits
2020-05-07 12:59:10 -04:00
Colin Megill
7ec9bb92f7 Create new label button overflow (#1459)
* Tighten up copy

* amp;
2020-05-07 12:58:21 -04:00
Matt Weiden
888f730526 Refactor CSS and React logic for layout (#1424)
* Refactor CSS layout and react logic for layout

Fixes https://github.com/chanzuckerberg/cellxgene/issues/1022

* Menubar should wrap inside middle pane instead of overlapping left
  sidebar when window is scrunched
* cellxgene should have a minimum width of 1240px

1. Replace absolute positioning and dimension calculation with css grid
2. Use flexbox for wrapping menubar buttons

* Middle pane (graph) can calculate its own size
* Removing components calculating their size/position relative to
  eachother increases modularity, decreases use of global variables
* Improved some scrollbar behavior
* Removed responsive reducer, propagating window size to components
  triggers unnecessary events and encourages breaking modularity; doing
  this made some components state agnostic

Reference: https://css-tricks.com/snippets/css/complete-guide-grid/

* Reposition the continuous legend

* Small fixes

* Respond to feedback from @colinmegill

* Respond to feedback from @colinmegill

Add more documentation on the renderGraph method.
2020-05-06 13:46:13 -07:00
Matt Weiden
a7d641ea6b Provide ToS button identifiers for smoke test to use (#1462) 2020-05-06 13:45:09 -07:00
bmccandless
f49507f18a app_config, fix bug with list/tuple command line arguments. (#1464)
* app_config, fix bug with list/tuple command line arguments.

There was a error caused by pyyaml using lists, and click using tuples.
Now tuples are automatically converted to lists when the config is
updated.
2020-05-06 12:00:02 -07:00
Matt Weiden
5947306ca0 Add server plugin system (#1447)
* Add server plugin system

Plugins are optional modules loaded at runtime. Specification:
* Plugins are loaded from the server.plugins module (directory
  server/plugins)
* The import_plugins method is run as part of the initialization of the
  server module in __init__.py

* Add plugins to the EB build process

* Remove bit of dead code

* Respond to feedback from @bmccandless
2020-05-05 17:05:42 -07:00
Colin Megill
67d7b8160f was 27, 41 was too long, 33 seems ok (#1458) 2020-05-05 15:47:18 -04:00
Colin Megill
630b59d4a7 remove popover (#1456) 2020-05-05 14:34:11 -04:00
bmccandless
55a7967001 Add a process for specifying exact requirements for an EB deployment (#1451)
Add a process for keeping specifying exact requirements for an EB deployment
2020-05-05 10:51:02 -07:00
bmccandless
61ca75e846 hosted, update order to look for config file. (#1452)
* hosted, update order to look for config file.

The app now uses a local config.yaml file bundled with the artifact
(if present), if it exists, then looks in the CXG_CONFIG_FILE
environment variable.  This is the reverse of previous behavior.
The purpose of this change is to move away from using the
config file on s3, since that could lead to problem where an older
version of the app uses a newer version of the config.

Also in this PR:
1. Changed documentation around dataroot, to describe the posibility of using lustre.
2. Added a few improvements around the secret manager region name.  If we use lustre for dataroot and a local config file, then we will no longer be able to
auto determine the region for the secret manager.  I plan to start using the
environment variable option for hosted cellxgene.

* small edit to README

Co-authored-by: Severiano Badajoz <sbadajoz@chanzuckerberg.com>
2020-05-05 10:50:28 -07:00
Matt Weiden
1ee76826c7 Pin tiledb version 0.5.9 (#1453)
There is a regression in 0.6.0
2020-05-05 10:03:57 -07:00
Bruce Martin
f42f5151a6 Refactor build and CSP headers for Safari compat (#1442)
* add unsafe-inline directive to style-src

* debugging - turn on csp reporting

* revert reporting only csp

* do not inline JS and CSS in build

* enable HTTPs only when in production mode

* remove debug printf

* fix clean target

* revert force_https removal
2020-05-04 12:47:35 -07:00
Severiano Badajoz
6cccc41c0f run prettier(2.0.5) (#1438) 2020-05-04 10:26:42 -07:00
bmccandless
b255e32548 Add a more consistent way to customize the eb deployment (#1446)
* Add a more consistent way to customize the eb deployment

Plus a few minor bugfixes
2020-05-04 09:52:03 -07:00
Matt Weiden
a17fff83cf Return empty colors for .cxg v0.0 files (#1441)
* Return empty colors for .cxg v0.0 files

Fixes https://github.com/chanzuckerberg/cellxgene/issues/1440

The CxgAdaptor.get_colors method currently assumes that the .cxg file has
cxg_group_metadata. As a result, the /api/v0.2/colors endpoint always fails for
.cxg v0.0 files.

* Add test fixture
2020-04-30 17:21:20 -07:00
Matt Weiden
40fbc42b13 Cache crossfilter when embedding type is changed (#1439)
Fixes https://github.com/chanzuckerberg/cellxgene/issues/1433

When selection is deselected the world is reset to the universe the
crossfilter is reset to that in the resetCache, including the embeddings
in the layout_XY dim.  However, the embedding selection stays the same.

If the embedding selected is not the default, the embedding shown to the
user will be different than the embedding layout_XY in the crossfilter,
causing lasso selections to be made against the wrong embedding
coordinates
2020-04-30 13:48:14 -07:00
bmccandless
cd821a0344 Update the EB build process to package in scripts (#1434)
This is implemented specifically to handle the google analytics
script for hosted cellxgene
2020-04-28 14:38:35 -07:00
bmccandless
e495c571c3 Change the EB log level from DEBUG to INFO (#1435)
The log level was mistakenly set to DEBUG, which sent out tons
of less than useful messages.  INFO works much more useful,
and much less verbose.
2020-04-28 14:37:41 -07:00
Bruce Martin
05fcdaf93c Revised terms and privacy consent dialog, analytics hooks (#1426)
* revised terms and privacy consent

* reorg code

* fix conditional

* Overlay reflects un-dissmissable state

* add inline scripts, and consent callback

* add csp_directive config hook

* revert config.yaml

* fix logic error

Co-authored-by: Colin Megill <colinmegill@gmail.com>
2020-04-28 14:21:53 -07:00
Madison Dunitz
666e6d9849 Add Deployment hook (#1430)
* test deployment hook

* remove test branch

* update heroku review deployment
2020-04-27 13:01:31 -07:00
Matt Weiden
546e272a60 Add user-defined category-label colors (#1402)
* Add user-defined category-label colors

Fixes https://github.com/chanzuckerberg/cellxgene/issues/1152

As described in https://github.com/chanzuckerberg/cellxgene/issues/1307

* Respond to feedback from @bkmartinjr in nodejs

* Respond to feedback from @bkmartinjr in python

* Add tests to the server module

* Autoformat python, run linter

* Make colors_get error handling specific

* Respond to feedback from @bkmartinjr

* Respond to feedback from @bkmartinjr

* Fix whitespace

* Fix python lint errrors

* Update documentation

* Add --disable-user-colors option to launch and cxgtool.py

* Fix python formatting

* Rename '--disable-user-colors' to '--disable-custom-colors'
2020-04-26 22:52:57 -07:00
Bruce Martin
3c191c3f93 add dsuid 25 (#1429) 2020-04-26 07:53:49 -07:00
Eduardo Lopez
565a3f148d [feature] Prototype a Heroku deployment of hosted cellxgene (#1427)
* hello world

* stuff

* successful build

* updates"

* maybe a basic example

* simplify

* reamde into dockerfile

* some more stuff

* Release procfile

* package.json at top levle

* don't release in procfile for now

* more package.json stuff

* copy assets

* merge master

* not in the relase phase

* revert not necessary

* pin gunicorn version

* reset common.mk

* Update package.json

Co-authored-by: Madison Dunitz <dunitzm@gmail.com>
2020-04-24 12:44:38 -07:00
Bruce Martin
d31b7dc797 clamp brush selection range to data range (#1423) 2020-04-24 09:24:01 -07:00
Bruce Martin
735eb11eb7 refinments to csp (#1422) 2020-04-23 09:54:09 -07:00
Matt Weiden
a2047b90ae Make the URL hit by jest smoke tests configurable (#1420)
* Make the URL hit by jest smoke tests configurable

* Fix typo

* Make names consistent
2020-04-22 15:23:11 -07:00
Bruce Martin
9b12b729c9 more data (#1419) 2020-04-21 18:22:52 -07:00
Bruce Martin
8742f9094e cleanup (#1411) 2020-04-20 09:56:26 -07:00
Severiano Badajoz
8b59755157 increase category label max length (#1394) 2020-04-20 09:48:47 -07:00
Bruce Martin
cbcd3f4f8f ensure crossfilter index dimensions match data (#1409) 2020-04-19 08:44:46 -07:00
Bruce Martin
5dc40158c4 disable eslint in github workflow (#1412) 2020-04-18 09:06:05 -07:00
Bruce Martin
55ef1448e8 CSP content hashes (#1406)
* remove duplicate content-type header

* plumbing to compute CSP content hashes

* add logging of missing CSP hashes

* convert sub-class init protocol to static

* factor function

* lint
2020-04-17 11:42:09 -07:00
Bruce Martin
d22300e3db fix typo in cxgtool bool handler (#1404) 2020-04-17 11:11:14 -07:00
bmccandless
03a75ec566 s3 listings were cached, preventing new datasets from being accessible (#1408)
Fixes #1407
2020-04-17 10:14:24 -07:00
Matt Weiden
58e4c2489b Auto format python, make sure it passes lint checks (#1401) 2020-04-16 08:07:10 -07:00
bmccandless
7e7ed74b92 Provide a hook into the AWS Secret Manager for the flask secret key (#1398)
Also, the secret manager required a region name, so there was some
refactoring around how regions are handled.

Fixes #1239
2020-04-15 14:33:40 -07:00
Matt Weiden
95ade476e8 Add end of line marker to lint diff regexp (#1400)
This prevents json files from being linted
2020-04-15 13:46:36 -07:00