threeML / hawc_hal

HAWC Accelerated Likelihood - python-only framework for HAWC data analysis
BSD 3-Clause "New" or "Revised" License
11 stars 22 forks source link

Futurizing hawc_hal for py3 #33

Closed hayalaso closed 4 years ago

hayalaso commented 4 years ago

I use the futurize software to start making changes for hawc_hal to be able to run in py3. I was able to compile it in the miniconda3 environment and it seemed to install fine, and least it didn't give me syntax errors.

I ran the tests with pytest (version 5.4.2). A few tests ran fine. I got one test (test_copy.py) that didn't pass due to the newer pytest version. I'm not very verse with pytest but I can keep looking into it. Other tests gave me some weird errors, like a ROOT file not being able to close (when running test_geminga_paper for example).

I still figure it would be good to start the conversion of hawc_hal to py3. I'm requesting to merge to the master branch, but if any of the threeML group would like to make a py3 branch so that I can pull request there, that would work too, and more interested people could also look into updating the code.

henrikef commented 4 years ago

Awesome!

Which test_copy.py failed? There's one that's known to fail (marked xfail), causing the issue described here.

henrikef commented 4 years ago

Looks like the automated tests failed. Maybe the test environments need to be updated?

hayalaso commented 4 years ago

From test_copy.py the first one. I get this:

__ test_deepcopy_point_source ___ Fixture "maptree" called directly. Fixtures are not meant to be called directly, but are created automatically when test functions request them as parameters.

It's the pytest.fixture for maptree and response

hayalaso commented 4 years ago

I had a look at the automated test and it seems, that the package past.utils is not available during the check. I assume this might need to be installed by threeML members?