How to upgrade to a new version of the Vanty Starter Kit using Pycharm

In this short guide, you will learn how to upgrade to the next version of Vanty Starter Kit using Jetbrains Pycharm. From our experience, the standard code from the latest updated version can be quite different from the modified code in the project. One of the easiest ways to update is to use the GUI to compare files in your editor instead of doing it via the CLI. Let's get started.

1. Build the new version from the Dashboard

On the advantch.com dashboard:

  • select edit on the project, choose the version you want to update to, most likely the latest version
  • build the project and download the new version to your local machine
  • on your local machine unzip the project and take note of the path

2. Checkout an upgrade branch

Open your project in Pycharm

  • Switch to your latest branch and checkout an upgrade branch using the GUI or shell.
    • git branch upgrade-branch-name && git checkout upgrade-branch-name

3. Compare & update files in Pycharm

  • Go to the 'Project' tab which shows the list of folders for the project, right-click on the root project, and select 'Compare With..
  • Navigate to the folder you just downloaded.

Pycharm will open a diff tab with the list of files and changes. You can now go through the files one by one and make changes.

You can highlight the files you want to update and click the green 'synchronize' button (|>) to update them. See this page from JetBrains on how to update specific files.

Additional notes

VSCode - VSCode also provides a diff check that you can use, but it seems to be only on a file-by-file basis.

Migrations files - if you have added any changes to your models, the best is to skip migrations altogether to avoid conflicts and only add the changes from the models.py file. After you are done with the update, run make migrate to update migrations.

We are working on a method to improve the update process. We will keep you posted.

Copyright © 2022 www.advantch.com