FABLE-3DXRD / FitAllB

1 stars 6 forks source link

Port to python 3 #1

Open jonwright opened 5 years ago

jadball commented 4 years ago

I've been trying out ImageD11 etc on Python 3 at the moment. This will probably have to be functional in Python 3 for us to incorporate into our workflows at Diamond. It actually looks like ImageD11, fabian and xfab etc. will run perfectly fine on Python 3. The only thing that doesn't is FitAllB, so I took a stab at it.

I've made the required changes to the print and split statements, and corrected module changes etc using 2to3. However, I receive a traceback when testing. I've written an issue on my fork here: https://github.com/jadball/FitAllB/issues/3

If you have time, any advice would be greatly appreciated!

jonwright commented 4 years ago

I have a fork which was running under python3 but I did not finish debugging it (e.g. results under python3 are not identical to python2) See https://github.com/jonwright/FitAllB/tree/python3

Most of the others should be ported already.

jonwright commented 4 years ago

Note that I prefer to have code which runs under 2.7 - 3.x to make it easier to do those kinds of tests. As I remember 2to3 prevents a lot of things running under python2. There might be a bunch on integer versus real division to sort out with from future imports, etc.

jadball commented 3 years ago

Hi Jon - I was wondering whether you've made any progress with this Python 3 port internally at the ESRF? There is interest here in creating a site-wide Conda environment based on Python 3.7. We have interest from our Scientific Computing team who might be able to help?

jonwright commented 3 years ago

Hi James, I did not look at it again and got confused about strain tensors in the meantime (https://github.com/FABLE-3DXRD/ImageD11/issues/115), so go ahead. In the past @ddale made a bunch of conda scripts which are now mirrored here: https://github.com/FABLE-3DXRD/hedm-conda-recipes . It would be great if these can be maintained within this project to get conda installs working for all the packages here.