Closed KrisThielemans closed 1 year ago
I get similar warnings from git status
in SIRF-Exercises
and also
No valid notebook detected)
error: external filter '"/usr/bin/python3" -m nbstripout' failed 1
error: external filter '"/usr/bin/python3" -m nbstripout' failed
No valid notebook detected
error: external filter '"/usr/bin/python3" -m nbstripout' failed 1
error: external filter '"/usr/bin/python3" -m nbstripout' failed
Refresh index: 100% (90/90), done.
culminating with
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: notebooks/Deep_Learning_PET/4_setup_training.ipynb
modified: notebooks/Geometry/d_manipulation.ipynb
modified: notebooks/Geometry/get_nifti_data.ipynb
no changes added to commit (use "git add" and/or "git commit -a")
For 4_setup_training.ipynb
, git diff
actually gives no output, and for the other two files a lot of differences like this one:
"cells": [
{
"cell_type": "markdown",
- "id": "fcfde9f0",
+ "id": "cf2f627c",
"metadata": {},
"source": [
"### Manipulating Volumes\n",
Whose changes are those, and should I commit or restore?
They're likely my changes...
Which branch are you on please? It's possible that a git pull
did something weird and that your local copy isn't identical to what is online. It might be good to do
git fetch origin
git reset --hard origin/master
or whatever branch you are on.
@KrisThielemans Having applied your suggestion, I now get
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: notebooks/Geometry/d_manipulation.ipynb
modified: notebooks/Geometry/get_nifti_data.ipynb
modified: notebooks/SPECT/SPECT_OSEM_measured_data.ipynb
no changes added to commit (use "git add" and/or "git commit -a")
I suggest I restore to move on - after all, I can always import another copy of VM 3.4.0 should these changes be important, can I not?
git restore
did not work - had to commit to move from master
to jupyterlab
, ended up in exactly the same situation:
On branch jupyterlab
Your branch is up to date with 'origin/jupyterlab'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: notebooks/Geometry/d_manipulation.ipynb
modified: notebooks/Geometry/get_nifti_data.ipynb
modified: notebooks/SPECT/SPECT_OSEM_measured_data.ipynb
no changes added to commit (use "git add" and/or "git commit -a")
have run all PET notebooks, everything looks ok, just minor remarks/corrections:
display_and_projection.ipynb
:
"SIRF 3.1 does not provide TOF functionality" - should it not rather be 3.3 or 3.4?
reconstruct_measured_data.ipynb
:
section Scatter "1 (or both)" looks rather ugly, why not "one (or both)"?
section What now? typo "increate", should be "increase"
DIY_OSEM.ipynb
:
@evgueni-ovtchinnikov I think this might be a bit better now. In #189 I fixed the "id" issues with Geometry/d_manipulation.ipynb
such that I get no warnings anymore.
There is of course still the usual stuff that if you run a notebook (without actually making any changes), git status
will show it's changed, but git diff
will show it isn't. That's due to nbstripout
stuff (i.e. git status
detects the change, but nbstripout
removes the change before handing it to git diff
). There isn't much we can do about that unfortunately.
I'll merge this to master
now, and then fix your other comments.
Let us know how it goes.
Other comments are now fixed (on master
). thanks!
Please reopen if you still have trouble with git
when
git pull
or similar I getthis is because
nbstripout
validates the notebooks first.I don't know how to find out which notebooks have this problem and I don't know how to call
normalize()
either!It's a warning so not urgent.