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

Remove leading slash in notebook path #445

Merged
merged 3 commits into from
Mar 7, 2020
Merged

Conversation

mwouts
Copy link
Owner

@mwouts mwouts commented Feb 26, 2020

With this PR we add path = path.strip('/') to both the get and save methods of Jupytext's contents manager, to match the reference implementation in notebook/services/contents/filemanager.py, cf. here:

https://github.com/jupyter/notebook/blob/43df5af2b614088b4b297fae90a70b6505b9bf84/notebook/services/contents/filemanager.py#L417

and here:

https://github.com/jupyter/notebook/blob/43df5af2b614088b4b297fae90a70b6505b9bf84/notebook/services/contents/filemanager.py#L451

This should fix #444 .

@codecov
Copy link

codecov bot commented Feb 26, 2020

Codecov Report

Merging #445 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #445      +/-   ##
==========================================
+ Coverage   98.91%   98.91%   +<.01%     
==========================================
  Files          77       77              
  Lines        7563     7565       +2     
==========================================
+ Hits         7481     7483       +2     
  Misses         82       82
Impacted Files Coverage Δ
tests/test_paired_paths.py 100% <100%> (ø) ⬆️
jupytext/version.py 100% <100%> (ø) ⬆️
jupytext/contentsmanager.py 98.51% <100%> (+0.01%) ⬆️

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 a393afd...6d275f0. Read the comment docs.

@mwouts mwouts merged commit 709c2a7 into master Mar 7, 2020
@mwouts mwouts deleted the remove_leading_slash branch March 7, 2020 20:41
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.

Leading slash in notebook paths breaks compatibility with other notebook extensions
1 participant