-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from blossom-evolution/redo_io
Redo IO, move to config files and dashboard
- Loading branch information
Showing
34 changed files
with
1,126 additions
and
534 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Read the Docs configuration file for Sphinx projects | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Set the OS, Python version and other tools you might need | ||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.11" | ||
# You can also specify other tool versions: | ||
# nodejs: "20" | ||
# rust: "1.70" | ||
# golang: "1.20" | ||
|
||
# Build documentation in the "docs/" directory with Sphinx | ||
sphinx: | ||
configuration: docs/source/conf.py | ||
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs | ||
# builder: "dirhtml" | ||
# Fail on all warnings to avoid broken references | ||
fail_on_warning: true | ||
|
||
# Optionally build your docs in additional formats such as PDF and ePub | ||
formats: | ||
# - epub | ||
|
||
# Optional but recommended, declare the Python requirements required | ||
# to build your documentation | ||
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html | ||
python: | ||
install: | ||
- requirements: requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,63 @@ | ||
# blossom [![PyPI version](https://badge.fury.io/py/blossom.svg)](https://badge.fury.io/py/blossom) [![Build Status](https://travis-ci.org/blossom-evolution/blossom.svg?branch=master)](https://travis-ci.org/blossom-evolution/blossom) [![Documentation Status](https://readthedocs.org/projects/blossom/badge/?version=latest)](https://blossom.readthedocs.io/en/latest/?badge=latest) | ||
|
||
Blossom is a Python package for simulating the evolution of organisms. Blossom supports both one and two dimensional worlds. | ||
Blossom is a Python package for simulating the dynamics of organism populations. Blossom supports both one and two dimensional worlds. | ||
|
||
## Installation | ||
|
||
You can use pip to install the latest version of the package automatically: | ||
|
||
``` | ||
pip install blossom | ||
``` | ||
|
||
Alternately, execute: | ||
|
||
``` | ||
git clone [email protected]:blossom-evolution/blossom.git | ||
python setup.py install | ||
``` | ||
|
||
## Basic Usage | ||
|
||
To start a simulation project, create a new directory to house all custom | ||
scripts, including a configuration file `config.yml`. In this config file, you | ||
specify species parameters, including starting population, max age, and action | ||
methods. Some action methods are built-in (for movement, eating, drinking, and | ||
reproduction), but you may use custom methods defined in external Python | ||
scripts, which are imported at runtime by Blossom via `linked_modules`. | ||
|
||
World parameters are also specified in the config file, including dimensions | ||
and the distribution of water and food. You may also set limits on the number | ||
of timesteps and organisms, in order to control the simulation in case of | ||
runaway populations. | ||
|
||
With your project directory set up, you may run the simulation using the | ||
included command-line interface (CLI): | ||
|
||
``` | ||
blossom run | ||
``` | ||
|
||
Note that for reproducibility, you can set the random seed either in the config | ||
file or at the CLI. For additional options, run `blossom run -h`. | ||
|
||
|
||
## Dashboard | ||
|
||
Blossom provides a dashboard that runs in your local browser, tracking the | ||
progress of your population runs. | ||
|
||
Initiate the dashboard, run | ||
|
||
``` | ||
blossom dashboard TRACK_DIR [-p PORT] | ||
``` | ||
where `TRACK_DIR` is the simulation project directory. You can then view the | ||
dashboard at `localhost:PORT`. | ||
|
||
![dashboard screenshot](media/blossom-dashboard.png) | ||
|
||
|
||
### GIF of basic simulation | ||
|
||
![example simulation](media/combined.gif) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '1.4.0' | ||
__version__ = '2.0.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.