Skip to content

Commit

Permalink
Make driven by environment variables as well
Browse files Browse the repository at this point in the history
  • Loading branch information
costrouc committed Jun 28, 2022
1 parent 2e87b09 commit 6ac9135
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 7 additions & 3 deletions nb_conda_store_kernels/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,19 @@ class CondaStoreKernelSpecManager(KernelSpecManager):
"""

conda_store_url = Unicode(
"http://localhost:5000/",
os.environ.get("CONDA_STORE_URL", "http://localhost:5000/"),
help="Base prefix URL for connecting to conda-store cluster",
config=True,
)

conda_store_verify_ssl = Bool(True, help="Verify all TLS connections", config=True)
conda_store_verify_ssl = Bool(
"CONDA_STORE_NO_VERIFY" not in os.environ,
help="Verify all TLS connections",
config=True
)

conda_store_auth = Unicode(
"none",
os.environ.get("CONDA_STORE_AUTH", "none"),
help="Authentication type to use with Conda-Store. Available options are none, token, and basic",
config=True,
)
Expand Down
2 changes: 0 additions & 2 deletions tests/assets/jupyter_config.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
c.JupyterApp.kernel_spec_manager_class = "nb_conda_store_kernels.manager.CondaStoreKernelSpecManager"
c.CondaStoreKernelSpecManager.conda_store_url = "http://conda-store-server:5000/conda-store"
c.CondaStoreKernelSpecManager.conda_store_auth = "basic"

0 comments on commit 6ac9135

Please sign in to comment.