Environment setup
Git repository
We use GitHub for pysmo development. If you're new to git and/or GitHub, we recommend reviewing their documentation. There are two ways to get a local copy of the repository:
- Clone the pysmo repository directly.
- Fork the repository on GitHub first, then clone your fork (recommended if you plan on contributing changes back to pysmo).
Clone directly
To get started quickly, clone the pysmo repository directly:
That's it! Now skip ahead to Requirements.
Create your own fork
Creating your own fork lets you push changes to GitHub under your own account, making it straightforward to submit a pull request. Once you have forked pysmo, clone your repository:
$ git clone [email protected]:<github-username>/pysmo.git
Cloning into 'pysmo'...
$ cd pysmo
Note
We used SSH to clone the repository here. With an ssh-agent running, this saves you from having to enter your credentials every time you push to GitHub.
To pull in future changes from the upstream pysmo repository, add it as an additional remote:
Requirements
Setting up Windows
Setting up the development environment on Windows may require a few additional steps:
- Install Chocolatey, a package manager for Windows that simplifies installing dependencies.
- Once Chocolatey is installed, run the following commands as administrator (PowerShell or Command Prompt):
uv
We use uv to manage a consistent, isolated development environment. Uv creates a Python virtual environment and handles package installation, so you can develop and test pysmo without affecting any system-wide Python installation.
Note
uv can also be used to install Python itself.
Makefile
Pysmo provides a Makefile for common development tasks. Running make
without arguments (or with help) lists the available commands:
$ make help
This makefile executes mostly uv commands. To view all uv commands available
run 'uv help'.
AVAILABLE COMMANDS
build Build distribution.
check-uv Check if uv is installed.
clean Remove existing builds.
docs Build html docs.
...
To get started, run:
This creates a Python virtual environment for pysmo development (if one does not already exist) and installs pysmo along with all its dependencies.