LPF Training Handbook!

Similar documents
Gitlab Setup/Usage by Yifeng Zhu modified by Vince Weaver 30 January 2019

EGit/Gerrit Hands-on training #1: Installation and Configuration

Git Magic: Versioning Files Like a Boss. Tommy MacWilliam

CS 390 Software Engineering Lecture 5 More Git

Advanced Operating Systems Control Versioning with GIT. Giuseppe Massari

Software Development I

Software Revision Control for MASS. Git Installation / Configuration / Use

This document is intended to help you connect to the CVS server on a Windows system.

Using GitHub and SourceTree to work with DITA TC repositories

Setting up GitHub Version Control with Qt Creator*


Version control with git and Rstudio. Remko Duursma

Visualizing Git Workflows. A visual guide to 539 workflows

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Gerrit

End User Manual. December 2014 V1.0

Tips on how to set up a GitHub account:

Tools for the programming mid-semester projects

CSE 332: Data Structures and Parallelism Winter 2019 Setting Up Your CSE 332 Environment

OpenEarth OpenEarthTools = Open source management of Data, Models and Tools for marine & coastal science & technology

Tutorial 2 GitHub Tutorial

MOOSE-Based Application Development on GitLab

DSS User Guide. End User Guide. - i -

Appserv Internal Desktop Access Mac OS Device with Safari Browser. Enter your Appserv username and password to sign in to the Website

Revision Control. An Introduction Using Git 1/15

Git version control with Eclipse (EGit) Tutorial

Object Oriented Programming. Week 1 Part 2 Git and egit

Human-Computer Interaction Design

Human-Computer Interaction Design

GETTING TO KNOW GIT: PART II JUSTIN ELLIOTT PENN STATE UNIVERSITY

Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum

What is git? Distributed Version Control System (VCS); Created by Linus Torvalds, to help with Linux development;

SwanSim - A Guide to Git / SourceTree / GitLab for Windows

Kardia / Centrallix VM Appliance Quick Reference

Using SourceTree on the Development Server

USER GUIDE. MADCAP FLARE 2017 r3. Source Control: Git

Git! Fundamentals. IT Pro Roundtable! June 17, 2014!! Justin Elliott! ITS / TLT! Classroom and Lab Computing!! Michael Potter!

Version Control. Second level Third level Fourth level Fifth level. - Software Development Project. January 17, 2018

Git. CSCI 5828: Foundations of Software Engineering Lecture 02a 08/27/2015

EDA Spring, Project Guidelines

CS 261 Recitation 1 Compiling C on UNIX

Git tutorial. Katie Osterried C2SM. October 22, 2015

School of Computing Science Gitlab Platform - User Notes

Sample Spark Web-App. Overview. Prerequisites

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read)

Lab 1 1 Due Wed., 2 Sept. 2015

GIT. A free and open source distributed version control system. User Guide. January, Department of Computer Science and Engineering

TDDC88 Lab 4 Software Configuration Management

History...: Displays a window of Gitk, a standard commit viewer for Git.

A quick (and maybe practical) guide to Git and version control. By Jay Johnson

Versioning with git. Moritz August Git/Bash/Python-Course for MPE. Moritz August Versioning with Git

Version Control Systems

Table of Contents. Concepts

CVS for Moodle Developers

Hands-On Lab. Getting Started with Git using Team Foundation Server Lab version: Last updated: 12/30/2013

Version Control. Second level Third level Fourth level Fifth level. - Software Development Project. January 11, 2017

Getting started with GitHub

BLUEPRINT TEAM REPOSITORY. For Requirements Center & Requirements Center Test Definition

USER GUIDE MADCAP LINGO Source Control: Git

Voyant Connect User Guide

GIT. CS 490MT/5555, Spring 2017, Yongjie Zheng

[Software Development] Development Tools. Davide Balzarotti. Eurecom Sophia Antipolis, France

Why To Go With Licensed Version Control Tool When Open Source Tool Is There

Git AN INTRODUCTION. Introduction to Git as a version control system: concepts, main features and practical aspects.

Apache Subversion Tutorial

Section 2: Developer tools and you. Alex Mariakakis (staff-wide)

2 Initialize a git repository on your machine, add a README file, commit and push

Git AN INTRODUCTION. Introduction to Git as a version control system: concepts, main features and practical aspects.

Outline The three W s Overview of gits structure Using git Final stuff. Git. A fast distributed revision control system

FEEG Applied Programming 3 - Version Control and Git II

Lab 01 How to Survive & Introduction to Git. Web Programming DataLab, CS, NTHU

Version control CSE 403

Network Team. Document for connecting a Mac to the University VPN system

Revision control. INF5750/ Lecture 2 (Part I)

Working with CVS in Eclipse

Mend for Eclipse quick start guide local analysis

Version Control Systems (VCS)

MIDAS Product Suite. Version: QUICK Overview

G E T T I N G S TA R T E D W I T H G I T

Common Git Commands. Git Crash Course. Teon Banek April 7, Teon Banek (TakeLab) Common Git Commands TakeLab 1 / 18

Lab Exercise Git: A distributed version control system

Git. A fast distributed revision control system. Nils Moschüring PhD Student (LMU)

EECS 470 Lab 4. Version Control System. Friday, 31 st January, 2014

213/513/613 Linux/Git Bootcamp. Cyrus, Eugene, Minji, Niko

Git for Version Control

Recap: Developer's Environment

Github/Git Primer. Tyler Hague

Using GitHub to Share with SparkFun a

Getting the files for the first time...2. Making Changes, Commiting them and Pull Requests:...5. Update your repository from the upstream master...

Setup Guide for Hard-Wire Ethernet Connected TP-Link TL-WR841N 300 Mbps Wireless N Router AARP Foundation Tax-Aide Colorado Technology Specialist

PASSPORTAL PLUGIN DOCUMENTATION

Version Control. Kyungbaek Kim. Chonnam National University School of Electronics and Computer Engineering. Original slides from James Brucker

Using Git to Manage Source RTL

FusionViewer Developer s Guide

Google Drive: Access and organize your files

Git. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes

Sabre Customer Virtual Private Network Launcher (SCVPNLauncher)

Git and GitHub. Dan Wysocki. February 12, Dan Wysocki Git and GitHub February 12, / 48

CSCI 2132: Software Development. Norbert Zeh. Faculty of Computer Science Dalhousie University. Subversion (and Git) Winter 2019

Software Revision Control for MASS. Git Basics, Best Practices

Kardia / Centrallix VM Appliance Quick Reference

Transcription:

LPF Training Handbook M Hewitson 2014-04-25 1. Introduction 1 2. Software setup 1 Accessing the relevant software repositories 2 Getting the software 3 Installing LTPDA 3 Installation of Extension modules 4 Known Issue 8 3. Getting Started with LTPDA 8 4. Basic GIT Usage 8 SourceTree and SSH on Windows 9 Cloning 10 Staging Commits and Committing 12 Pushing and Pulling 12 1. Introduction This note should serve as a handbook for the LISA Pathfinder training sessions. It will discuss the software you should install and the tools you should be familiar with before starting. The steps are: 1. Setup a GIT account on the AEI server (see section 2) 2. Request access to the LPF team (see section 2) 3. Clone the ltpda_training GIT repository (see section 2) 4. Install LTPDA (see section 2) 5. Clone the ltpda_extensions repository (see section 2) 6. Install the extension module (see section 2) 7. Work through the 1st & 2nd LTPDA training sessions (see section 3) More details on the usage of GIT are given in Section 4. 2. Software setup The training session will use LTPDA Version 2.8 (which will be released around May 28th). As well as the core toolbox, an additional extension module is required (LPF_DA_Module) which is in the ltpda_extensions GIT repository. For the training, you should use the 'operations' branch, where you should never push. Step-by-step instructions are below. 1 of 13

The following table summarises the minimum requirements for the LPF operations: Software Version MATLAB 2011a Signal Processing Toolbox 6.13 Symbolic Math Toolbox 5.4 LTPDA Toolbox 2.8 LPF_DA_Module GIT branch operations of ltpda_extensions Accessing the relevant software repositories As well as the GIT repository for the LTPDA extension module, another GIT repository for the management of files created/used during the training has been setup on the AEI GIT server. This 'training repository also contains the version of LTPDA that should be used. A quick tutorial on the use of GIT is included later in this document, so if you are unfamiliar with GIT, it may be sensible to read that first to get your GIT client and environment properly set up. You will need an account on this server. To get one do: In a web browser, navigate to: http://gitmaster.atlas.aei.uni-hannover.de Register for an account by clicking the 'Register' link in the upper right. 1 2 Inform Martin Hewitson about your username (by email). mailto: hewitson<at>aei.mpg.de Once you are added to the team, you will be able to You will then be added to the LPF Ops team, which will give you access to the necessary git modules. 3 2 of 13

Clone the LPF training module and the LTPDA Extensions module. git@gitmaster.atlas.aei.uni-hannover.de:ltpda/lpf_training.git git@gitmaster.atlas.aei.uni-hannover.de:ltpda/ltpda_extensions.git From the command line, you can simply do: 4 $ cd /the/place/where/you/have/ltpda_extensions $ git fetch $ git checkout -b origin/operations Further (brief) instructions on using GIT and graphical clients can be found in section GIT Usage. The lpf_training GIT module will contain the basic structure needed to get us started. Getting the software The version of LTPDA will be available as part of the training GIT module; it will also be available on the LTPDA website. Installing LTPDA Follow the installation guide in the LTPDA user manual which is on-line at: http://www.lisa.uni-hannover.de/ltpda/ In brief: Unzip the ltpda_toolbox_28.zip file in the lpf_training/201406/software folder 1 3 of 13

2 Launch MATLAB and ensure no other LTPDA versions are in the MATLAB path. Go to MATLAB s preferences, look under the path section and check for any paths which contain old LTPDA versions. If you find any, delete them. If you have no other folders in your path, you can also click on the 'Default' button to return MATLAB to a clean path, ready for installing LTPDA. Add the new LTPDA folder (the unzipped folder) to the MATLAB path (select with subdirectories ). Run ltpda_startup at the MATLAB command prompt. Run run_tests at the MATLAB command prompt to ensure correct installation. 3 4 5 Install the 3rd party Graphviz software. This is used for visualisation of object history and pipeline flow diagrams. Instructions are here: http://www.lisa.aei-hannover.de/ltpda/usermanual/ug/additional_progs.html Installation of Extension modules The relevant version of the ltpda_extensions module exists on a GIT branch called operations. You can 'checkout this branch during the cloning process, or after cloning. To do this during the cloning process, if you re using a command line GIT client, you would do git clone b operations git@gitmaster.atlas.aei.uni-hannover.de:ltpda/ltpda_extensions.git 6 4 of 13

If you are using a graphical client, for example, SourceTree, you would clone the repository using File->New/Clone then in the dialog specify the repository URL and in the advanced options, the branch name, like this: If you already have a clone of a repository, and you have pulled to update your local version, then you must switch to the 'operations' branch. The action here is to 'checkout' the operations branch. In the screenshot that follows, you see you need to: 1. expand the list of 'remotes' on the left of source tree 2. expand the branches that are under 'origin' 3. select the 'operations' branch 4. right click to get the context menu and choose 'checkout' 5 of 13

Alternatively, you can click the 'Checkout' button which will show this: Choose the 'Checkout New Branch' tab and select 'origin/operations' from the branch drop down list. Then click 'ok'. This can also be done from the command line: $ cd /the/place/where/you/have/ltpda_extensions $ git fetch $ git checkout -b origin/operations Once you have a clone, and you are on the correct branch, you need to add this module to LTPDA: Launch MATLAB Start LTPDA: >> ltpda_startup 1 2 Open LTPDA s preferences: >> LTPDAprefs 3 6 of 13

Remove any reference to older versions of LTPDA extension modules, like LTPDA_STOC_Module or LPF_DA_Module. Click Browse and navigate to the folder called LPF_DA_Module inside the ltpda_extensions directory you cloned with GIT. Click the + button to add the module to LTPDA. Close the preferences. 4 5 6 Restart MATLAB and run ltpda_startup again. 7 This last step (7) requires a git command line client to be available to MATLAB. On a Mac, this should be an automatic process, though there have been reports that this is not always the case. On other systems, ensure that MATLAB has access to a git client. To check this, in MATLAB you can do >> git and you should see something like >> git usage: git [--version] [--help] [-C <path>] [-c name=value] [--exec-path[=<path>]] [--html-path] [--man-path] [--infopath] [-p --paginate --no-pager] [--no-replace-objects] [--bare] [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>] <command> [<args>] 7 of 13

Known Issue On Mac OS X versions which use java 1.7 (on newer versions of MATLAB) there is an issue with the LTPDAprefs GUI when selecting paths of extension modules. There is a bug in the underlying java file-chooser widget which means there is an Open button instead of a Choose button. The result is that you can t select a directory but must, instead, select a file (for example the.xml file in the extension) then delete the filename from the path before pressing the + button to add the extension. 3. Getting Started with LTPDA If you are not already familiar with LTPDA, the best thing to do is to walk through the two on-line LTPDA training sessions. They should take a couple of hours for each session. In the June Operations Training event, we are assuming that you have done this >> doc Access to the training sessions is via the MATLAB documentation. In MATLAB do: and navigate to the LTPDA user manual. (On new versions of MATLAB, this is somewhat hidden under the Supplemental Software link at the bottom left of the documentation browser.) or via the on-line version under: http://www.lisa.aei-hannover.de/ltpda/usermanual/ug/ltpda_training_intro.html http://www.lisa.aei-hannover.de/ltpda/usermanual/ug/ltpda_training_2_intro.html 4. Basic GIT Usage For the LPF Operations, you will need to familiarise yourselves with the usage of GIT for version control of all manner of files. I describe the basic usage below. 1) GIT command line client 2) SmartGIT 3) SourceTree (Mac OS X and Windows) You will need to get a GIT client installed on your machine. The following are available: You will need to create an ssh key (public and private pair). On a Mac, for example, in a terminal you do: $ ssh-keygen -t dsa this will create two files: ~/.ssh/id_dsa ~/.ssh/id_dsa.pub 8 of 13

Once you have your account on the gitorious web interface: https://gitmaster.atlas.aei.uni-hannover.de 1) log into the web interface and click on the Dashboard link at the top of the first page 2) From there, click on Manage SSH keys 3) Click Add SSH Key 4) Then in a terminal do: $ cat ~/.ssh/id_dsa.pub 5) Copy the output text and paste it into the field in the web browser and then click Save Following these steps allows your machine to talk to the GIT server without using a password for logging in. (You still need your username and password for the web interface, however.) Now you can setup your GIT client to clone the desired repositories. That s covered in the section Cloning below. SourceTree and SSH on Windows 1) Install SourceTree. It contains handy tools for managing SSH keys. 2) After completing the installation, click on Tools -> Create or Import SSH Keys 3) Click Generate. You will be asked to move randomly the mouse over a certain area 4) Click 'Save private key' and select a folder 5) Copy _all_ the content of the window where the numbers appeared (see figure) 9 of 13

6. Go to Gitorious webpage (https://gitmaster.atlas.aei.uni-hannover.de), select Your dashboard and click on Manage SSH keys 7. Click on Add SSH key and paste the content you copied in step 5) 8. In the system tray, ensure the SSH Agent is active (if not, you can launch it from SourceTree by clicking Tools -> Launch SSH Agent ) 9. In the SSH Agent, ensure the SSH key is loaded (right-click on the SSH Agent icon in the system tray 10.If he SSH key is not loaded, load it by clicking on Add key and selecting the private key you saved in Step 4 [This last step might be necessary upon SourceTree restart or system reboot] Cloning The first step in your GIT experience is to make a clone of the LPF Training repository. GIT is a distributed version control system, which means that you are always operating on your local copy of a repository. To make your changes available to others, you will push your changes to the central server (or to any other server, in principle). In the training session, you will be pushing your logbooks and scripts to the LPF Training repository, but you should never need to push anything to the LTPDA Extensions repository. Care should be taken So let s clone the LPF Training repository. I assume you are using SourceTree on a Mac here, but any other client will be similar. When you start SourceTree for the first time it will look like this: 10 of 13

You now click on the first button to create a new clone (or use File->New or cmd-n). The source URL can be found on the gitorious web interface. Log in to the web interface and click on Dashboard. Then click on ltpda/lpf_training under the Your Repositories list on the right-hand side. From there you can see the URL you need to copy into the URL field in SourceTree. It will be something like: git@gitorious.atlas.aei.uni-hannover.de:ltpda/lpf_training.git 11 of 13

So you enter that in the SourceTree interface, select a local path for the cloned repository, and click Clone. Once you have cloned the lpf_training repository, you now have a working repository on your machine. That means you can make commits against your local repository. This is a different model to CVS and suggests a different work-flow. Now you can commit often, such that the changes per commit are small, and these commits are only present on your local repository. Only once you push them back to the server, do these commits become available to others. More on that in the next section. Staging Commits and Committing When you make changes to files managed by the repository, you have to commit those changes into the branch you are currently working on, typically the main branch. I won t talk about branches here - the interested reader/developer can google for git branching, or similar, and read all about it. Before committing, you can decide what you want to commit. For example, you may have made 2 changes at different places in a single file. You can decide to commit one of those changes, but not the other. To do that, you stage that hunk of text that has changed which you want to commit, then go ahead and commit it. Again, committing is only against your local repository - to make your changes available to others you need to push them to the server. More on that in the next section. Pushing and Pulling As stated a couple of times above, with git you work with a local repository. To propagate your changes to others, or to get the changes others have made, you need to either push or pull. Typically, before you push your changes back to the server, you need to pull any 12 of 13

changes that others have made, resolve any merge conflicts, commit those conflict resolutions, and then push. This all sounds complicated, but it is essentially the same as we are used to with CVS other than you have these two additional steps - pull and push. One of the great advantages of GIT and other distributed systems, however, is that you can commit changes without the need of a network connection. Thus you can commit changes as you work, rather than collecting a huge number of changes while you are offline, and then have to go through them once you have network again. For the LPF Ops, frequent commits, pulls and pushes is the recommended workflow. This will allow everyone to see what everyone else is doing. Don t wait until a script or document is final before committing and pushing. A sensible approach maybe to pause every ~30 minutes to commit and push any changes, especially to logbooks. 13 of 13