* Update readme for eb server.
Update the README with new way of handling secrets.
Update portions that were out of date.
Add a section for Authentication and a placeholder for User Annotations.
Also remove an obsolete function that processes the AWS secrets.
#1522
Co-authored-by: Madison Dunitz <madison.dunitz@chanzuckerberg.com>
* split out config
* add tests for base and app config, refactor client config out of app config
* refactor default config retrieval
* create config test class and helper functions
* move default_config into server to fix import issue
* Fixes from frontend/backend url separation
This fixes the CORS and CSP headers.
Also, in thie commit, I removed the cors_supports_credentials config parameter,
which was recently introduced.
Instead, the logic determines the need to use CORS headers if the
web_page_url is set.
#1778
* Fix error message when datapath and dataroot are not provided
Previously:
$ cellxgene launch
cellxgene] Starting the CLI...
AttributeError: 'NoneType' object has no attribute 'startswith'
With this fix:
$ cellxgene launch
[cellxgene] Starting the CLI...
Error: missing datapath
* lint
* add disclaimer about changing the script
* add hash for obsolete browser script
* add explicit domain img-src
* add single quotes
* add quotes to `data:`
* change order and remove single quotes
* lint, remove extra slash, and make hash an array
* add links to S3
* surround script has in single quotes
* Small fix for handling display versions
Making a distinction between __version__ and the version we display in the info panel (displayr_version).
The hosted cellxgene can overwrite the display_version using a plugin.
Improve version handling in the customized assets
This will give us the ability to specify different config options for
different dataroots.
the key of the dataroot dictionary is no longer the same as the dataroot_url.
Previously key==dataroot_url, and now those are separated.
Added an "is_multi_dataset" function to simplify logic where it branched on single vs multi.
Simplified the rest.py interface by no longer passing in the user annotations object, since
that can be retrieved from the dataset.
There seem to be breaking changes in Chrome that are causing this to
fail. We've weighed the risk of disabling the feature with the issues
we've encountered using it and decided to disable it for now.
* 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>
* 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
* 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>
* 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
* 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'
* Improvements to the matrix cache
- Add a timelimit for the matrix in the cache.
Once the timelimit is reached, the matrix can be removed.
- If a DatasetAccessError occurs, then remove the dataset
from the matrix cache.
Fixes#1322
Mostly this is just instructions for how to do this,
with a small addition to the makefile.
This enables support for serving the about_legal_tos and about_legal_privacy
from the cellxgene server.
* Added a config hook for secret key into the app.
the server first looks in an environment variable,
then looks in a config file.
For the cellxgene launch app, a default key is used if none is provided.
For the eb app, a secret key must be provided.
* work around anndata bug 344
* fix accidental cut and paste error
* Use modified make_index_unique function
Temporarily copy code from https://github.com/theislab/anndata/pull/345
until the issue is resolved and released.
* Add notes and test for make_index_unique
* Lint fix
* Format python
Co-authored-by: Matt Weiden <538456+mweiden@users.noreply.github.com>
* Introduce a config file to cellxgene
The config file format is in yaml. The default config is located
in server/common/default_config.py. A user may create a yaml file
that contains a subset of these fields. It can be used during cellxgene
launch, or for hosted cellxgene.
The code has also been refactored. Much of the logic to check arguments
has moved from launch to app config.
It is now possible to set the tiledb context parameters using the config
file. Other feature will soon be handled in a similar way.
* Improve hosted cellxgene
- option to turn off the test index page, or supply a page for redirect.
For EB, The default is to return 404. For cli launch, the default is the test page.
- option to select which matrix types are allowed for multi dataset servers.
For EB, The default is CXG only. For cli launch, the default is any matrix type.
- Return early with an error response if diffexp is requested when not configured
- Verified that reembedings and user annotations also return with an error response
if used when not enabled.
TODO: The new options cannot currently be set by the user.
I plan to add a configuration file where these and all other settings can be set.
Fixes#1210Fixes#1228Fixes#1229