Currently, if there is no build directory, the `make install` target
will attempt to cd into the build directory, fail, and run pip install
-e . in the root directory anyway. This causes cellxgene to be installed
from the source tree instead of what the user would expect.
This commit changes the behavior such that the `make install` will fail
if there is no build directory.
* 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
There is a small chicken and egg problem.
The config file could be in s3, therefore when using the DataLocator to
download the config file, we don't yet have an app_config object.
Adding a check to handle this case.
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.
See sample of current behavior below:
```
venv❯ cellxgene prepare example-dataset/pbmc3k.h5ad
[cellxgene] Starting CLI...
Error: [cellxgene] cellxgene prepare has not been installed. Please run
`pip install cellxgene[prepare]` to install the necessary requirements.
~/workspace/cellxgene mweiden/446-custom-color-palette*
1 venv❯ pip install cellxgene[prepare]
zsh: no matches found: cellxgene[prepare]
```
Fix:
Wrap cellxgene[prepare] in single quotes.
* Improved fix for matrix cache handling.
During the MatrixDataCacheItem acquire function there was a
time when the write lock was released and the read lock was taken.
During that time, the dataset could have been deleted, later
result in the MatrixDataCacheManageri data adaptor returning None.
The solution is to demote the writer lock to a reader lock instead
of unlocking and relocking.
Also, when a the cache needs to delete an entry, the delete
is done outside the MatrixDataCacheManager lock. This operation
only requires the write lock for the MatrixDataCacheItem.
Fixes#1255
* 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>
* black reformat
* tighten up error reporting
* lint
* fine tuning
* additional improvements in exception handling
* lint
* include exception and traceback in log
* fix typo
* 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
* Fix for favicon with --dataroot
* fix static assets in hosted cxg
The web proxy at aws eb was not finding the static assets.
The solution here is very simple: just copy the directory
containing the static assets to the top level of the artifact.zip.
This is not really the ideal solution. According to the AWS
docs you can make a mapping to the correct location in an
an ebextentions config file. I tried this and many combinations but
was not able to get this to work following that pattern.
Since we control the construction of the zip file, the solution
here isn't bad, but it could probably be made better.
* Add color mapping to the bar chart.
* Change histogram color generation from Viridis to InterpolateCool.
* Coloring of Histrogram based up the x axis instead of y axis.
Coloring of Histrogram based up the x axis instead of y axis.
* Respond to feedback from @colinmegill
* Only color histograms that are selected for colorby
* Add some small refactors to BrushableHistogram's componentDidUpdate
* Fix histogram coloring and binning
* Reuse binning functions from util/dataframe/histogram.js; this fixes
an issue with there being near-zero width bins
* Fix color mapping so that it matches the scale in the legend
* Do not attempt to plot bins if the calculated binWidth is zero; this
can happen if all values are the same
* Refactor the function that draws the histogram a bit
* Respond to feedback from @bkmartinjr
Co-authored-by: Donald Paul Herman <Donaldpherman@hotmail.com>