SlideShare a Scribd company logo
Introduction to
Presented by
Felix Hoffmann
felix11h.github.io/
Slides
Slideshare:
tiny.cc/smt-present
Source:
tiny.cc/smt-source
Resources on Sumatra
Website: neuralensemble.org/sumatra/
Getting started:
packages.python.org/Sumatra/
Repository:
bitbucket.org/apdavison/sumatra/
Mailinglist:
tiny.cc/smt-user
Maintainer: Andrew Davison
This work is licensed under a Creative Commons Attribution 4.0 International License.
Git Primer I
Initialization:
1 mkdir new_dir
2 cd new_dir
3 # new_dir is empty
4 ls -a
5 git init
6 # after initialization now has .git folder
7 ls -a
Git Primer II
Adding files and committing changes:
1 # write "hello world" in a file
2 echo "hello world" >> hello_world.txt
3 # stages the file
4 git add hello_world.txt
5 # commit (-a)ll staged changes with a (-m)essage
6 git commit -am ’added hello world’
7 # show the commit in the log
8 git log
Git Primer III
Going back to previous versions:
1 # first change the file
2 echo "goodbye world" >> hello_world.txt
3 # content has changed indeed
4 more hello_world.txt
5 # commit the changes
6 git commit hello_world.txt -m ’goodbye world’
7 # new commit appears in log
8 git log
9
10 # now use first 4 digits of commit ID shown in log
11 git checkout XXXX
12 # hello_world.txt was reverted to old version:
13 more hello_world.txt
14 # finlly, go back to latest commit
15 git checkout master
Git Primer IV
Other helpful commands:
1 # show the status of all files
2 git status -s
Resources
- Software Carpentry
http://swcarpentry.github.io/git-novice/
- GitHub, Bitbucket
https://github.com/
http://bitbucket.com/
- git documentation
http://git-scm.com/doc
Sumatra Installation (Version 0.6.0)
Install globally (Ubuntu):
1 sudo apt-get install python-pip
2 sudo pip install django==1.6
3 sudo pip install sumatra
4 sudo apt-get install git
5 sudo pip install gitpython==0.3.7
... or install in a virtualenv:
1 virtualenv smt_0.6.0
2 source smt_0.6.0/bin/activate
3 pip install django==1.6
4 pip install sumatra
5 pip install gitpython==0.3.7
Sumatra Installation (Version 0.6.0) II
Manually test your setup:
1 mkdir smt_test/
2 cd smt_test/
3 git init
4 smt init Test
5 echo "print ’hello’" >> hello_world.py
6 git add hello_world.py
7 git commit -am ’test’
8 smt run --main=hello_world.py
9 smtweb
Setting up your first Sumatra project...
1 mkdir new_project/
2 cd new_project/
3 git init
4 # configure for relative input paths and custon output
5 smt init PROJECT_NAME --input=. --datapath=MyData/
6 # show the configuration
7 info
... and running the first tracked computation
1 echo "open(’MyData/out1.dat’,’a’).close()" > my_scrpt.py
2 git add my_scrpt.py
3 git commit -am ’added my_scrpt’
4 echo "a = 1
5 b = 2" > params.py
6 # create some example input file
7 echo "123,456,789
8 987,654,321" > input1.dat
9 # input & parameter files need not be (shouldn’t be?)
10 # under version control
11 smt run --main=my_scrpt.py input1.dat params.py
12 # inspect new simulation record in the terminal...
13 smt list --long
14 # ... and the web interface
15 smtweb
Things Sumatra can’t do
- track parallel computations
- is not easily transferable to other systems or even
local directories
- misses some implementations (rerun when code has
been changed, display code from web interface, ...)
Alternatives to Sumatra
- pypet
https://pypet.readthedocs.org/en/latest/
- Manual tracking of computations (file names,
spreadsheets, ...)
- custom tools?
Have fun with Sumatra!
Presented by
Felix Hoffmann
felix11h.github.io/
Slides
Slideshare:
tiny.cc/smt-present
Source:
tiny.cc/smt-source
Resources on Sumatra
Website: neuralensemble.org/sumatra/
Getting started:
packages.python.org/Sumatra/
Repository:
bitbucket.org/apdavison/sumatra/
Mailinglist:
tiny.cc/smt-user
Maintainer: Andrew Davison
This work is licensed under a Creative Commons Attribution 4.0 International License.

More Related Content

What's hot

uWSGI - Swiss army knife for your Python web apps
uWSGI - Swiss army knife for your Python web appsuWSGI - Swiss army knife for your Python web apps
uWSGI - Swiss army knife for your Python web apps
Tomislav Raseta
 
20150613 self-puppet v4-avoiding_dragons
20150613 self-puppet v4-avoiding_dragons20150613 self-puppet v4-avoiding_dragons
20150613 self-puppet v4-avoiding_dragonsgarrett honeycutt
 
Introduzione a GitHub Actions (beta)
Introduzione a GitHub Actions (beta)Introduzione a GitHub Actions (beta)
Introduzione a GitHub Actions (beta)
Giulio Vian
 
How to install git on ubuntu
How to install git on ubuntuHow to install git on ubuntu
How to install git on ubuntu
baran19901990
 
Integrate gitolite with mantis
Integrate gitolite with mantisIntegrate gitolite with mantis
Integrate gitolite with mantisJohnson Chou
 
Git: An introduction of plumbing and porcelain commands
Git: An introduction of plumbing and porcelain commandsGit: An introduction of plumbing and porcelain commands
Git: An introduction of plumbing and porcelain commands
th507
 
[4] 아두이노와 인터넷
[4] 아두이노와 인터넷[4] 아두이노와 인터넷
[4] 아두이노와 인터넷
Chiwon Song
 
Python
PythonPython
Python
HungTrinh69
 
Proxy server ubuntu 12.04
Proxy server ubuntu 12.04Proxy server ubuntu 12.04
Proxy server ubuntu 12.04Tio Aldiansyah
 
Virtualenv
VirtualenvVirtualenv
Virtualenv
WEBdeBS
 
Docker e postgresql
Docker e postgresqlDocker e postgresql
Docker e postgresql
Fernando Ike
 
Heat project onboarding
Heat  project onboardingHeat  project onboarding
Heat project onboarding
Rico Lin
 
Deploying Rails applications with Moonshine
Deploying Rails applications with MoonshineDeploying Rails applications with Moonshine
Deploying Rails applications with Moonshine
Robot Mode
 
Docker command
Docker commandDocker command
Docker command
Eric Ahn
 
Pengenalan Git
Pengenalan GitPengenalan Git
Pengenalan Git
fajran
 
A.I. Exercise.
A.I. Exercise.A.I. Exercise.
A.I. Exercise.
Mario Cho
 
EuroPython 2014 - How we switched our 800+ projects from Apache to uWSGI
EuroPython 2014 - How we switched our 800+ projects from Apache to uWSGIEuroPython 2014 - How we switched our 800+ projects from Apache to uWSGI
EuroPython 2014 - How we switched our 800+ projects from Apache to uWSGI
Max Tepkeev
 

What's hot (20)

uWSGI - Swiss army knife for your Python web apps
uWSGI - Swiss army knife for your Python web appsuWSGI - Swiss army knife for your Python web apps
uWSGI - Swiss army knife for your Python web apps
 
Basic git
Basic gitBasic git
Basic git
 
20150613 self-puppet v4-avoiding_dragons
20150613 self-puppet v4-avoiding_dragons20150613 self-puppet v4-avoiding_dragons
20150613 self-puppet v4-avoiding_dragons
 
Introduzione a GitHub Actions (beta)
Introduzione a GitHub Actions (beta)Introduzione a GitHub Actions (beta)
Introduzione a GitHub Actions (beta)
 
How to install git on ubuntu
How to install git on ubuntuHow to install git on ubuntu
How to install git on ubuntu
 
Integrate gitolite with mantis
Integrate gitolite with mantisIntegrate gitolite with mantis
Integrate gitolite with mantis
 
Git: An introduction of plumbing and porcelain commands
Git: An introduction of plumbing and porcelain commandsGit: An introduction of plumbing and porcelain commands
Git: An introduction of plumbing and porcelain commands
 
[4] 아두이노와 인터넷
[4] 아두이노와 인터넷[4] 아두이노와 인터넷
[4] 아두이노와 인터넷
 
Now i git it!!!
Now i git it!!!Now i git it!!!
Now i git it!!!
 
Python
PythonPython
Python
 
Proxy server ubuntu 12.04
Proxy server ubuntu 12.04Proxy server ubuntu 12.04
Proxy server ubuntu 12.04
 
Virtualenv
VirtualenvVirtualenv
Virtualenv
 
Docker e postgresql
Docker e postgresqlDocker e postgresql
Docker e postgresql
 
Heat project onboarding
Heat  project onboardingHeat  project onboarding
Heat project onboarding
 
Deploying Rails applications with Moonshine
Deploying Rails applications with MoonshineDeploying Rails applications with Moonshine
Deploying Rails applications with Moonshine
 
Docker command
Docker commandDocker command
Docker command
 
Pengenalan Git
Pengenalan GitPengenalan Git
Pengenalan Git
 
Git training
Git trainingGit training
Git training
 
A.I. Exercise.
A.I. Exercise.A.I. Exercise.
A.I. Exercise.
 
EuroPython 2014 - How we switched our 800+ projects from Apache to uWSGI
EuroPython 2014 - How we switched our 800+ projects from Apache to uWSGIEuroPython 2014 - How we switched our 800+ projects from Apache to uWSGI
EuroPython 2014 - How we switched our 800+ projects from Apache to uWSGI
 

Similar to Introduction to Sumatra

Princeton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance ToolingPrinceton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance Tooling
Henry Schreiner
 
Ruby and Rails Packaging to Production
Ruby and Rails Packaging to ProductionRuby and Rails Packaging to Production
Ruby and Rails Packaging to Production
Fabio Kung
 
Git learn from scratch
Git learn from scratchGit learn from scratch
Git learn from scratch
Mir Arif Hasan
 
Git the Wnderfull tool
Git the Wnderfull toolGit the Wnderfull tool
Git the Wnderfull toolAmitoj Singh
 
A Practical Introduction to git
A Practical Introduction to gitA Practical Introduction to git
A Practical Introduction to git
Emanuele Olivetti
 
GIT in a nutshell
GIT in a nutshellGIT in a nutshell
GIT in a nutshell
alignan
 
Git Tutorial
Git TutorialGit Tutorial
Git Tutorial
Pranav Kulkarni
 
Hello git - a soft introduction to git (Talk Slides)
Hello git - a soft introduction to git (Talk Slides) Hello git - a soft introduction to git (Talk Slides)
Hello git - a soft introduction to git (Talk Slides)
Amity University Noida
 
Introduction to GIT versioning
Introduction to GIT versioningIntroduction to GIT versioning
Introduction to GIT versioning
Stackit Community
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
David Newbury
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
Andy Slocum
 
How To Install GitLab As Your Private GitHub Clone
How To Install GitLab As Your Private GitHub CloneHow To Install GitLab As Your Private GitHub Clone
How To Install GitLab As Your Private GitHub Clone
VEXXHOST Private Cloud
 
Git setuplinux
Git setuplinuxGit setuplinux
Git setuplinux
Shubham Verma
 
Gitosis on Mac OS X Server
Gitosis on Mac OS X ServerGitosis on Mac OS X Server
Gitosis on Mac OS X ServerYasuhiro Asaka
 
Git 101 Workshop
Git 101 WorkshopGit 101 Workshop
Git 101 Workshop
Joy Seng
 
Git Concepts, Commands and Connectivity
Git Concepts, Commands and ConnectivityGit Concepts, Commands and Connectivity
Git Concepts, Commands and Connectivity
Raja Soundaramourty
 
Releasing and deploying python tools
Releasing and deploying python toolsReleasing and deploying python tools
Releasing and deploying python tools
Quintagroup
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
E Carter
 
Git and Github workshop
Git and Github workshopGit and Github workshop
Git and Github workshop
Otto Kekäläinen
 

Similar to Introduction to Sumatra (20)

Princeton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance ToolingPrinceton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance Tooling
 
Ruby and Rails Packaging to Production
Ruby and Rails Packaging to ProductionRuby and Rails Packaging to Production
Ruby and Rails Packaging to Production
 
Git learn from scratch
Git learn from scratchGit learn from scratch
Git learn from scratch
 
Git the Wnderfull tool
Git the Wnderfull toolGit the Wnderfull tool
Git the Wnderfull tool
 
A Practical Introduction to git
A Practical Introduction to gitA Practical Introduction to git
A Practical Introduction to git
 
GIT in a nutshell
GIT in a nutshellGIT in a nutshell
GIT in a nutshell
 
Git Tutorial
Git TutorialGit Tutorial
Git Tutorial
 
Hello git - a soft introduction to git (Talk Slides)
Hello git - a soft introduction to git (Talk Slides) Hello git - a soft introduction to git (Talk Slides)
Hello git - a soft introduction to git (Talk Slides)
 
Introduction to GIT versioning
Introduction to GIT versioningIntroduction to GIT versioning
Introduction to GIT versioning
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
 
How To Install GitLab As Your Private GitHub Clone
How To Install GitLab As Your Private GitHub CloneHow To Install GitLab As Your Private GitHub Clone
How To Install GitLab As Your Private GitHub Clone
 
GitSetupLinux
GitSetupLinuxGitSetupLinux
GitSetupLinux
 
Git setuplinux
Git setuplinuxGit setuplinux
Git setuplinux
 
Gitosis on Mac OS X Server
Gitosis on Mac OS X ServerGitosis on Mac OS X Server
Gitosis on Mac OS X Server
 
Git 101 Workshop
Git 101 WorkshopGit 101 Workshop
Git 101 Workshop
 
Git Concepts, Commands and Connectivity
Git Concepts, Commands and ConnectivityGit Concepts, Commands and Connectivity
Git Concepts, Commands and Connectivity
 
Releasing and deploying python tools
Releasing and deploying python toolsReleasing and deploying python tools
Releasing and deploying python tools
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
 
Git and Github workshop
Git and Github workshopGit and Github workshop
Git and Github workshop
 

Recently uploaded

Structures and textures of metamorphic rocks
Structures and textures of metamorphic rocksStructures and textures of metamorphic rocks
Structures and textures of metamorphic rocks
kumarmathi863
 
insect taxonomy importance systematics and classification
insect taxonomy importance systematics and classificationinsect taxonomy importance systematics and classification
insect taxonomy importance systematics and classification
anitaento25
 
EY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptxEY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptx
AlguinaldoKong
 
Nutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technologyNutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technology
Lokesh Patil
 
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATIONPRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
ChetanK57
 
Structural Classification Of Protein (SCOP)
Structural Classification Of Protein  (SCOP)Structural Classification Of Protein  (SCOP)
Structural Classification Of Protein (SCOP)
aishnasrivastava
 
general properties of oerganologametal.ppt
general properties of oerganologametal.pptgeneral properties of oerganologametal.ppt
general properties of oerganologametal.ppt
IqrimaNabilatulhusni
 
Viksit bharat till 2047 India@2047.pptx
Viksit bharat till 2047  India@2047.pptxViksit bharat till 2047  India@2047.pptx
Viksit bharat till 2047 India@2047.pptx
rakeshsharma20142015
 
Comparative structure of adrenal gland in vertebrates
Comparative structure of adrenal gland in vertebratesComparative structure of adrenal gland in vertebrates
Comparative structure of adrenal gland in vertebrates
sachin783648
 
In silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptxIn silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptx
AlaminAfendy1
 
FAIR & AI Ready KGs for Explainable Predictions
FAIR & AI Ready KGs for Explainable PredictionsFAIR & AI Ready KGs for Explainable Predictions
FAIR & AI Ready KGs for Explainable Predictions
Michel Dumontier
 
GBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram StainingGBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram Staining
Areesha Ahmad
 
filosofia boliviana introducción jsjdjd.pptx
filosofia boliviana introducción jsjdjd.pptxfilosofia boliviana introducción jsjdjd.pptx
filosofia boliviana introducción jsjdjd.pptx
IvanMallco1
 
justice-and-fairness-ethics with example
justice-and-fairness-ethics with examplejustice-and-fairness-ethics with example
justice-and-fairness-ethics with example
azzyixes
 
NuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final versionNuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final version
pablovgd
 
erythropoiesis-I_mechanism& clinical significance.pptx
erythropoiesis-I_mechanism& clinical significance.pptxerythropoiesis-I_mechanism& clinical significance.pptx
erythropoiesis-I_mechanism& clinical significance.pptx
muralinath2
 
Seminar of U.V. Spectroscopy by SAMIR PANDA
 Seminar of U.V. Spectroscopy by SAMIR PANDA Seminar of U.V. Spectroscopy by SAMIR PANDA
Seminar of U.V. Spectroscopy by SAMIR PANDA
SAMIR PANDA
 
insect morphology and physiology of insect
insect morphology and physiology of insectinsect morphology and physiology of insect
insect morphology and physiology of insect
anitaento25
 
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
Sérgio Sacani
 
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
muralinath2
 

Recently uploaded (20)

Structures and textures of metamorphic rocks
Structures and textures of metamorphic rocksStructures and textures of metamorphic rocks
Structures and textures of metamorphic rocks
 
insect taxonomy importance systematics and classification
insect taxonomy importance systematics and classificationinsect taxonomy importance systematics and classification
insect taxonomy importance systematics and classification
 
EY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptxEY - Supply Chain Services 2018_template.pptx
EY - Supply Chain Services 2018_template.pptx
 
Nutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technologyNutraceutical market, scope and growth: Herbal drug technology
Nutraceutical market, scope and growth: Herbal drug technology
 
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATIONPRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
 
Structural Classification Of Protein (SCOP)
Structural Classification Of Protein  (SCOP)Structural Classification Of Protein  (SCOP)
Structural Classification Of Protein (SCOP)
 
general properties of oerganologametal.ppt
general properties of oerganologametal.pptgeneral properties of oerganologametal.ppt
general properties of oerganologametal.ppt
 
Viksit bharat till 2047 India@2047.pptx
Viksit bharat till 2047  India@2047.pptxViksit bharat till 2047  India@2047.pptx
Viksit bharat till 2047 India@2047.pptx
 
Comparative structure of adrenal gland in vertebrates
Comparative structure of adrenal gland in vertebratesComparative structure of adrenal gland in vertebrates
Comparative structure of adrenal gland in vertebrates
 
In silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptxIn silico drugs analogue design: novobiocin analogues.pptx
In silico drugs analogue design: novobiocin analogues.pptx
 
FAIR & AI Ready KGs for Explainable Predictions
FAIR & AI Ready KGs for Explainable PredictionsFAIR & AI Ready KGs for Explainable Predictions
FAIR & AI Ready KGs for Explainable Predictions
 
GBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram StainingGBSN- Microbiology (Lab 3) Gram Staining
GBSN- Microbiology (Lab 3) Gram Staining
 
filosofia boliviana introducción jsjdjd.pptx
filosofia boliviana introducción jsjdjd.pptxfilosofia boliviana introducción jsjdjd.pptx
filosofia boliviana introducción jsjdjd.pptx
 
justice-and-fairness-ethics with example
justice-and-fairness-ethics with examplejustice-and-fairness-ethics with example
justice-and-fairness-ethics with example
 
NuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final versionNuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final version
 
erythropoiesis-I_mechanism& clinical significance.pptx
erythropoiesis-I_mechanism& clinical significance.pptxerythropoiesis-I_mechanism& clinical significance.pptx
erythropoiesis-I_mechanism& clinical significance.pptx
 
Seminar of U.V. Spectroscopy by SAMIR PANDA
 Seminar of U.V. Spectroscopy by SAMIR PANDA Seminar of U.V. Spectroscopy by SAMIR PANDA
Seminar of U.V. Spectroscopy by SAMIR PANDA
 
insect morphology and physiology of insect
insect morphology and physiology of insectinsect morphology and physiology of insect
insect morphology and physiology of insect
 
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
Earliest Galaxies in the JADES Origins Field: Luminosity Function and Cosmic ...
 
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
 

Introduction to Sumatra

  • 1. Introduction to Presented by Felix Hoffmann felix11h.github.io/ Slides Slideshare: tiny.cc/smt-present Source: tiny.cc/smt-source Resources on Sumatra Website: neuralensemble.org/sumatra/ Getting started: packages.python.org/Sumatra/ Repository: bitbucket.org/apdavison/sumatra/ Mailinglist: tiny.cc/smt-user Maintainer: Andrew Davison This work is licensed under a Creative Commons Attribution 4.0 International License.
  • 2. Git Primer I Initialization: 1 mkdir new_dir 2 cd new_dir 3 # new_dir is empty 4 ls -a 5 git init 6 # after initialization now has .git folder 7 ls -a
  • 3. Git Primer II Adding files and committing changes: 1 # write "hello world" in a file 2 echo "hello world" >> hello_world.txt 3 # stages the file 4 git add hello_world.txt 5 # commit (-a)ll staged changes with a (-m)essage 6 git commit -am ’added hello world’ 7 # show the commit in the log 8 git log
  • 4. Git Primer III Going back to previous versions: 1 # first change the file 2 echo "goodbye world" >> hello_world.txt 3 # content has changed indeed 4 more hello_world.txt 5 # commit the changes 6 git commit hello_world.txt -m ’goodbye world’ 7 # new commit appears in log 8 git log 9 10 # now use first 4 digits of commit ID shown in log 11 git checkout XXXX 12 # hello_world.txt was reverted to old version: 13 more hello_world.txt 14 # finlly, go back to latest commit 15 git checkout master
  • 5. Git Primer IV Other helpful commands: 1 # show the status of all files 2 git status -s Resources - Software Carpentry http://swcarpentry.github.io/git-novice/ - GitHub, Bitbucket https://github.com/ http://bitbucket.com/ - git documentation http://git-scm.com/doc
  • 6. Sumatra Installation (Version 0.6.0) Install globally (Ubuntu): 1 sudo apt-get install python-pip 2 sudo pip install django==1.6 3 sudo pip install sumatra 4 sudo apt-get install git 5 sudo pip install gitpython==0.3.7 ... or install in a virtualenv: 1 virtualenv smt_0.6.0 2 source smt_0.6.0/bin/activate 3 pip install django==1.6 4 pip install sumatra 5 pip install gitpython==0.3.7
  • 7. Sumatra Installation (Version 0.6.0) II Manually test your setup: 1 mkdir smt_test/ 2 cd smt_test/ 3 git init 4 smt init Test 5 echo "print ’hello’" >> hello_world.py 6 git add hello_world.py 7 git commit -am ’test’ 8 smt run --main=hello_world.py 9 smtweb
  • 8. Setting up your first Sumatra project... 1 mkdir new_project/ 2 cd new_project/ 3 git init 4 # configure for relative input paths and custon output 5 smt init PROJECT_NAME --input=. --datapath=MyData/ 6 # show the configuration 7 info
  • 9. ... and running the first tracked computation 1 echo "open(’MyData/out1.dat’,’a’).close()" > my_scrpt.py 2 git add my_scrpt.py 3 git commit -am ’added my_scrpt’ 4 echo "a = 1 5 b = 2" > params.py 6 # create some example input file 7 echo "123,456,789 8 987,654,321" > input1.dat 9 # input & parameter files need not be (shouldn’t be?) 10 # under version control 11 smt run --main=my_scrpt.py input1.dat params.py 12 # inspect new simulation record in the terminal... 13 smt list --long 14 # ... and the web interface 15 smtweb
  • 10. Things Sumatra can’t do - track parallel computations - is not easily transferable to other systems or even local directories - misses some implementations (rerun when code has been changed, display code from web interface, ...) Alternatives to Sumatra - pypet https://pypet.readthedocs.org/en/latest/ - Manual tracking of computations (file names, spreadsheets, ...) - custom tools?
  • 11. Have fun with Sumatra! Presented by Felix Hoffmann felix11h.github.io/ Slides Slideshare: tiny.cc/smt-present Source: tiny.cc/smt-source Resources on Sumatra Website: neuralensemble.org/sumatra/ Getting started: packages.python.org/Sumatra/ Repository: bitbucket.org/apdavison/sumatra/ Mailinglist: tiny.cc/smt-user Maintainer: Andrew Davison This work is licensed under a Creative Commons Attribution 4.0 International License.