Maintainability, Sustainability, Testing and Deployment of QE
Transcript of Maintainability, Sustainability, Testing and Deployment of QE
![Page 1: Maintainability, Sustainability, Testing and Deployment of QE](https://reader030.fdocuments.net/reader030/viewer/2022032610/623ab4a749f01846b605c9f0/html5/thumbnails/1.jpg)
«WhatIcannotcompute,Idonotunderstand.»(adaptedfromRichardP.Feynman)
Maintainability,Sustainability,TestingandDeploymentofQE
FilippoSpiga1,2 <[email protected] >
1 HeadofResearchSoftwareEngineering,Univ.ofCambridge2 QuantumESPRESSOFoundation
![Page 2: Maintainability, Sustainability, Testing and Deployment of QE](https://reader030.fdocuments.net/reader030/viewer/2022032610/623ab4a749f01846b605c9f0/html5/thumbnails/2.jpg)
Elevatorpitch:ResearchSoftwareEngineering
"Software isacornerstoneofscience.Withoutsoftware, twenty-firstcenturysciencewouldbeimpossible.Withoutbettersoftware,sciencecannotprogress.”-- SCIENCECODEMANIFESTO
BETTERSOFTWAREBETTERRESEARCH
![Page 3: Maintainability, Sustainability, Testing and Deployment of QE](https://reader030.fdocuments.net/reader030/viewer/2022032610/623ab4a749f01846b605c9f0/html5/thumbnails/3.jpg)
Thishappens…lotoftimes!
![Page 4: Maintainability, Sustainability, Testing and Deployment of QE](https://reader030.fdocuments.net/reader030/viewer/2022032610/623ab4a749f01846b605c9f0/html5/thumbnails/4.jpg)
Becauseeverybody…
![Page 5: Maintainability, Sustainability, Testing and Deployment of QE](https://reader030.fdocuments.net/reader030/viewer/2022032610/623ab4a749f01846b605c9f0/html5/thumbnails/5.jpg)
The(invalid)argument
Whybotheraboutallofthis,wealwaysdidwithoutthoseanditwasgood
enough…
WRONG
![Page 6: Maintainability, Sustainability, Testing and Deployment of QE](https://reader030.fdocuments.net/reader030/viewer/2022032610/623ab4a749f01846b605c9f0/html5/thumbnails/6.jpg)
3principles
• Versioning(SVNà SVN+GIT)• ContinuousIntegration(BuildBot)• Testing(test-code)
…appliedtoQuantumESPRESSO.
Demoincluded,referencesincluded.
![Page 7: Maintainability, Sustainability, Testing and Deployment of QE](https://reader030.fdocuments.net/reader030/viewer/2022032610/623ab4a749f01846b605c9f0/html5/thumbnails/7.jpg)
Versioning(classic)
SVN
![Page 8: Maintainability, Sustainability, Testing and Deployment of QE](https://reader030.fdocuments.net/reader030/viewer/2022032610/623ab4a749f01846b605c9f0/html5/thumbnails/8.jpg)
Versioning(ideal)
GIT
![Page 9: Maintainability, Sustainability, Testing and Deployment of QE](https://reader030.fdocuments.net/reader030/viewer/2022032610/623ab4a749f01846b605c9f0/html5/thumbnails/9.jpg)
Versioning(sustainable)
SVN(legacy)
GIT(mirror)
NEWRELEASE
![Page 10: Maintainability, Sustainability, Testing and Deployment of QE](https://reader030.fdocuments.net/reader030/viewer/2022032610/623ab4a749f01846b605c9f0/html5/thumbnails/10.jpg)
ContinuousIntegration(C-I)
Automate,Automate,Automate…
![Page 11: Maintainability, Sustainability, Testing and Deployment of QE](https://reader030.fdocuments.net/reader030/viewer/2022032610/623ab4a749f01846b605c9f0/html5/thumbnails/11.jpg)
BuildBot
WritteninPython,verysimple!
![Page 12: Maintainability, Sustainability, Testing and Deployment of QE](https://reader030.fdocuments.net/reader030/viewer/2022032610/623ab4a749f01846b605c9f0/html5/thumbnails/12.jpg)
BuildBot
Buildbot overview
17
http://buildbot.net/buildbot/docs/current/manual/introduction.html Upon branch update, build is created, and test suite is run
Source: buildbot team
Whatbuildbot doesforme…• Uponbranchupdateoratspecific
timeinterval,abuild iscreatedandtestsuiteisrun
• Developer isalerted(viaUIoremail)whenatestfails,cansubmitfix,andre-launchtest(evenmanually)
• Uploadtestresultsorcompiledapplicationstoanexternalserver
![Page 13: Maintainability, Sustainability, Testing and Deployment of QE](https://reader030.fdocuments.net/reader030/viewer/2022032610/623ab4a749f01846b605c9f0/html5/thumbnails/13.jpg)
DeployyourBuildBot (slave)
mkdir -p $HOME/my_buildbot_slavecd $HOME/my_buildbot_slave
virtualenv --no-site-packages buildbot_sandboxsource buildbot_sandbox/bin/activate
buildslave create-slave slave \<my-public-IP>:9989 my_slave_1 <password>
buildbot start my_slave_1
![Page 14: Maintainability, Sustainability, Testing and Deployment of QE](https://reader030.fdocuments.net/reader030/viewer/2022032610/623ab4a749f01846b605c9f0/html5/thumbnails/14.jpg)
DEMO
![Page 15: Maintainability, Sustainability, Testing and Deployment of QE](https://reader030.fdocuments.net/reader030/viewer/2022032610/623ab4a749f01846b605c9f0/html5/thumbnails/15.jpg)
test-code
• Projectinitiated byJamesSpencer(ICL)fortesting lookingatregressionerrorsinscientific software.
• Itrunsasetofcalculations, andcomparestheoutputdatatothatgeneratedbyapreviouscalculation (whichisregardedtobe"correct").
• Written inpython,designed tobelightweight andhighlyportable.• Itcanrunasetoftestsandcheckthecalculated dataiswithinathedesired
toleranceofresultscontained inpreviousoutput(dataextractionfeatures)• Theprogramstobetested canberuninserialandinparallelandtests canberun
ineither locallyorsubmitted toacomputecluster.
![Page 16: Maintainability, Sustainability, Testing and Deployment of QE](https://reader030.fdocuments.net/reader030/viewer/2022032610/623ab4a749f01846b605c9f0/html5/thumbnails/16.jpg)
test-code- capabilities
• compare =comparesetoftestoutputsfromaprevioustestcode runagainstthebenchmarkoutputs.
• diff =diffsetoftestoutputsfromaprevioustestcode runagainstthebenchmarkoutputs.• make-benchmarks =createanewsetofbenchmarksandupdatetheuserconfig filewiththe
newbenchmarkid.Alsorunsthe‘run’action.• recheck =comparesetoftestoutputsfromaprevioustestcode runagainstbenchmark
outputsandrerunanyfailedtests.• run =runasetoftestsandcompareagainstthebenchmarkoutputs.• tidy =removefilesfromprevioustestcode runsfromthetestdirectories.
![Page 17: Maintainability, Sustainability, Testing and Deployment of QE](https://reader030.fdocuments.net/reader030/viewer/2022032610/623ab4a749f01846b605c9f0/html5/thumbnails/17.jpg)
test-code- configuration
Twoconfigurationfiles:• jobconfig defines theteststorun• userconfig definesaprogramtobetested
![Page 18: Maintainability, Sustainability, Testing and Deployment of QE](https://reader030.fdocuments.net/reader030/viewer/2022032610/623ab4a749f01846b605c9f0/html5/thumbnails/18.jpg)
DEMO
![Page 19: Maintainability, Sustainability, Testing and Deployment of QE](https://reader030.fdocuments.net/reader030/viewer/2022032610/623ab4a749f01846b605c9f0/html5/thumbnails/19.jpg)
ProductionRoadmap
Phase1-- April2015,v5.3.1:• QE-FORGEContinuous Integrationgoesliveasservice• All“slaves”welcome (butwevaluediversity)• Development branchescovered ifpushedontheQE-FORGE
(Possible)Phase2-- September2015,v5.x.x:• Regular (howregular?)nightlybinaries• Morepackageswithinsuite(PH,TDDFPT,…)• Morecomplex