mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-08 18:28:11 +08:00
Small fix for handling display versions (#1625)
* 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 commit is contained in:
@@ -41,11 +41,11 @@ const InformationMenu = React.memo((props) => {
|
|||||||
/>
|
/>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
target="_blank"
|
target="_blank"
|
||||||
text={`cellxgene v${
|
text={
|
||||||
libraryVersions && libraryVersions.cellxgene
|
libraryVersions && libraryVersions.cellxgene
|
||||||
? libraryVersions.cellxgene
|
? libraryVersions.cellxgene
|
||||||
: null
|
: null
|
||||||
}`}
|
}
|
||||||
/>
|
/>
|
||||||
<MenuItem text="MIT License" />
|
<MenuItem text="MIT License" />
|
||||||
{tosURL ? (
|
{tosURL ? (
|
||||||
|
|||||||
@@ -16,12 +16,6 @@ define full_path
|
|||||||
$(shell [[ $(1) = /* ]] && echo $(1) || echo $(PROJECT_ROOT)/$(1))
|
$(shell [[ $(1) = /* ]] && echo $(1) || echo $(PROJECT_ROOT)/$(1))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# https://stackoverflow.com/a/14777895/9587410
|
|
||||||
ifeq ($(shell uname),Darwin) # is Windows_NT on XP, 2000, 7, Vista, 10...
|
|
||||||
IS_DARWIN := "true"
|
|
||||||
endif
|
|
||||||
|
|
||||||
export CELLXGENE_COMMIT := $(shell git rev-parse --short HEAD)
|
|
||||||
export CXG_SERVER_PORT := $(call env_or_else_default,CXG_SERVER_PORT)
|
export CXG_SERVER_PORT := $(call env_or_else_default,CXG_SERVER_PORT)
|
||||||
export CXG_CLIENT_PORT := $(call env_or_else_default,CXG_CLIENT_PORT)
|
export CXG_CLIENT_PORT := $(call env_or_else_default,CXG_CLIENT_PORT)
|
||||||
export CXG_OPTIONS := $(call env_or_else_default,CXG_OPTIONS)
|
export CXG_OPTIONS := $(call env_or_else_default,CXG_OPTIONS)
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
from server.common.utils import import_plugins
|
from server.common.utils import import_plugins
|
||||||
|
|
||||||
__version__ = "0.15.0"
|
__version__ = "0.15.0"
|
||||||
|
display_version = "cellxgene v" + __version__
|
||||||
|
|
||||||
import_plugins("server.plugins")
|
import_plugins("server.plugins")
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from server import __version__ as cellxgene_version
|
from server import display_version as cellxgene_display_version
|
||||||
from flatten_dict import flatten, unflatten
|
from flatten_dict import flatten, unflatten
|
||||||
import os
|
import os
|
||||||
from os.path import splitext, basename, isdir
|
from os.path import splitext, basename, isdir
|
||||||
@@ -213,7 +213,7 @@ class AppConfig(object):
|
|||||||
# library_versions
|
# library_versions
|
||||||
library_versions = {}
|
library_versions = {}
|
||||||
library_versions.update(data_adaptor.get_library_versions())
|
library_versions.update(data_adaptor.get_library_versions())
|
||||||
library_versions["cellxgene"] = cellxgene_version
|
library_versions["cellxgene"] = cellxgene_display_version
|
||||||
|
|
||||||
# links
|
# links
|
||||||
links = {"about-dataset": about}
|
links = {"about-dataset": about}
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ def import_plugins(plugin_module):
|
|||||||
module = importlib.import_module(full_name)
|
module = importlib.import_module(full_name)
|
||||||
logging.info(f"Imported plugin {full_name}")
|
logging.info(f"Imported plugin {full_name}")
|
||||||
loaded_modules.append(module)
|
loaded_modules.append(module)
|
||||||
except ModuleNotFoundError:
|
except ModuleNotFoundError as e:
|
||||||
logging.debug(f"No plugins found in module: {plugin_module}")
|
logging.error(f"No plugins found in module: {plugin_module}: {str(e)}")
|
||||||
|
|
||||||
return loaded_modules
|
return loaded_modules
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ build: clean
|
|||||||
fi; \
|
fi; \
|
||||||
if [ -d customize/inline_scripts ] ; then \
|
if [ -d customize/inline_scripts ] ; then \
|
||||||
cp -r customize/inline_scripts/* artifact.dir/server/common/web/templates; \
|
cp -r customize/inline_scripts/* artifact.dir/server/common/web/templates; \
|
||||||
find artifact.dir/server/common/web/templates/ -type f -exec sed -i$(if $(IS_DARWIN), '',) 's/__CELLXGENE_COMMIT__/$(CELLXGENE_COMMIT)/g' {} \;; \
|
|
||||||
fi; \
|
fi; \
|
||||||
if [ -d customize/ebextensions ] ; then \
|
if [ -d customize/ebextensions ] ; then \
|
||||||
cp -r customize/ebextensions/* artifact.dir/.ebextensions; \
|
cp -r customize/ebextensions/* artifact.dir/.ebextensions; \
|
||||||
@@ -46,7 +45,6 @@ build: clean
|
|||||||
fi; \
|
fi; \
|
||||||
if [ -d customize/plugins ] ; then \
|
if [ -d customize/plugins ] ; then \
|
||||||
cp -r customize/plugins artifact.dir/server/; \
|
cp -r customize/plugins artifact.dir/server/; \
|
||||||
find artifact.dir/server/plugins/ -type f -exec sed -i$(if $(IS_DARWIN), '',) 's/__CELLXGENE_COMMIT__/$(CELLXGENE_COMMIT)/g' {} \;; \
|
|
||||||
fi; \
|
fi; \
|
||||||
(cd artifact.dir; \
|
(cd artifact.dir; \
|
||||||
cp -r server/common/web/static static; \
|
cp -r server/common/web/static static; \
|
||||||
|
|||||||
Reference in New Issue
Block a user