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.0
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.1.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.1-py3-none-any.whl (188.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: simkit-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 3ea0b9b667623011dd054bf6c3131cb3a3d674f152a436e5df8fe77e4234b05c
MD5 feed2a8d471837da7a13800f83411511
BLAKE2b-256 bd132949cd98050b9ac53c9e11f6f4250733fde812cb5b514b24295c475722d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for simkit-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: simkit-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9581969bf6618ad239090790eef4840fe71c928ac5632e906017e4c92cd0de35
MD5 9e730c2e9fe126ed5a40d8f1c39f712f
BLAKE2b-256 00b4cefb37d858d04d212d43dbce4e8211533b524c46c5ac558d50f8bf59de72

See more details on using hashes here.

Provenance

The following attestation bundles were made for simkit-0.1.1-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