Example python package simulating boids: https://en.wikipedia.org/wiki/Boids. This package serves as an example for researchers on how to turn their python code into a package.
The package is published to PyPI and can be installed with
pip install boids
If you want the development version you must first clone the repo to your local machine, then install the project in development mode:
git clone https://github.com/gregordecristoforo/boids.git
cd boids
python -m pip install -e .
Import and run the run_simulation()
function:
import boids
boids.run_simulation()
You can overrite the default arguments as you wish (see the run_simulations()
docstring for a list of all input arguments):
boids.run_simulation(num_boids=50, alignment=0.03, separation=0.03, cohesion=0.02)
In order to guarantee that this project remains reproducible we include a environment.yml
file specifying the exact version of all dependencies. Recreate a conda environment with these packages by:
conda env create -f environment.yml