Skip to content

Commit

Permalink
Merge pull request #713 from jupyter-lsp/try-to-fix-server-test
Browse files Browse the repository at this point in the history
Fix server extension UI test: migrate config to `ServerApp` as needed
  • Loading branch information
krassowski authored Dec 4, 2021
2 parents 1f4c530 + c3d061d commit 2754acb
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/job.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,9 @@ jobs:

- name: Install Julia
uses: julia-actions/setup-julia@v1
with:
# temporarily pin because of https://github.com/julia-vscode/SymbolServer.jl/issues/225
version: '1.6'

- name: Install Julia language server
run: julia -e 'using Pkg; Pkg.add(Pkg.PackageSpec(;name="LanguageServer", version="${{ env.JULIA_LANGSERVER }}"))'
Expand Down
3 changes: 2 additions & 1 deletion atest/Keywords.robot
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ Create Notebok Server Config
Set Global Variable ${PORT} ${port}
Set Global Variable ${URL} http://localhost:${PORT}${BASE URL}
Copy File ${FIXTURES}${/}${NBSERVER CONF} ${conf}
Update Jupyter Config ${conf} LabApp
Update Jupyter Config ${conf} ServerApp
... base_url=${BASE URL}
... port=${PORT}
... token=${TOKEN}
Update Jupyter Config ${conf} LabApp
... user_settings_dir=${SETTINGS DIR}
... workspaces_dir=${WORKSPACES DIR}
# should be automatically enabled, so do not enable manually:
Expand Down
8 changes: 5 additions & 3 deletions atest/fixtures/jupyter_server_config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"LabApp": {
"log_level": "DEBUG",
"open_browser": false
},
"ServerApp": {
"tornado_settings": {
"page_config_data": {
"buildCheck": false,
"buildAvailable": false
}
},
"log_level": "DEBUG",
"open_browser": false
}
}
}
7 changes: 6 additions & 1 deletion python_packages/jupyter_lsp/jupyter_lsp/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
import entrypoints
from jupyter_core.paths import jupyter_config_path
from jupyter_server.services.config import ConfigManager
from jupyter_server.transutils import _

try:
from jupyter_server.transutils import _i18n as _
except ImportError: # pragma: no cover
from jupyter_server.transutils import _

from traitlets import Bool
from traitlets import Dict as Dict_
from traitlets import Instance
Expand Down
5 changes: 4 additions & 1 deletion python_packages/jupyter_lsp/jupyter_lsp/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
Union,
)

from jupyter_server.transutils import _
try:
from jupyter_server.transutils import _i18n as _
except ImportError: # pragma: no cover
from jupyter_server.transutils import _
from traitlets import Instance
from traitlets import List as List_
from traitlets import Unicode, default
Expand Down

0 comments on commit 2754acb

Please sign in to comment.