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

More complex handling of open_browser from extension applications #433

Merged
merged 1 commit into from
Mar 4, 2021
Merged

More complex handling of open_browser from extension applications #433

merged 1 commit into from
Mar 4, 2021

Conversation

afshin
Copy link
Contributor

@afshin afshin commented Mar 4, 2021

This changes the default value open_browser in extension applications slightly.

Before this was set to True always. That means, even if ServerApp.open_browser=False, a browser was still opened. Now, the extension first checks if the server's open_browser trait was configured. If so, it uses this configured value; otherwise, it defaults to True.

In the case where both the starting extension application and the underlying server application receive a configuration value for open_browser, the extension application wins as you'd expect.

This PR also drops the --pyargs config from pytest.ini because it prevents you from running individual tests (always runs the whole test suite). Instead, it is advised to run pytest <path to tests>. Updated the README and GA workflows to reflect this change.

@codecov-io
Copy link

Codecov Report

Merging #433 (d18194f) into master (d07853e) will increase coverage by 0.12%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #433      +/-   ##
==========================================
+ Coverage   77.48%   77.61%   +0.12%     
==========================================
  Files         105      105              
  Lines        8942     8964      +22     
  Branches      956      956              
==========================================
+ Hits         6929     6957      +28     
+ Misses       1676     1667       -9     
- Partials      337      340       +3     
Impacted Files Coverage Δ
jupyter_server/extension/application.py 72.36% <100.00%> (-0.09%) ⬇️
jupyter_server/pytest_plugin.py 91.71% <100.00%> (+0.18%) ⬆️
jupyter_server/tests/extension/conftest.py 100.00% <100.00%> (ø)
...pyter_server/tests/extension/mockextensions/app.py 89.65% <100.00%> (+1.19%) ⬆️
jupyter_server/tests/extension/test_app.py 100.00% <100.00%> (ø)
jupyter_server/serverapp.py 66.62% <0.00%> (+0.77%) ⬆️

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 d07853e...d18194f. Read the comment docs.

Copy link
Member

@Zsailer Zsailer left a comment

Choose a reason for hiding this comment

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

Thanks, @afshin

@Zsailer Zsailer merged commit 36218db into jupyter-server:master Mar 4, 2021
@blink1073 blink1073 added this to the 1.5 milestone Mar 18, 2021
hMED22 pushed a commit to hMED22/jupyter_server that referenced this pull request Jan 23, 2023
More complex handling of open_browser from extension applications
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants