I started out coding my deliverables a week early because I had, by then, read a lot of resources on how to port codebases to Python 3.x and felt the need to translate all that reading into work.

I opened a PR on the main repo so that my commits are visible to my mentors as I do my work. I also opened an issue to keep an updated checklist of what has been completed so far. I will cover the steps to porting in more detail after cwltool work is done. For now, I will just go through whatever I achieved during this week.

I can say I’m happy with my progress by the end of this week. I was able to get all passing unit tests locally and on Travis CI for Python 2.7 and 3.x (x = 3,4,5,6). These are the Python runtimes which we intend to support. Current code coverage for schema_salad is at 84%, thus there are chances of some regressions being introduced due to the changes made so far and I hope to counter them as and when they show up in further testing.

To check integration with cwltool, I ran cwltool unit tests and conformance tests with my ported version of schema_salad and they passed succesfully. Though I cannot measure how this improves code coverage of schema_salad (can I?), but this is a very strong sign that the port doesn’t break existing compatibility with Python 2.7.

I feel most of the work in porting schema_salad codebase to Python 3 is done now. This includes rewriting tox.ini file and turning on all supported versions of Python on Travis CI. I am following this workflow sugessted by Petr to port both cwltool and schema_salad.

The goal is minimize the number of merges and schema-salad releases, in the event there are issues in schema salad that turn up while porting cwltool.

  1. in this branch setup.py, change version=”3.0”
  2. in cwltool, create a new python3 branch and change the dependency to schema-salad >= 3.0
  3. for development, create a virtualenv and clone/install python3 branches for both schema-salad and cwltool
  4. fix up cwltool for python3 support & pass conformance tests using both python 2.7 and 3.4
  5. merge & release schema-salad 3.0
  6. this should make it possible for the cwltool PR tests to pass
  7. once those are green, merge & release cwltool

Thus, before I can get this PR merged, I need to port cwltool as well.

Plans for next Week 1 (29th May - 2nd June):

  • Start porting cwltool to Python 3 (follow the same checklist as I did for schema_salad)
  • concretely measure schema salad test coverage Link
  • work on upgrading mypy package for schema salad
  • resolve any other bugs in schema_salad port