mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-03 11:58:11 +08:00
Update for app config (#1369)
fixes an issue with "cellxgene launch" which had a bad interaction between command line parameters and config file parameters. Now, the config files are applied first, followed by the parameters that were provided in the command line. There is also now a check that each of the config attributes is type checked.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import unittest
|
||||
from server.common.app_config import AppConfig
|
||||
|
||||
# NOTE, there are more tests that should be written for AppConfig.
|
||||
# this is just a start.
|
||||
|
||||
|
||||
class AppConfigTest(unittest.TestCase):
|
||||
def test_update(self):
|
||||
c = AppConfig()
|
||||
c.update(server__verbose=True, multi_dataset__dataroot="datadir")
|
||||
|
||||
v = c.changes_from_default()
|
||||
self.assertCountEqual(v, [("server__verbose", True, False), ("multi_dataset__dataroot", "datadir", None)]),
|
||||
Reference in New Issue
Block a user