Building and packaging¶
Package metadata¶
PINNStudio is a setuptools package. pyproject.toml only declares the build system (setuptools ≥ 77 and wheel);
the metadata is in setup.py:
name="pinnstudio",version(the version of the latest release; see Releases),python_requires=">=3.11";packages=find_packages(), which findspinnstudioand its subpackages andreference_data(it has an__init__.py), withinclude_package_data=Trueandpackage_data={"pinnstudio": ["resources/*"]};- the console script
pinnstudio=pinnstudio.main:main; install_requires:deepxde>=1.10.0,torch>=2.0,PySide6-Essentials>=6.5(below 6.12 on Python 3.11),matplotlib,pandas,scipy, and NumPy limits: below 2.5 (DeepXDE's 2D polygon geometry uses a NumPy call removed in 2.5), and below 2 on Intel Macs (PyTorch's last Intel-Mac build needs NumPy 1). PySide6 6.12.0 loses references toNoneandTrue(fatal on Python 3.11, harmless from 3.12 on), hence its limit there;tests/test_binding_refcounts.pychecks the installed version.
requirements.txt lists the dependencies for a plain pip install -r requirements.txt development setup.
Source distribution and wheel¶
MANIFEST.in adds to the source distribution the reference data (reference_data/**/*.txt), the license files
(THIRD_PARTY_LICENSES.md, LICENSES/*.txt), requirements.txt, CHANGELOG.md, CITATION.cff,
select_torch_index.py, install.sh and install.bat. With include_package_data, the reference-data text
files are also installed with the reference_data package, so the examples find their data in an installed
copy.
python -m pip install build
python -m build # writes dist/pinnstudio-<version>.tar.gz and dist/pinnstudio-<version>-py3-none-any.whl
python -m pip install dist/pinnstudio-*.whl # check the wheel in a fresh environment
The wheel is pure Python. PyTorch is a dependency like any other, so pip installs the default PyTorch build
from PyPI; a CUDA build matching the machine is chosen by the installers below.
Installers¶
| File | What it does |
|---|---|
get-pinnstudio.sh (macOS, Linux), get-pinnstudio.ps1 (Windows) |
the one-command installers of the README: install uv if needed, then uv tool install PINNStudio with its own Python and the PyTorch build that matches the NVIDIA driver (CPU-only otherwise), put pinnstudio on the PATH and add a menu entry or shortcut. Running them again updates. PINNSTUDIO_SOURCE installs from a local checkout or a wheel instead of PyPI (the CI workflows use this) |
install.sh, install.bat |
from a checkout: create venv/, pip install ., then reinstall the PyTorch build chosen by select_torch_index.py and check that it landed and runs on the GPU |
select_torch_index.py |
prints the PyTorch wheel tag (cu126, ..., or cpu) for this machine's GPU and driver, and with --check TAG tests that the installed build can compute on every GPU; the rules are in pinnstudio/core/torch_index.py |
pinnstudio/shortcut.py |
python -m pinnstudio --create-shortcut / --remove-shortcut: desktop and menu shortcuts |
The installers install the latest release from PyPI by default. To install the code of a checkout, use
pip install -e ., install.sh, or PINNSTUDIO_SOURCE=$PWD sh get-pinnstudio.sh.
Checks of a build¶
tools/launch_check.pystarts the installedpinnstudiocommand and checks that it keeps running.tools/smoke_gui.pyruns the window end to end on the current machine (train, results, restore).- The
installerjobs ofplatform-tests.ymlandplatform-matrix.ymlrun the one-command installers from the checkout and then the window check (Tests).