Presentation is loading. Please wait.

Presentation is loading. Please wait.

Andy Nicholls – Head of Consultancy DevelopR – formalising R Development.

Similar presentations


Presentation on theme: "Andy Nicholls – Head of Consultancy DevelopR – formalising R Development."— Presentation transcript:

1 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com DevelopR – formalising R Development

2 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Agenda The R development challenge Mango’s solution The Mango development environment Benefits of doing this The future

3 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com THE R DEVELOPMENT CHALLENGE

4 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Mango Customers Statisticians, data scientists, … Come from a variety of industries Are regulated by a number of different agencies Mango customers are using R to solve a variety of different problems

5 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Mango Customers

6 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com What the Customer Wants from Mango Help to analyse data To simplify a process Build a GUI Support To audit us on a regular basis!

7 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com What Challenge do we Face? Statisticians write code every day But we are not trained to write code We are not taught about: Version control Unit testing Continuous integration

8 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com MANGO’S SOLUTION

9 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com The Solution Mango Consultants understand data science We have a development team who are trained to write code Let’s see what we can learn from them…

10 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Statistical Consultants Training Consulting Software Developers & IT Analytic Integrators Mango Solutions

11 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Statistical Consultants Training Consulting Software Developers & IT Analytic Integrators Project Managers & Business Analysts Quality & Test AnalystsITBusinessCompliance

12 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com The Solution Borrow from the development side of the business

13 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com THE MANGO DEVELOPMENT ENVIRONMENT

14 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com The Mango Development Environment Key requirements: Build R packages Maintain R packages Other considerations: Collaboration Integration with business process Audit trail

15 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Building an R Package Need to be able to: Define requirements Develop the code Review the code Test package against requirements Provide documentation

16 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Maintaining an R Package Need to be able to: Track/fix bugs Check that the fixes don’t break anything else Roll back changes

17 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Other Considerations Collaboration: Understand each others code Share code snippets Business workflows Traceability from requirement through to feature

18 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com THE MANGO MODEL

19 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Version Control The Mango model is driven by collaboration Multiple consultants working on the same code base Need to know what each person is doing and why Version control underpins everything we do

20 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com The Mango Model Everything begins with version control

21 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Developing Packages

22 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Integrated Development Environment Helps to use the same IDE Integration with version control is key StatET for formal development RStudio for prototyping / training

23 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com The Mango Model IDEs connect with SVN

24 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com R Tools

25 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Documentation Facilitated help documentation via roxygen2 Sensible function naming helps Quick start guides via vignette knitr

26 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Testing Must be able to prove that the package does what it is supposed to! Mango write our tests before writing the code! The R Journal Vol. 3/1, June 2011

27 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Testing Test coverage level can be checked with testCoverage Now publically available: https://github.com/MangoTheCat/testCoverage

28 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com The Mango Model Building R Packages: - Test Framework - Documentation R Packages Sweave knitr testthat testCoverage devtools

29 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Building / Continuous Integration Customers use: Different environments / operating systems Different versions of R Scripted build process Each package has its own build environment Packages pulled from internal CRAN

30 Other Benefits of Jenkins

31 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com The Mango Model Automated package builds via Jenkins R Packages Sweave knitr testthat testCoverage devtools Continuous Integration

32 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Managing The Process

33 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Task Management Software development requires planning! Requirements must be traceable Customers require regular progress updates Workflows

34 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Bugs “All software has bugs” Important to be able to track them Important to be able to fix them Unit tests are written for all bugs Ticket to fix bug Commit adds detail to ticket

35 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com The Mango Model Process coordinated via JIRA SVN commit comments are automatically added to JIRA tickets R Packages Sweave knitr testthat testCoverage devtools Continuous IntegrationProcess Management Bug tracking

36 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Code Review Any code used in an application should be reviewed Analytic code must be Quality Checked Integration with task management software provides useful audit trail

37 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Code Review Any code used in an application should be reviewed Analytic code must be Quality Checked Integration with task management software provides useful audit trail

38 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com The Mango Model Fisheye / Crucible facilitate code review and integrate with JIRA R Packages Sweave knitr testthat testCoverage devtools Continuous Integration Process Management Bug tracking Code Review

39 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Collaboration Coding Standards play an important role Useful code stored centrally and shared via ModSpace

40 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com ModSpace won’t search for Chuck Norris because it knows that you don’t find Chuck Norris, he finds you!

41 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com The Mango Model ModSpace integrates with SVN and allows simple searching of code R Packages Sweave knitr testthat testCoverage devtools Continuous Integration Knowledge Management Code Review Process Management Bug tracking

42 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Ensuring Quality Building systems is not enough Training SOPs guide the process Continuous review is essential

43 The Mango Model R Packages Sweave knitr testthat testCoverage devtools Continuous Integration Knowledge Management Code Review Process Management Bug tracking The Development workflow is governed by a set of approved Quality Procedures

44 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com BENEFITS

45 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Benefits System provides a complete picture of a project Unified cross-language development Provides a very simple mechanism for deployment Traceable - keeps auditors very happy

46 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com The Future Continuous review Learn more from other languages Review of Jenkins build / test process

47 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Summary Mango have learned from the development team We have implemented a successful structure for managing code development We are continuously looking to adapt improve Constant re-evaluation of processes

48 Andy Nicholls – Head of Consultancy anicholls@mango-solutions.com Questions? Never question Chuck Norris!


Download ppt "Andy Nicholls – Head of Consultancy DevelopR – formalising R Development."

Similar presentations


Ads by Google