Skip to main content

SimKit: A Simulation Toolkit For Computer Animation

Project description

SimKit : A Simulation Toolkit for Computer Animation

CI Docs

This library should be considered a toolbox for the development of physically-based animation research. It is designed to be modular, easy to use, and easy to extend. In particular, it is designed to be emphasize fast creative and experimental prototyping.

Installation

Clone the repository:

git clone --recursive https://github.com/otmanon/simkit.git

Installation is recommended on a fresh conda environment:

cd simkit
conda create -n simkit python=3.11
conda activate simkit
pip install -e .

Optional Dependencies

The base install only requires numpy and scipy -- and now covers the clustering / sampling helpers (farthest_point_sampling, spectral_clustering, spectral_cubature) too. Heavier or specialized dependencies are exposed as named extras so you only install what you need. Importing simkit is always safe -- functionality whose extras are missing just isn't exported, and a one-line warning tells you exactly what to install.

Extra Adds Enables
mesh libigl 2D Triangle meshing (shape_outlines)
viz matplotlib, polyscope simkit.matplotlib, simkit.polyscope plotters
solvers cvxopt Sparse eigensolvers (simkit.eigs)
video Pillow simkit.filesystem image / video frame helpers
cmaes cma simkit.solvers.CMAESSolver
all union of the above Everything end-user-facing
dev pytest, pytest-cov Running the test suite
docs sphinx, sphinx-autoapi, pydata-sphinx-theme, ... Building the documentation

Install one or more extras with the usual pip syntax:

pip install -e ".[mesh]"            # just mesh ops
pip install -e ".[mesh,viz]"        # multiple extras
pip install -e ".[all]"             # everything end-user-facing
pip install -e ".[all,dev,docs]"    # everything, including dev tooling

Running Examples

The repository includes several end-to-end demos under examples/, each reproducing a slice of a published paper:

Each demo has its own README with the exact extras to install and the command to run. See examples/README.md for the index. As a quick start:

pip install -e ".[mesh,viz,video]"
python examples/subspace_mfem/drop_fem_vs_mfem.py

Running tests

pip install -e ".[dev]"
pytest

Building the documentation

The docs are generated from the docstrings in the simkit package using Sphinx + sphinx-autoapi + the PyData theme. To build them locally:

pip install -e ".[docs]"
sphinx-build -b html docs docs/_build/html

Then open docs/_build/html/index.html in your browser. Every function in simkit/ is automatically picked up and rendered into the API reference -- just write a good docstring and rebuild.

Release / dev workflow

Two equivalent ways to do every build/test/release/docs task. Pick whichever you prefer.

  • scripts/COMMANDS.md — raw, copy/paste-able bash commands organized by task. Read it top-to-bottom or grab whichever block you need. No abstraction, no functions, just shell commands.
  • scripts/release.sh — the same commands wrapped as subcommands so you can run e.g. ./scripts/release.sh build instead of pasting. There's also a Makefile with make build / make docs / etc. targets.

First-time setup on a new machine:

chmod +x scripts/release.sh
conda activate simkit   # so `python` points at the right interpreter

Quick reference for the script form:

What Command
Build sdist + wheel ./scripts/release.sh build (or make build)
Upload to TestPyPI ./scripts/release.sh upload-test
Install from TestPyPI in a throwaway venv ./scripts/release.sh test-install
Upload to real PyPI ./scripts/release.sh upload-prod
Build the docs ./scripts/release.sh docs
Build + open the docs ./scripts/release.sh docs-open
Remove all build/docs/cache junk ./scripts/release.sh clean

Local upload vs GitHub Actions Trusted Publishing

The script has the full tradeoff in a header comment. Summarized:

  • Local (upload-test / upload-prod): fastest path, but requires a PyPI API token on your laptop and the build runs in your local environment. Best for the very first upload (claiming the project name) or one-off hotfixes.
  • GitHub Actions (.github/workflows/release.yml, triggered by pushing a vX.Y.Z git tag): no secrets stored anywhere thanks to Trusted Publishing; every release is a reproducible build from a tagged commit; auto-publishes to TestPyPI first, then PyPI. Best for every release after the first.

Recommended flow: claim the project on PyPI/TestPyPI with one local upload, then switch to tag-triggered GitHub Actions for everything afterward:

git tag v0.1.1
git push --tags

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simkit-0.1.3.tar.gz (191.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simkit-0.1.3-py3-none-any.whl (188.4 kB view details)

Uploaded Python 3

File details

Details for the file simkit-0.1.3.tar.gz.

File metadata

  • Download URL: simkit-0.1.3.tar.gz
  • Upload date:
  • Size: 191.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for simkit-0.1.3.tar.gz
Algorithm Hash digest
SHA256 1041655f48c6005af9179d2492757e09da035f48471b706be5db3756d67905bc
MD5 b3363c0a2ebafc54656f780a5c0e82ee
BLAKE2b-256 83a0780974c769296ce637bc33c964ecab83845bad2eecbee538193d13bf892b

See more details on using hashes here.

Provenance

The following attestation bundles were made for simkit-0.1.3.tar.gz:

Publisher: release.yml on otmanon/simkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simkit-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: simkit-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 188.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for simkit-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d94683602e0832d07abe0ce46472a622867edca33316733808881b425abc1fb6
MD5 dfeb66d092cbb486e22d95e9837371d6
BLAKE2b-256 d276a969a72ffaaeca24bf50cf1209f9f34b4a8ed9a8d08cb2176f443f16cead

See more details on using hashes here.

Provenance

The following attestation bundles were made for simkit-0.1.3-py3-none-any.whl:

Publisher: release.yml on otmanon/simkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page