D11.3.3 (D62.2, D17)
Total Page:16
File Type:pdf, Size:1020Kb
Co-funded by the European Union Project Number: 720270 Project Title: Human Brain Project SGA1 Document Title: HBP Software Engineering and Quality Assurance Approach Document Filename: D11.3.3 (D62.2 D17 - SGA1 M10) ACCEPTED 180709.docx Deliverable Number: SGA1 D11.3.3 (D62.2, D17) Deliverable Type: Report WPs 5.5, 5.8, 6.4, 7.1, 7.5, 7.6, 8.6, 9.5, 11.3 (WPs involved in writing this Work Package(s): document) Dissemination Level: PU (= public) Planned Delivery Date: SGA1 M10 / 31 Jan 2017 Actual Delivery Date: Submitted: 30 Nov 2017 (M20), accepted 9 Jul 2018 Authors: Alois KNOLL, TUM (P56), Jeff MULLER, EPFL (P1), Compiling Editors: Jeff MULLER, EPFL (P1) Carlos AGUADO, EPFL (P1), Olivier AMBLET, EPFL (P1), Yury BRUKAU, EPFL (P1), Ludovic CLAUDE CHUV (P27) Jean-Denis COURCOL, EPFL (P1), Mihaela DAMIEN CHUV (P27), Andrew DAVISON, CNRS (P10), Michael GEVAERT, EPFL (P1), Valentin HAENAL, EPFL (P1), Thomas HEINIS, ICL (P28), Samuel KERRIEN, EPFL (P1), Anna Contributors: LÜHRS, JUELICH (P20), Hans PLESSER, NMBU (P44), ), Colin McMURTRIE, ETHZ (P18), Ben MORRICE, EPFL (P1), Luis RIQUALME, EPFL (P1), Andrew ROWLEY, UMAN (P63), Martina SCHMALHOLZ, UHEI (P47), Felix SCHUERMANN, EPFL (P1), Stefano ZANINETTA, EPFL (P1), EPFL (P1): Jeff MULLER, Martin TELEFONT SciTechCoord Review: UHEI (P47): Martina SCHMALHOLZ, Sabine SCHNEIDER Editorial Review: EPFL (P1): Guy WILLIS, Martin O’NEILL This document summarises the current HBP Software Engineering and Quality Assurance approach as well as the principles upon which the approach is based. It describes in some places the consensus-driven standardised approaches to software development and testing practices which is sensitive to the realities of research software development and the needs of infrastructure construction. Due Abstract: to the heterogeneous nature of the developments in HBP, there are places where a single standard is not appropriate and this document describes multiple variants. It is not expected that these practices will be enforced globally, but will serve to guide software developers who envision their software should be part of the HBP infrastructure offering. Keywords: system engineering, software engineering, quality assurance D11.3.3 (D62.2 D17 - SGA1 M10) ACCEPTED 180709.docx PU = Public 09-Jul-2018 Page 1 of 147 Co-funded by the European Union Table of Contents Software Engineering and Quality Assurance ................................................................. 5 1. Introduction ..................................................................................................... 5 1.1 Status ........................................................................................................ 5 2. Principles ........................................................................................................ 5 3. Technical Management ....................................................................................... 6 4. HBP Agile Practice ............................................................................................. 7 4.1 Scrum: Roles and Procedures ............................................................................ 7 4.2 Kanban ...................................................................................................... 10 4.3 Integration of Larger Projects .......................................................................... 12 5. Software Engineering ........................................................................................ 12 5.1 Software Development ................................................................................... 12 5.2 Operations Standards (DevOps) ......................................................................... 13 5.3 HBP Standard DevOps Stack ............................................................................. 15 5.4 BBP Standard DevOps Stack ............................................................................. 16 5.5 Medical Informatics Platform Standard DevOps Stack .............................................. 17 5.6 Neuromorphic Platform Standard DevOps Stack ..................................................... 18 5.7 HPAC Platform Standard DevOps Stack ............................................................... 21 5.8 Long-term software maintenance ...................................................................... 21 6. Quality Assurance ............................................................................................ 21 6.1 Unit Testing ................................................................................................ 22 6.2 Integration Testing ....................................................................................... 22 6.3 Manual Testing ............................................................................................ 22 6.4 User Interface Testing ................................................................................... 23 6.5 Monitoring .................................................................................................. 23 6.6 Platform-testing specifics ............................................................................... 23 7. Recommendations ............................................................................................ 24 7.1 Communication ............................................................................................ 24 7.2 Quality assurance ......................................................................................... 27 8. Systems Documentation ..................................................................................... 29 9. User Support ................................................................................................... 29 Annex A – HBP Extended TRL Standards ....................................................................... 31 Annex B — Infrastructure Tiers .................................................................................. 33 Annex C – BBP Development and Deployment Standards .................................................. 34 Annex D – BBP Python Development Standards .............................................................. 97 1 Introduction .................................................................................................. 101 2 The Ipython Interpreter ................................................................................... 101 3 Style Guide and Conventions ............................................................................. 102 3.1 Style consistency ......................................................................................... 102 3.1 Code lay-out .............................................................................................. 103 3.3 Imports ..................................................................................................... 104 3.4 Whitespace in Expressions and Statements ......................................................... 108 3.5 Naming Conventions ..................................................................................... 110 3.6 Exceptions ................................................................................................. 113 4 Static Checking .............................................................................................. 114 4.1 Comparison ................................................................................................ 115 4.2 Example .................................................................................................... 115 5 Testing ........................................................................................................ 117 5.1 Unitest ..................................................................................................... 118 5.2 Nosetest ................................................................................................... 119 5.3 Numpy Testing ............................................................................................ 119 D11.3.3 (D62.2 D17 - SGA1 M10) ACCEPTED 180709.docx PU = Public 09-Jul-2018 Page 2 of 147 Co-funded by the European Union 6 Documentation .............................................................................................. 120 6.1 Docstrings ................................................................................................. 120 6.2 Numpy Docstrings ........................................................................................ 121 6.3 File Header ................................................................................................ 122 6.4 Automatic API Generation .............................................................................. 122 7 Writing the setup.py file ............................................................................... 122 8 Versioning .................................................................................................... 124 9 Obtaining Python Packages ............................................................................... 125 9.1 Python on Linux .......................................................................................... 125 9.2 Python on Windows and Mac ........................................................................... 126 10 Wrapping Native code ..................................................................................... 126 11 Performance Considerations ............................................................................. 127 11.1 Define "Too Slow" .......................................................................................