Skip to content

Python 3 update initial#56

Open
nguy wants to merge 1 commit intomasterfrom
convert-to-py3
Open

Python 3 update initial#56
nguy wants to merge 1 commit intomasterfrom
convert-to-py3

Conversation

@nguy
Copy link
Owner

@nguy nguy commented Oct 28, 2020

Lot's of updates for python 3 compatibility and reformatting print statements.

Various bug fixes also implemented.

@tjlang
Copy link
Contributor

tjlang commented Oct 30, 2020

I'll take a look at this, but probably not before next week.

@tjlang
Copy link
Contributor

tjlang commented Oct 30, 2020

I get this error when trying to compile:


ModuleNotFoundError Traceback (most recent call last)
in
5 from pykml import parser
6 import os
----> 7 import awot
8 import glob
9 import pyart

~/anaconda3/envs/condasucks/lib/python3.7/site-packages/awot-0.2.13-py3.7.egg/awot/init.py in
14
15 # import subpackages
---> 16 from . import io
17 from . import display
18 from . import graph

~/anaconda3/envs/condasucks/lib/python3.7/site-packages/awot-0.2.13-py3.7.egg/awot/io/init.py in
9
10
---> 11 from .flight import read_netcdf, read_netcdf_variable, read_nasa_ames
12
13 from .read_ground_radar import read_ground_radar

~/anaconda3/envs/condasucks/lib/python3.7/site-packages/awot-0.2.13-py3.7.egg/awot/io/flight.py in
13
14 from . import common
---> 15 from .io.name_maps_flight import get_name_map
16
17 #########################

ModuleNotFoundError: No module named 'awot.io.io'

@tjlang
Copy link
Contributor

tjlang commented Nov 10, 2020

OK, I looked into the import errors a bit more. There are some functions/submodules that are no longer available to be imported. Some cleanup in the import statements is thus needed. In addition, Basemap is no longer supported in Python 3 so that dependency needs to be removed.

@nguy
Copy link
Owner Author

nguy commented Nov 11, 2020

Looks like the 2to3 converter changes the import structure in some cases. Working through those now. May reformat as I go a bit as well.

That basemap is pervasive throughout this package, forgot about that. That's going to take some wrangling.

@tjlang
Copy link
Contributor

tjlang commented Nov 12, 2020

Yeah, at first it looked like some Basemap dependencies were easily removed (some scripts imported Basemap and then did little to nothing with it). However, the graphing portions did use Basemap quite a bit. The obvious thing to do is just swap over to cartopy, but that's easier said than done. Another option is just eliminate Basemap entirely and then add in cartopy/mapping later. That might be the quickest fix. It technically reduces functionality in the abstract, but as a practical matter in Python 3, it really doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants