imr-framework / pypulseq

Pulseq in Python
https://pypulseq.readthedocs.io
GNU Affero General Public License v3.0
125 stars 67 forks source link

RF: Move sigpy to an extra optional dependency #188

Closed wtclarke closed 3 months ago

wtclarke commented 3 months ago
wtclarke commented 3 months ago

@schuenke All good for review.

wtclarke commented 3 months ago

Thanks for reviewing this in depth. As a general rule, don't refactor additional code in this sort of PR as it just complicates the history. E.g. If we find a bug down the line, is it a optional variable rename or was it me removing the sigpy dep?

And remember PEP8 unto thyself, not unto others (a video well worth watching).

schuenke commented 3 months ago

Thanks for reviewing this in depth. As a general rule, don't refactor additional code in this sort of PR as it just complicates the history. E.g. If we find a bug down the line, is it a optional variable rename or was it me removing the sigpy dep?

And remember PEP8 unto thyself, not unto others (a video well worth watching).

Well, in general I agree, but the current PyPulseq code is basically not tested at all and far away from beeing stable.

Sure, I could have created another PR for the refactoring. And another one for the bug fixe(s). And maybe even a next one for the variable renaming. But in all cases our tests would have passed (although the code was not even working - see the padding code that used invalid numpy function calls) and future debugging wouldn't have been easier imo.

So for the moment, I would still refactor the code in every file that is touched by a PR anyway. To be honest, I think this will also lead to a better code review, because I can almost guarantee that nobody will ever review a PR that refactors all modules and functions. At least not in detail.

wtclarke commented 3 months ago

Fair points. Are you able to merge? Or is it someone else?