Nick Guenther

Results 272 comments of Nick Guenther

I guess the next thing to do is submit a bug to nibabel, and using `rep.py`, start poking at https://github.com/nipy/nibabel/blob/4703f4d8e32be4cec30e829c2d93ebe54759bb62/nibabel/processing.py#L165 adding `sha256sum`s around each `np.array` produced in that function to...

> * The root cause is from a rounding error introduced into data array voxels by [`nibabel.processing.resample_from_to`](https://nipy.org/nibabel/reference/nibabel.processing.html#nibabel.processing.resample_from_to). > > * Figuring out more precisely [..] Using the [reproduction script](https://github.com/spinalcordtoolbox/spinalcordtoolbox/blob/44bc56a6758cedb6d057207a1a1e1830b633d71c/rep.py#L1-L29) that...

> (I think your laptop is the only local machine we currently have that reliably fails -- I tried on my two machines, but I get the same results as...

> There's still more levels to dive. The bug could still be in numpy. Afterall, nibabel didn't change, so where did the CI errors come from? I can confirm that...

Here's another wild theory: my laptop is running Arch, which means I have ``` $ uname -r 5.15.2-arch1-1 ``` joplin has ``` $ uname -r 5.4.0-90-generic ``` **and recently** linux...

Okay well now that the tests are faster, I've made https://github.com/spinalcordtoolbox/spinalcordtoolbox/blob/0c6d45572f962468a002cf44a86395b30073304c/.github/workflows/test-batch-processing.yml#L22-L42 so that we can see if we can get the same error on Github: 1. success: https://github.com/spinalcordtoolbox/spinalcordtoolbox/runs/4291877934?check_suite_focus=true ([logs_attempt_1.zip](https://github.com/spinalcordtoolbox/spinalcordtoolbox/files/7584394/logs_attempt_1.zip)) 2....

Judging from people confused in these pytest threads (and even one entire subpackage!): * https://github.com/pytest-dev/pytest/issues/349#issuecomment-251174481 * https://smarie.github.io/python-pytest-cases/#why-pytest-cases * https://stackoverflow.com/questions/42228895/how-to-parametrize-a-pytest-fixture/56871701#56871701 I would suggest our problem here stems from pytest having a...

Solutions: 1. Write scripts to generate dummy data, but then *save them to a file* and include them in `sct_testing_data/` - I guess then we have to keep the scripts...

It's okay to make fixtures that are local to each test suite/file/folder. In fact, pytest is designed for that: you can do `@fixture(scope="module")` or as a method inside a class...

Also, for completeness, the current recommended way to do this is to manually edit your `~/.zshrc` or `~/.bashrc` as needed. e.g. to choose the `master` copy: ```diff --- ~/.bashrc +++...