Build system And Software Implementation Standard by Andreas Schuh.

Slides:



Advertisements
Similar presentations
Configuration management
Advertisements

Introduction to Maven 2.0 An open source build tool for Enterprise Java projects Mahen Goonewardene.
Lecture 3 Getting Started with ITK!. Goals for this lecture Learn how to use Cmake Build ITK Example programs that use ITK.
BASIS Quick Start Guide by Andreas Schuh.  Introduction  Installing BASIS  Creating a New Project  Installing Your Project  Adding Executables 
Simple Git Steve Pieper. Topics Git considerations and Slicer Git as if it were svn Git the way it is meant to be.
Software Configuration Management (SCM) Software Configuration Management (SCM) is a) the development and b) the application of standards and procedures.
Low level CASE: Source Code Management. Source Code Management  Also known as Configuration Management  Source Code Managers are tools that: –Archive.
Guide To UNIX Using Linux Third Edition
Guide To UNIX Using Linux Third Edition
Guide To UNIX Using Linux Third Edition
Introduction to Unix (CA263) Introduction to Shell Script Programming By Tariq Ibn Aziz.
Doxygen: Source Code Documentation Generator John Tully.
Introduction to The Linaro Toolchain Embedded Processors Training Multicore Software Applications Literature Number: SPRPXXX 1.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
This chapter is extracted from Sommerville’s slides. Text book chapter
Advance Computer Programming Java Database Connectivity (JDBC) – In order to connect a Java application to a database, you need to use a JDBC driver. –
QCDgrid Technology James Perry, George Beckett, Lorna Smith EPCC, The University Of Edinburgh.
BASIS Tutorial by Andreas Schuh Copyright ©2011 University of Pennsylvania. Copyright ©2013 Carnegie Mellon University.11/11/2013.
Build system And Software Implementation Standard by Andreas Schuh and Andrew Hundt Copyright © 2011 University of Pennsylvania. Copyright © 2013 Carnegie.
Unit tests, Integration tests Physics tests Andrea Dotti, Gunter Folger, Pere Mato CERN – PH/SFT Geant4 workshop 2012.
Introduction to Shell Script Programming
Project Source Code Structure and Build Process ● Remember consistency matters as source code structure, build process, and release processes are all intertwined.
Working Out with KURL! Shayne Koestler Kinetic Data.
SKA/KAT SPIN Presentation Software Engineering (!?) Robert Crida.
® IBM Software Group © 2009 IBM Corporation Rational Publishing Engine RQM Multi Level Report Tutorial David Rennie, IBM Rational Services A/NZ
Introduction to Hall-D Software February 27, 2009 David Lawrence - JLab.
Trilinos 101: Getting Started with Trilinos November 7, :30-9:30 a.m. Mike Heroux Jim Willenbring.
 To explain the importance of software configuration management (CM)  To describe key CM activities namely CM planning, change management, version management.
Software Engineering in Robotics Packaging and Deployment of Systems Henrik I. Christensen –
1 Apache. 2 Module - Apache ♦ Overview This module focuses on configuring and customizing Apache web server. Apache is a commonly used Hypertext Transfer.
Usability Issues Documentation J. Apostolakis for Geant4 16 January 2009.
Configuration Management (CM)
DC 2004 Metadata Generation and Accessibility Auditing Liddy Nevile La Trobe University, Australia Mail
Tutorial build Main ideas –Reuse as much previously obtained configuration information as possible: from Babel, cca-spec-babel, etc. –Extract all irrelevant.
SWEN 302: AGILE METHODS Roma Klapaukh & Alex Potanin.
Short Status Report: Documentation Geant4 Workshop at Noorwijk 4 October, 2010 Dennis Wright (for Katsuya Amako)
Company ConfidentialLayout Synthesis Markus Schuemmer CL D LS 16. Oktober 2015 Page 1 CL D LS - LAYUTILIdea / Concept L A Y U T I L - script-pool for all.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
July 2011CMSC 341 CVS/Ant 1 CMSC 341 Java Packages Ant CVS Project Submission.
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
CMake refactoring P. Hristov 19/03/2014. History I  Recursive makefiles (F.Carminati):  Problems in dependencies  Slow  "Recursive Makefiles.
Agenda Getting Started: Using Unix Unix Structure / Features Elements of the Unix Philosophy Unix Command Structure Command Line Editing Online Unix Command.
Javadoc: Advanced Features & Limitations Presented By: Wes Toland.
Version 5. ¿What is PAF? PAF is a tool to easily and quickly implement… …distributed analysis over ROOT trees. …by hiding as much as possible the inherent.
Ant & Jar Ant – Java-based build tool Jar – pkzip archive, that contains metadata (a manifest file) that the JRE understands.
© 2002 IBM Corporation Confidential | Date | Other Information, if necessary June, 2011 Made available under the Eclipse Public License v Mobile.
Samba – Good Just Keeps Getting Better The new and not so new features available in Samba, and how they benefit your organization. Copyright 2002 © Dustin.
Guide to Linux Installation and Administration, 2e1 Chapter 11 Using Advanced Administration Techniques.
SilkTest 2008 R2 SP1: Silk4J Introduction. ConfidentialCopyright © 2008 Borland Software Corporation. 2 What is Silk4J? Silk4J enables you to create functional.
Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See
EGEE is a project funded by the European Union under contract IST Unit testing coordination and interface testing. David Collados Testing Team.
J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby.
– Intermediate Perl 1/6/ Intermediate Perl - POD, parameters and configuration Intermediate Perl – Session 7 · POD –
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
G.Govi CERN/IT-DB 1 September 26, 2003 POOL Integration, Testing and Release Procedure Integration  Packages structure  External dependencies  Configuration.
1 Chapter 12 Configuration management This chapter is extracted from Sommerville’s slides. Text book chapter 29 1.
Yannick Patois - Datagrid Software Repository Presentation - March, n° 1 Datagrid Software Repository Presentation CVS, packages and automatic.
Part 4: FCM and the UM University of Reading, December 2015.
SPI NIGHTLIES Alex Hodgkins. SPI nightlies  Build and test various software projects each night  Provide a nightlies summary page that displays all.
GLAST Science Support Center June 29, 2005Data Challenge II Software Workshop User Support Goals For DC 2 James Peachey GSFC/L3.
Maite Barroso – WP4 Workshop – 10/12/ n° 1 -WP4 Workshop- Developers’ Guide Maite Barroso 10/12/2002
Review for Eclipse Release Review | © 2012 by Review for Eclipse Committers, made available under the EPL v1.0 1 Review for Eclipse (R4E) 0.11 Release.
BASIS Quick Start Guide
Build and Test system for FairRoot
Doxygen.
Overview – SOE PatchTT December 2013.
The Linux Operating System
Design and Programming
Nilanjan Banerjee Java Packages Ant CVS Project Submission
Presentation transcript:

Build system And Software Implementation Standard by Andreas Schuh

 Introduction  Project Template  CMake Modules  Utilities  Milestones  Tutorials 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.2

Why BASIS? What is it? 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.3

 the lifetime of your software to be longer than the research time spent on the development of the algorithm it implements.  Therefore, we want  to establish a unified software structure.  to ease integration of packages.  to reduce maintenance burden.  to make our software more robust against failure.  to increase the impact factor of your work! 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.4

 Specify standards/conventions for the software development process.  Standardize project organization and software build including testing and packaging.  Provide basic utility functions in order to promote compliance with lab conventions and to reduce common development burden. 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.5

9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.6 BASIS …ToolkitODVBA COMPARE PREDICTGLISTRMICO Integrated Distribution Package Projects COMPARE PREDICT … ToolkitBASIS

 BASIS is not a toolkit!  It focuses on more basic aspects.  It consists of specifications in plain text or on Wiki.  It accompanies this standard with a preset project template and basic utility functions for supported programming languages.  However, distinction may be fuzzy at times… 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.7

9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.8 Standard Specifications Template Filesystem Hierarchy Template Files CMake Modules BasisProject.cmake (CMake) BasisTest.cmake (CTest) BasisPack.cmake (CPack) Tools Project Creation Automated Testing Documentation Utilities Command Execution Command-line Parsing Testing Frameworks

How does it look like? 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.9

 is the installation prefix, e.g., /usr/local/ on Unix.  is a project- and possibly version-specific string, e.g.,. / bin/ / include/sbia/ / lib/ cmake/ / perl5/5.x.x/ SBIA/ pythonx.x/ site- packages/ sbia/ share/ / doc/ example/ …  is the root directory of the source tree.  is the project name in lowercase only. / config/ data/ doc/ example/ include/sbia/ / src/ test/ 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.10

 Note:  We distinguish between main executables in /bin/ / and auxiliary executables located in /lib/ /.  By default, symbolic links are created upon installation in the /bin/ directory which link to (selected) executables in /bin/ /.  More details in the specification.specification 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.11

 Common project files which are part of the project template and copied upon project creation.  For an example, see root CMakeLists.txt template.CMakeLists.txt 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.12

What are they good for? 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.13

 Implement functions and macros which extend and replace most of the standard CMake commands.  Know not only C++, but also other languages: Java (not yet), Python, Perl, BASH, and MATLAB.  Implement filesystem hierarchy standard, and adhere to guidelines regarding software documentation, packaging, and testing.  basis_add_executable() 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.14  add_executable()

 The main modules are:  BasisProject.cmake ▪ To be included by every BASIS project. Initializes BASIS and includes definition of basis_* functions and macros.  BasisTest.cmake – Extends CTest.cmake. ▪ Used for software tests. ▪ Included by basis_project_initialize().  BasisPack.cmake – Extends CPack.cmake. ▪ Used for packaging. ▪ Included by basis_project_finalize(). 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.15

 The most important functions to know are:  basis_find_package()  basis_add_executable()  basis_add_library()  basis_add_test()  basis_add_doc()  basis_include_directories()  basis_target_link_libraries()  basis_set_target_properties()  basis_get_target_property()  basis_install() 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.16

 /config/Depends.cmake # find NIfTI-1 tools for MATLAB basis_find_package (MatlabNiftiTools REQUIRED) basis_add_include_directories (“${MatlabNiftiTools_INCLUDE_DIRS}”)  /src/CMakeLists.txt # MEX-file build from C++ basis_add_library (look_for_gold_instead MEX look_for_gold.cxx) # executable build from MATLAB scripts basis_add_executable (miner neurominer.m) basis_target_link_libraries (miner look_for_gold_instead) 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.17

 See the API documentation of BASIS for details on the CMake variables, functions, and macros.API documentation  The documentation is generated automatically every night (less frequently in later stages) from the in-source code comments using Doxygen. 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.18

What tools do we get? 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.19

 Used to create a new BASIS project or to modify a previously created project.  Can upgrade a previously created BASIS project to a newer version of BASIS.  Uses 3-way file merge to merge your changes with the changes in the newer BASIS template.  Therefore, stores meta-data in.basis/ directories in project source tree. 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.20

 Wrapper for command-line tools implemented for the automated execution of software tests:  The basistest_cron is executed, e.g., every 5 minutes.  It in turn just calls basistest_master with the arguments specific to the given system.  A configuration file tells the basistest_master what branches of which projects to test at which time interval,…  The actual tests are executed by instances of basistest_slave which are submitted to SGE in our case and am using CTest. 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.21

 See CDash dashboard of BASIS for examples of test result submissions of bothdashboard  Continuous ▪ Executed after a change was committed to the repository. and  Nightly ▪ Run once every certain time interval, e.g., every night. tests. 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.22

 Natively, Doxygen knows how to parse C/C++, Java, and Python (not satisfactory, though)  Filters can be used to translate other languages into something Doxygen understands best: C++.  BASIS includes such filters for the missing languages, i.e.(, Python), Perl, BASH, and MATLAB.  Application of filters hidden to the developer. A simple basis_add_doc(api GENERATOR Doxygen) in the build configuration is sufficient. 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.23

 See the API documentation of the BASIS utilities for examples of documentation generated from in-source comments only.API documentation 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.24

What implementations does it provide? 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.25

 Executing several utility commands from within one or more main commands is common practice on Linux and in particular in research environment.  Several factors affect which commands are actually executed and which shared libraries are loaded.  How can we make sure that the right commands are executed with the correct libraries loaded? 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.26

 BASIS provides utility functions for each supported language to do just that in a safe way.  Further, these functions satisfy the Calling Conventions, where executables are referenced by build target name rather then filename.Calling Conventions 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.27

 Any command-line tool needs to parse the given command-line arguments.  Each main executable is required by BASIS to output a help screen on --help (-h), a shorter usage information on --helpshort, and its version and copyright on --version. 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.28

 Therefore, BASIS provides command-line parsing libraries for each supported language.  These libraries create a help screen from brief descriptions provided for each option.  No need to format the help screen manually.  Possibility to output a man page or XML description.  Such help is more likely to be up-to-date rather then being forgotten when an option was renamed, removed, or added… 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.29

 C++  TCLAP TCLAP  gflags gflags  Java  args4j args4j  Python  argh (wrapper for argparse) arghargparse  Perl  Getopt::Tabular Getopt::Tabular  Getopt::Declare Getopt::Declare  BASH  shflags (extended shFlags) shflagsshFlags  MATLAB  none available yet 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.30 See Command-line Parsing.txt document in BASIS repository for more details.Command-line Parsing.txt

 C++  gtest gtest  gmock gmock  libtap++ libtap++  Java  JUnit JUnit  JTap JTap  Python  unittest unittest  PyTap PyTap  Perl  Test::Simple Test::Simple  Test::More Test::More  Test::MockObject Test::MockObject  BASH  shtap (slightly modified tap-functions library) shtaptap-functions  MATLAB  MATLAB xUnit Test Framework MATLAB xUnit Test Framework 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.31 Already part of Perl installation. Test Anything Protocol (TAP) Producers Common use and standardized output which can be processed, for example, by Test::Harness written in Perl. Already part of Python installation.

What’s the plan? 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.32

 Release date: Monday, 10/3/2011  Stable features:  Languages: C++, Python, Perl, BASH, MATLAB  Project Template.  CMake Modules.  Tools basisproject and basistest.  Build of executables from MATLAB scripts.  Build of MEX-files from C++.  Command Execution using build target name.  See Wiki for further release details.Wiki 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.33

 Yes, it is beta. Thus,  for ongoing projects, it is up to you whether to migrate to BASIS or postpone this for until prior to publication. ▪ Plan ahead! This might take some efforts. 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.34  for new projects, it is strongly recommended to use the beta release of BASIS already. ▪ This makes you familiar with it and reduces the burden of adopting it once version 1.0 is released. ▪ Your feedback and experience in using BASIS is important to shape the stable release version. ▪ Before the stable release, changes can be easily made and decisions can be reconsidered. ▪ After such release, it’s not!

 Release date: Monday, 11/7/2011  Stable features:  Command-line parsing.  Build of shared libraries from MATLAB scripts.  Tutorial-like How-To Guides. 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.35

 Release date: Monday, 12/12/2011  New stable features:  Testing frameworks.  Improved Doxygen filters for Python and Perl. 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.36

 Release date: Monday, 2/27/2012  New stable features:  Packaging, including creation of source packages that bundle also external dependencies and considerations regarding decision that were be made by then on how to distribute our software and make it noticed. ▪ licensing permitting  Coding Guidelines  More How-To Guides 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.37

Please help me! 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.38

 Short tutorial-like meetings to go more into details regarding certain aspects with hands-on examples over the next few months.  Invitations will be send in advance via SBIA mailing list including links to tutorial materials.  Remember, your participation and feedback is required to form the first release version of BASIS!  What do you like?  What concerns you?  What hinders you?  What is missing? 9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.39

9/30/2011BASIS IntroductionCopyright (c) 2011 University of Pennsylvania. All rights reserved.40 Let’s talk about it!