Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3 #231

Open
emiliom opened this issue Dec 4, 2018 · 6 comments
Open

Python 3 #231

emiliom opened this issue Dec 4, 2018 · 6 comments

Comments

@emiliom
Copy link
Member

emiliom commented Dec 4, 2018

@emiliom
Copy link
Member Author

emiliom commented Dec 4, 2018

From @ocefpaf, wrt planning migration to Py3k:

By creating a long lived dev branch you may create huge merge conflicts down the road. There is nice a Python talk on how Instagram move its huge code base to Python 3 without long lived dev branches and by merging it into master! Worth watching (or reading the blog post about it).

IMO the plan should be:

  1. identify the dependencies that must be migrated to Python 3 and start converting them from the bottom up in the dependency chain;
  2. start hard failures for Python 3 in the CIs so new code is always compliant;
  3. choose a migration technique: future, six, 2to3, a combination of them, or even Python 3 only code from now on.

@emiliom
Copy link
Member Author

emiliom commented Dec 4, 2018

WOFpy is one ODM2 package that should (I think) be ported over to Python 3 only, having no compelling reason to maintain Python 2.7 support. I can elaborate on this later.

As a helpful contrast, I don't think we can say the same thing about odm2api. We probably want to maintain Py2.7 support in odm2api after we add Py3 support.

@aufdenkampe
Copy link
Member

@emiliom, I fully support this migration sooner than later to support our need to migrate the Monitor My Watershed implementation of the ODM2DataSharingPortal to Django 2.x, which requires Python 3. See ODM2/ODM2DataSharingPortal#381.

@miguelcleon, how have you integrated WOFpy with ODM2Admin deployments since you upgraded to Django 2 & Python 3 this fall? Do you have WOFpy in a separate Python 2.7 environment?

@miguelcleon
Copy link
Member

I've been using my own fork with python 3. I added a pull request with my changes, Emilio wanted me to break up my changes into two pull requests because it also includes changes to allow ODM2 measurement results to be served succesfully which really wasn't working. I haven't had time to do that. Here is the PR #230

@aufdenkampe
Copy link
Member

@miguelcleon, thanks for that reminder!

@emiliom
Copy link
Member Author

emiliom commented Apr 25, 2019

@aufdenkampe please look over the discussion at PR #230, specially my assessment of the PR.

As it stands the PR is too complex and has some serious issues (unless those were fixed by @miguelcleon's latest commits, from March) that prevent merging. But please head over to the PR to discuss the PR.

@aufdenkampe see also the discussion in that PR about the ODM2DataSharingPortal vs WOFpy. The two are completely isolated. If you use conda environments or any other python virtual environment set up, you can run both as is. The same is true for ODM2 Admin vs WOFpy, but Miguel preferred to manage a single Python (Py3) environment.

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

No branches or pull requests

3 participants