Settings Composition
Jupyterlab generates the settings for extensions using three layers:
user-settings
overrides.json
Extension default settings
Where a higher layer overrides the lower layer. The user-settings override all layer. The following paragraphs explain each settings layer in detail using the settings composition of @juxl/juxl.
Extension default settings
The Extension default settings are provided by the extension. They are delivered alongside the Javascript and Typescript code, typically in a folder named schema. It is possible to provide multipe settings files per extension. The only settings property provided by @juxl/juxl is the agent type, resulting in this default configuration:
{
"agent": "anonymous"
}
Overrides.json
The override.json file is a special file containing configurations for all JupyterLab extensions. The override.json is under the JupyterLab Application Settings Directory, which itself is under the JupyterLab Application Directory.
Examples for this directory are:
/opt/conda/share/jupyter/lab/settings/miniconda3/envs/jl/share/jupyter/lab/settings
depending on the installation. If we would want to override the agent type to use pseudo-anonymization, we create the following file:
{
"@juxl/juxl-extension:juxl": {
"agent": "pseudo-anonymous"
}
}
Note
The structure of the overrides.json differs from the extension default settings and user-settings! Settings are encapsulated inside a “@extension:settings” property.
User-Settings
The user settings should only be edited throug the advanced settings editor.
They are saved under the jupyterlab config directory.
Run jupyter --config to get the config directory.
If the user generates a pseudonym it is saved as a user-settings resulting in such a file:
{
"agent": "pseudo-anonymous",
"pseudonym": "anonymous-z880b3j1c"
}