Skip to content
Christian Fobel edited this page Jan 30, 2019 · 10 revisions

Getting started

MicroDrop is developed primarily in the Python programming language. It has been designed with a plugin framework that makes it easy for developers to add custom functionality. Plugins are a great way to do things like add an interface to a new kind of hardware, sensor, etc. If you'd like to do something that cannot be accomplished through a plugin, you may want to try doing some core development by downloading the source code and setting up the development environment. In either case, we suggest that you read our Coding Style document.

If you're new to programming in Python, we've compiled a list of Programming Resources that should help get you up to speed quickly.


Setting up the MicroDrop development environment

MicroDrop is bundled as a Conda package, with all dependencies managed as Conda dependencies. The easiest way to set up a development environment is to:

  1. Install Miniconda for Windows 32-Bit Python 2.7 from here.
    • NOTE: We recommend DISABLING the default setting in the Miniconda installer, such that the Miniconda Python IS NOT set as your default system Python.
  2. Launch a Command Prompt session.
  3. Change directory into the installed Miniconda directory (e.g., C:\Users\<username>\Miniconda2).
  4. Update the conda package to version 4.6 or later and configure Powershell to automatically activate the Conda environment upon launching a prompt:
    Scripts\conda.exe update conda
    Scripts\conda.exe init powershell
  5. Download the environment.yaml file from the microdrop-exe project.
  6. Launch a Powershell prompt.
  7. Follow all but the final step from the Build section of the microdrop-exe README, i.e.:
    conda env create -n microdrop-dev --file environment.yaml
    conda activate microdrop-dev
    # Link all available plugins to enabled directory
    python -m mpm.bin.api enable $(dir $env:CONDA_PREFIX\share\microdrop\plugins\available)
  8. Install conda-dev: conda install -c sci-bots conda-dev.
  9. Clone the MicroDrop github repository and link the working microdrop directory into the Conda environment:
    git clone https://github.com/sci-bots/microdrop
    cd microdrop
    link-py-dev microdrop

MicroDrop executable releases

We use a three stage toolchain to go from a MicroDrop development environment to an auto-updating installer/application:

Each of the following three sections describes one of the stages in the MicroDrop application release toolchain.

sci-bots/microdrop

See Setting up the MicroDrop development environment above for instructions on setting up MicroDrop Conda development environment.

While MicroDrop can be launched directly within the development environment, the Conda environment includes many files not explicitly required for MicroDrop, which results in an environment that is quite large and can take over 10 minutes to install/uninstall. To reduce the size and prune unnecessary files, we generate portable executable releases using py2exe (see the sci-bots/microdrop-exe section below).

sci-bots/microdrop-exe

MicroDrop Windows executable releases are built using py2exe. The configuration for building these releases is available in the microdrop-exe project. Pre-built portable releases are available as self-extracting microdrop-exe GitHub releases.

Any microdrop-exe GitHub release may be extracted and run in-place by executing the contained MicroDrop.exe. However, to improve user experience, we also build a simple, one-click installer that installs updates automatically (see the sci-bots/microdrop-squirrel section below).

sci-bots/microdrop-squirrel

We utilize the Squirrel installation and update framework to wrap microdrop-exe GitHub releases as a self-updating Windows desktop application. The sci-bots/microdrop-squirrel project includes:

  • a simple launcher app that provides an interface between the Squirrel updating mechanism and the MicroDrop executable release; and
  • a build.py script which, given the URL of a microdrop-exe GitHub release, creates a corresponding Squirrel release.

See the sci-bots/microdrop-squirrel README for more information.

Note: the latest version of the installer/application is available at: https://sci-bots.com/microdrop-releases/Setup.exe


Issue tracker and mailing list

For viewing open tickets and reporting new issues, use the github issue tracker. You can also join the DropBot ​development mailing list to report issues or ask questions related to DropBot and/or MicroDrop.


Plugin framework

MicroDrop's plugin framework uses the Plugin Component Architecture from the PyUtilib project, which is based on the framework used in the Trac project.

Here's a link to PowerPoint slides from a tutorial on developing MicroDrop plugins.