scottbecker / autolims

MIT License
3 stars 0 forks source link

local autolims setup for dev / playground #2

Open 100ideas opened 6 years ago

100ideas commented 6 years ago

Hi @scottbecker , cool project! I am developing a workflow editor + note-taking app for bench researchers (open source) and found this repo while looking for users of autoprotocol "in the wild."

I set up a local dev environment to explore your project and thought my notes might be useful for anyone else interested in playing with or contributing to your work.

Is autolims being actively used/developed? If so I'm interested in contributing a little here and there, also figuring out how my note-taking app can best support it. For instance maybe working on a standardized json-ld or jsonapi schema for describing / serializing autolims runs in autoprotocol notation.


Autolims - setup local dev playground

Autolims repo: https://github.com/scottbecker/autolims

Django docs https://docs.djangoproject.com/en/2.0/ref/django-admin/#runserver

setup dev environment (OSX)

install db dependencies

brew install mysql postgres
# start mysql & postgres if not daemonized
mysql.server start
pg_ctl -D /usr/local/var/postgres start

# create autolims db user & db
# will need to update autolims/mysite/settings.py DATABASE field w/ user, db
createuser autolims --createdb -P
createdb autolims -U autolims

# to reset db (if desired):
# dropdb autolims; createdb autolims -U autolims
# clone repo
git clone https://github.com/scottbecker/autolims
cd autolims

# create python virtualenv to store dependencies locally
# I like to name mine '.pyenv' or `.py3env`
# use .pyenv/bin/<activation.script> to shim in the environment for your shell
virtualenv -p python .pyenv
. .pyenv/bin/activate.fish

# install requirements
pip install -r requirements.txt

# run migrations
python manage.py migrate

# make a django superuser
python manage.py createsuperuser

# check that the app works
python manage.py runserver
open http://localhost:8000/admin/autolims

# add test_db_fixture (kill server first)
python manage.py loaddata autolims/tests/data/test_db_fixture.json
python manage.py runserver

# create / admin autolims content at http://localhost:8000/admin/autolims
# play with app i.e. http://localhost:8000/default/1/runs/5#

Q. what is the point of autoprotocol_interpreter.py?:

@transaction.atomic
def execute_run(run):
    """
    Executes all the autoprotocol associated with a run.
    Updates the status of the run.
    Updates volumes of all inventory used by the run
    Create new samples as needed.

    Ensures that test runs can't access real inventory (and visa versa)

    update properties and names of aliquots (see outs of autoprotocol)

    Mark Samples as discarded as needed
    """

A. Looks like it is used to model, validate and update "run" state - cool. Is it also used to configure/generate meta-autoprotocol files, for execution on liquid handlers?

screenshot 2018-03-13_autolims_screen_shot

scottbecker commented 6 years ago

Thanks Matt,

Cool.

I added your notes to a README

My email is scott@delvetx.com.

I created autolims after transcriptic kicked its small customers off the platform. The intent was for it to be an open source version of their interface that would allow experiments to be executed by humans and some lab robots like opentrons working together. Your questions make it sound like this was clear to you. Humans would check off steps manually in the UI and then pass plates to the robots for the steps they could handle. My hope was that our lab would eventually have lower skill lab members (and some robots) that we could execute the protocols we generated in python and submitted to autolims.

At the moment, we aren't running protocols enough in repetition for us to move to this model - so autolims isn't in use.

autolims was never finished (it only handles pipette, stamp, and dispense).

basically, execute_run is responsible for running the autoprotocol itself and updating the state of containers. It would ideally tell robots to run any steps that they could. Of course, execute_run would need to be modified to be able to control one/a few step at a time.

instructions.html was intended to create a human readable version of every autoprotocol instruction.

Re api (also never done): Its probably easiest to just copy transcriptic's api https://developers.transcriptic.com/docs/create-a-run - this was my plan at least.

Can I see your project?

Scott

cell: 818-512-1731 hangouts/skype/live: scottjbecker linkedin https://www.linkedin.com/in/scottjbecker, calendar EST, https://calendar.google.com/calendar/embed?src=scott@delvetx.com&src=scottjbecker@gmail.com&ctz=America/New_York&gsessionid=OK&mode=WEEK calendar PST https://calendar.google.com/calendar/embed?src=scott@delvetx.com&src=scottjbecker@gmail.com&ctz=America/Los_Angeles&gsessionid=OK&mode=WEEK , twitter http://twitter.com/#!/scottbecker

On Tue, Mar 13, 2018 at 5:08 PM, Mac Cowell notifications@github.com wrote:

Hi @scottbecker https://github.com/scottbecker , cool project! I am developing a workflow editor + note-taking app for bench researchers (open source) and found this repo while looking for users of autoprotocol "in the wild."

I set up a local dev environment to explore your project and thought my notes might be useful for anyone else interested in playing with or contributing to your work.

Is autolims being actively used/developed? If so I'm interested in contributing a little here and there, also figuring out how my note-taking app can best support it. For instance maybe working on a standardized json-ld or jsonapi schema for describing / serializing autolims runs in autoprotocol notation.

Autolims - setup local dev playground

Autolims repo: https://github.com/scottbecker/autolims

Django docs https://docs.djangoproject.com/en/2.0/ref/django-admin/#runserver setup dev environment (OSX) install db dependencies

brew install mysql postgres# start mysql & postgres if not daemonized mysql.server start pg_ctl -D /usr/local/var/postgres start

create autolims db user & db# will need to update autolims/mysite/settings.py DATABASE field w/ user, db

createuser autolims --createdb -P createdb autolims -U autolims

to reset db (if desired):# dropdb autolims; createdb autolims -U autolims

clone repo

git clone https://github.com/scottbecker/autolimscd autolims

create python virtualenv to store dependencies locally# I like to name mine '.pyenv' or .py3env# use .pyenv/bin/ to shim in the environment for your shell

virtualenv -p python .pyenv. .pyenv/bin/activate.fish

install requirements

pip install -r requirements.txt

run migrations

python manage.py migrate

make a django superuser

python manage.py createsuperuser

check that the app works

python manage.py runserver open http://localhost:8000/admin/autolims

add test_db_fixture (kill server first)

python manage.py loaddata autolims/tests/data/test_db_fixture.json python manage.py runserver

create / admin autolims content at http://localhost:8000/admin/autolims# play with app i.e. http://localhost:8000/default/1/runs/5

Q. what is the point of autoprotocol_interpreter.py?:

@transaction.atomicdef execute_run(run): """ Executes all the autoprotocol associated with a run. Updates the status of the run. Updates volumes of all inventory used by the run Create new samples as needed. Ensures that test runs can't access real inventory (and visa versa) update properties and names of aliquots (see outs of autoprotocol) Mark Samples as discarded as needed """

A. Looks like it is used to model, validate and update "run" state - cool. Is it also used to configure/generate meta-autoprotocol files, for execution on liquid handlers?

screenshot [image: 2018-03-13_autolims_screen_shot] https://user-images.githubusercontent.com/57006/37369933-dfdae992-26c7-11e8-95bd-33a052903fcb.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/scottbecker/autolims/issues/2, or mute the thread https://github.com/notifications/unsubscribe-auth/AAETmX-3ZDOnbOdizM_a5fFk4ALEug7cks5teDUxgaJpZM4SpdFr .