Build: Windows - setiastro/setiastrosuitepro GitHub Wiki


# Windows Setup & Update Guide

> Requirements: **Python 3.12** and **Git**

Seti Astro Suite Pro now supports **direct pip installs** in addition to Git-based development installs.

---

## 🟒 Quick Start (Recommended for most users)

If you just want to **run SASpro** and don’t plan to edit the code:

```powershell
python -m pip install --upgrade pip
pip install setiastrosuitepro
setiastrosuitepro

βœ” No repo clone required βœ” Dependencies are installed automatically


1) Install prerequisites

Python 3.12

Download from https://www.python.org/downloads/windows/

During install, check β€œAdd Python to PATH.”

Git

Check first:

git --version

If not installed, get it here: https://git-scm.com/install/windows


2) Choose a good folder (Git users)

Pick a writable folder you control, e.g.:

C:\Users\YOURNAME\Code\

Avoid protected locations (e.g. C:\Program Files\) and syncing folders.

mkdir C:\Users\YOURNAME\Code
cd C:\Users\YOURNAME\Code

3) Clone the repository (developers & testers)

git clone https://github.com/setiastro/setiastrosuitepro.git
cd setiastrosuitepro

The remote named origin is set automatically.


4) Create & activate a virtual environment (recommended)

python -m venv .venv

Activate (PowerShell)

.\.venv\Scripts\Activate.ps1

If PowerShell blocks scripts:

.\.venv\Scripts\activate.bat

Deactivate when done:

deactivate

5) Install SASpro (IMPORTANT – new step)

Because SASpro is now a proper Python package, this step is required once after cloning.

Option A β€” Editable install (recommended)

pip install -e .

βœ” Required for contributors βœ” Code changes apply immediately

Option B β€” Regular install (rare)

pip install .

6) Run the app

Normal run

setiastrosuitepro

Debug / troubleshooting run

python -X dev -X faulthandler -m setiastro.saspro

7) Updating to the latest version (Git users)

Safe fast-forward update

git fetch origin
git switch main
git pull --ff-only

If dependencies changed:

pip install -e . --upgrade

Force reset to latest (discard local changes)

git fetch origin
git switch main
git reset --hard origin/main
pip install -e . --upgrade

8) One-click updater (recommended)

Create update_saspro.cmd in the repo root:

8) One-click updater (recommended)

Create a file named update_saspro.cmd in the repo root (same folder as pyproject.toml) with the contents below:

setlocal
cd /d "%~dp0"

REM --- fetch + hard reset main to match origin (DISCARDS local changes) ---
git fetch origin
git switch main 2>nul || git checkout main
git reset --hard origin/main

REM --- OPTIONAL: remove untracked files/folders too (uncomment if desired) ---
REM git clean -fd

REM --- ensure venv exists ---
if not exist ".\.venv\Scripts\activate.bat" goto :no_venv

REM --- activate venv ---
call ".\.venv\Scripts\activate.bat"

REM --- upgrade pip + refresh editable install (pulls updated deps too) ---
python -m pip install --upgrade pip
pip install -e . --upgrade

echo.
echo βœ… Updated SASpro (code + Python package/dependencies) on 'main' (local changes discarded).
pause
exit /b 0

:no_venv
echo [!] Missing virtual environment: ".venv"
echo     Create it in this folder, then re-run:
echo         python -m venv .venv
echo         .\.venv\Scripts\activate.bat
echo         python -m pip install --upgrade pip
echo         pip install -e .
echo.
pause
exit /b 1


9) Typical workflow summary

First-time developer setup

git clone https://github.com/setiastro/setiastrosuitepro.git
cd setiastrosuitepro
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e .
setiastrosuitepro

Later (new terminal session)

cd C:\Users\YOURNAME\Code\setiastrosuitepro
.\.venv\Scripts\Activate.ps1
setiastrosuitepro

10) Troubleshooting quick notes

  • Module not found after clone β†’ You forgot:

    pip install -e .
    
  • Wrong version running

    pip uninstall setiastrosuitepro -y
    pip install -e .
    
  • PyPI vs Git

    • pip install setiastrosuitepro β†’ released version
    • pip install -e . β†’ your local Git checkout

⚠️ Versioning note (important)

  • PyPI does not allow overwriting versions
  • Once a version (e.g. 1.6.0) exists, it cannot be replaced
  • Development continues on Git until the next release

11) One-click Run SASpro (Git users)

Create run_saspro.cmd in the repo root:

@echo off
setlocal
cd /d "%~dp0"

if not exist ".\.venv\Scripts\activate.bat" goto :no_venv

call ".\.venv\Scripts\activate.bat"
python --version
echo.

echo Running Seti Astro Suite Pro...
python setiastrosuitepro.py
set "rc=%ERRORLEVEL%"
echo.
pause
exit /b %rc%

:no_venv
echo [!] Missing virtual environment ".venv"
pause
exit /b 1

---

If you want, next we can:
* add **Linux/macOS sections**
* add a **branch safety / contributor rules** section
* add a **β€œdo NOT push to PyPI” release checklist**

Just say the word.