mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-19 02:48:30 +08:00
* rename config param label-file * annotations rework - CLI params, file naming and backups * lint * improve cli option error checks * enable session cookies * enable session cookies * add session id * name annotations file in multi-dataset and multi-user safe manner * pass data user hash to front-end * add annotation collection name support to front-end * add constant for annotation data collection name * parameterize annotation collection name; make it sticky in the session * clarify comments * hard wire a temporary data collection name for testing * prettier * test comment * package command * set annotations filename dialog * name and hash are visible * wire up data collection capture
39 lines
731 B
Python
39 lines
731 B
Python
from enum import Enum
|
|
|
|
|
|
DEFAULT_TOP_N = 10
|
|
|
|
|
|
class AugmentedEnum(Enum):
|
|
def __hash__(self):
|
|
return self.value.__hash__()
|
|
|
|
def __eq__(self, other):
|
|
if isinstance(other, type(self)) or isinstance(other, str):
|
|
return self.value == other
|
|
return False
|
|
|
|
def __str__(self) -> str:
|
|
return self.value
|
|
|
|
|
|
class Axis(AugmentedEnum):
|
|
OBS = "obs"
|
|
VAR = "var"
|
|
|
|
|
|
class DiffExpMode(AugmentedEnum):
|
|
TOP_N = "topN"
|
|
VAR_FILTER = "varFilter"
|
|
|
|
|
|
JSON_NaN_to_num_warning_msg = (
|
|
"JSON encoding failure - please verify all data are finite values (no NaN or Infinities)"
|
|
)
|
|
REACTIVE_LIMIT = 1_000_000
|
|
|
|
MAX_LAYOUTS = 30
|
|
|
|
CXGUID = "cxguid"
|
|
CXG_ANNO_COLLECTION = "cxg_anno_collection"
|