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

T1.1 Python 2 Code Migration #10850

Merged
merged 12 commits into from
Jul 21, 2020
Merged

Conversation

SHKnudsen
Copy link
Contributor

Purpose

This PR is the first step in adding a Migration Assistant that helps users automatically upgrade their Python code from Python 2 to Python 3. The PR focuses on adding the functionality to Migrate Python 2 code to Python 3 compatible code, using Pythons 2to3 library. It also adds a new VisualDifferenceViewer to show the changes being made by the migration.

This is the biggest of the PRs concerning the Python 3 migration work, the following PRs will be smaller.

image

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.

Reviewers

@mjkkirschner
@QilongTang
@radumg

FYIs

The VisualDifferenceViewer are using the DiffPlex library. I know the decision on whether or not we want to include this dependency is still pending, but the rest of the code should be fine to review.

The button icons on the VisualDifferenceViewer are also pending final confirmation, we can easily revert back to text if this turns out to be an issue.

SHKnudsen added 4 commits July 3, 2020 08:19
* add ScriptMigrator

* Add visual difference viewer

* Update PythonMigrationViewExtension.cs

* Add tooltip description to migration assistant

* updates

* comment updates

* comment updates
@QilongTang
Copy link
Contributor

Thank you @SHKnudsen . This is exciting. @mjkkirschner will log a Jira task for our team to review your work soon

@mjkkirschner
Copy link
Member

@mmisol mmisol self-assigned this Jul 10, 2020
@mmisol mmisol self-requested a review July 10, 2020 22:12
Copy link
Collaborator

@mmisol mmisol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to move things up a little, I commented the things I feel still need addressing. I'll summarize here:

  • Delete third unit test (unless there is something I overlooked, LMK)
  • Add new libraries to license files
  • Fix bug related to unsaved code changes not showing in the migrator

@mjkkirschner
Copy link
Member

mjkkirschner commented Jul 20, 2020 via email

@SHKnudsen
Copy link
Contributor Author

@mmisol addressed the last changes, sorry for the delay! Let me know if there is anything else.

@mmisol
Copy link
Collaborator

mmisol commented Jul 20, 2020

Thanks @SHKnudsen . I see the bug is fixed. Could I ask you to place diffplex in the license.rtf file so that it appears in alphabetical order in the about window?
Screen Shot 2020-07-20 at 5 04 14 PM

@SHKnudsen
Copy link
Contributor Author

@mmisol order of the licence files are updated

Copy link
Collaborator

@mmisol mmisol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @SHKnudsen! Looks good to me

@mmisol
Copy link
Collaborator

mmisol commented Jul 21, 2020

I couldn't reproduce the test failure locally. I have triggered a manual test run on a different server just in case this is just a flaky failure. If that works I'm merging this.

@mmisol
Copy link
Collaborator

mmisol commented Jul 21, 2020

Also got an error here https://master-15.jenkins.autodesk.com/view/DYN/job/DYN-DevCI_Self_Service/709/, although it seems unrelated (PackageDependencyTests). I think we can probably merge but I'll confirm with @QilongTang first.

@mmisol mmisol merged commit e06234e into DynamoDS:master Jul 21, 2020
@SHKnudsen SHKnudsen deleted the T1.1-CodeMigration branch July 21, 2020 15:11
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.

6 participants