Closed barentsen closed 9 years ago
Great stuff! I will test and then merge
Tested, it works
I'm having an issue with this merge because I have some code where I import a function that is included in k2fov and I'm getting an error
/Users/tom/Dropbox/k2targetmanagement/make_field_plots_for_DRN.py in <module>()
5
6 sys.path.append('/Users/tom/gitcode/K2fov/K2fov')
----> 7 import projection as proj
8 import fov
9 from K2onSilicon import angSepVincenty, getRaDecRollFromFieldnum
/Users/tom/gitcode/K2fov/K2fov/projection.py in <module>()
4 pass
5 import numpy as np
----> 6 from . import rotate
7
8 __version__ = "$Id: projection.py 36 2014-01-23 22:19:15Z fergalm $"
ValueError: Attempted relative import in non-package
Looking into it.
I think it's ok. I just need to write better code. I changed my code to read
from K2fov import projection as proj
from K2fov import fov
from K2fov.K2onSilicon import angSepVincenty, getRaDecRollFromFieldnum
and now it seems to work
Yep, I was suspecting your direct import of modules, rather than the package, was causing this.
Stopped looking into it. :strawberry:
These changes allow K2fov to be imported in Python 3.
I verified that it doesn't break anything in my installation of Python 2, but in the absence of unit tests, it would be good for @mrtommyb to check that
runK2onSilicon.py
still runs after merging these changes.