Skip to content

Python Developer Setup

Connor Jakubik edited this page Jan 30, 2024 · 18 revisions
Simulation Development Workflow → Python Developer Setup

Up to date for Platform 0.18.0

Written by Connor Jakubik

Python Developer Setup

Prerequisites:

NOTE: You really cannot skip any steps when going through this, besides the steps marked things like "ONLY IN PLATFORM VERSIONS _" when your version / OS does not apply. You need to read all of the bullet points as you are going through or you will encounter issues that make the process take longer.

The header lettering / numbering is not in a logical sequence in this page in particular; this is because we want to keep the same headers for the python setup, C++ setup, and SimDynamX internal developer setup docs.


Changelog

  • 2023/09/14 Initial copy from internal developer documentation.

First, change these OS settings

  1. For Windows:
    1. Enable long path lengths (Run terminal as admin) (https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=powershell#enable-long-paths-in-windows-10-version-1607-and-later)
    2. (Optional) File Explorer
      1. View Hidden Files (https://support.microsoft.com/en-us/windows/view-hidden-files-and-folders-in-windows-97fbc472-c603-9d90-91d0-1166d1d9f4b5)
      2. View File Extensions (https://www.howtogeek.com/205086/beginner-how-to-make-windows-show-file-extensions/)
    3. OneDrive / Backup & Sync with Google Drive
      1. Be very wary of whether these affect the directories you place Platform files in! Many developer projects are VERY MUCH NOT friendly with these file syncing programs, as they have lots of tiny files that get regenerated often, and many huge files that result in a slow sync. It's not useful to have a backup of Platform files or any other GitHub repo, because once you commit and push changes, they're already backed up in GitHub. It's often very difficult or tedious to remove these files from the sync'd data once they've been sync'd.
      2. You might want to disable these services in their entirety.

A) Download this Required Software

  1. Text editor / IDE of your choice

After completing setup

General process for adding or modifying Python behavior in a Space Teams simulation:

  1. Editing Python scripts that use the SC_Compute_Server module to interface with either SimConfig / EntityConfig objects or Entities in a running simulation.
  2. Modifying a Sim Config to:
    1. Declare a System Instance of Python type that uses a particular python script as its Source path.
    2. Assign that System Instance's Nametag to the Systems on any Entities it should "see"/affect.
  3. Run that simulation through one of a number of methods.

Further Documentation

Clone this wiki locally