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

Optimize hidden checks #1226

Merged
merged 4 commits into from Mar 6, 2023
Merged

Optimize hidden checks #1226

merged 4 commits into from Mar 6, 2023

Conversation

vidartf
Copy link
Member

@vidartf vidartf commented Mar 3, 2023

Fixes #1224. Also adds regression tests, and enables some tests that were skipped on Windows, but did not need to? Maybe they were just passing locally for me?

The boolean check will always be quicker than stat calls, so let's make sure we check that first.

Also adds regressions to make sure we don't call `is_hidden` without needing to in the future :)
Convert one needed one into xfail.
@codecov
Copy link

codecov bot commented Mar 3, 2023

Codecov Report

Patch coverage: 68.75% and project coverage change: -0.04 ⚠️

Comparison is base (e60b048) 80.44% compared to head (e3f3685) 80.40%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1226      +/-   ##
==========================================
- Coverage   80.44%   80.40%   -0.04%     
==========================================
  Files          68       68              
  Lines        8253     8253              
  Branches     1603     1603              
==========================================
- Hits         6639     6636       -3     
- Misses       1191     1193       +2     
- Partials      423      424       +1     
Impacted Files Coverage Δ
jupyter_server/services/contents/filemanager.py 76.93% <54.54%> (ø)
jupyter_server/base/handlers.py 78.86% <100.00%> (ø)
jupyter_server/files/handlers.py 85.45% <100.00%> (ø)
jupyter_server/services/contents/handlers.py 85.78% <100.00%> (ø)
...ter_server/services/kernels/connection/channels.py 61.06% <0.00%> (-1.11%) ⬇️
jupyter_server/gateway/managers.py 83.60% <0.00%> (+0.23%) ⬆️
jupyter_server/extension/handler.py 69.23% <0.00%> (+1.53%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@vidartf vidartf added enhancement python Pull requests that update Python code labels Mar 3, 2023
Copy link
Member

@kevin-bates kevin-bates left a comment

Choose a reason for hiding this comment

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

Nice catch on the optimization! These changes look good - Making Windows Great Again. 😄

(Build (lint) failure is fixed in #1227.)

@blink1073 blink1073 enabled auto-merge (squash) March 6, 2023 15:50
@blink1073 blink1073 merged commit b5a6306 into jupyter-server:main Mar 6, 2023
34 checks passed
@vidartf vidartf deleted the opt-hidden branch July 13, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not check if hidden if hidden files are allowed
3 participants