Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add overrides.d for settings defaults #224

Merged
merged 1 commit into from
Dec 13, 2021

Conversation

bollwyvl
Copy link
Contributor

Elevator Pitch

Allow extensions to package {app_settings_dir}/overrides.d/*.json files to be merged together with schema defaults.

This is relevant for third-party extensions that would benefit from being able to be gently configured by other extensions:

  • jupyter-lsp: suggested configuration for one or more language_servers
  • jupyterlab-tour: a user tour
    • this may well not work, as they are lists, which have undefined merge characteristics...

References

Changes

  • adds a conf.d-style loader for overrides.d/*.{json,json5}
    • these are read before the singleton json
  • as it's "more human," json5 always wins
  • ensures merging occurs at the extension level

@codecov-commenter
Copy link

codecov-commenter commented Dec 12, 2021

Codecov Report

Merging #224 (a50ce09) into master (d577120) will increase coverage by 0.47%.
The diff coverage is 96.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #224      +/-   ##
==========================================
+ Coverage   76.96%   77.44%   +0.47%     
==========================================
  Files          28       28              
  Lines        2071     2097      +26     
==========================================
+ Hits         1594     1624      +30     
+ Misses        477      473       -4     
Impacted Files Coverage Δ
jupyterlab_server/settings_utils.py 86.04% <92.85%> (+2.47%) ⬆️
jupyterlab_server/tests/test_settings_api.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d577120...a50ce09. Read the comment docs.

Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adopt a distribution-friendly conf.d-style settings defaults configuration
3 participants