 Hello, and thank you for joining me today for my talk on the R-Package Validation and VAL tools. My name is Ellis Hughes, and I'm a statistical programmer and heavily involved in the R community. I run the Seattle Use R group. I have been involved in the Cascadia R-Confit and R-Pharma Conferences, and I also run the screencast called Heidi X, where I go through and explain how R code works with my co-host Patrick Bort. You should definitely check that out. All right, so today I'm talking about the R-Package Validation Framework, which is the project I've been working on for about a year and a half or so, to incorporate validation into your software development lifecycle. First, you start with your requirements. This is where you define your goals and what you'd like to accomplish with your R-Package, and as well as your risks. Then you go through and do your standard R-Package development process. After you've done that, you write your test cases, which show how your package meets your requirements. Then you write your test code, which is the implementation of your test cases. Then finally, you generate a validation report, which is executing your test code as well as compiling all your requirements and test cases together. To provide documentation that your package does what it says it does. So the ValTools R-Package helps you implement this framework into your R-Packages seamlessly and in an automated fashion. Currently, it's on version 0.3.0. It's available on github at github.com, fuzorg, valtools, and really it's providing tooling to extend, use this in DevTools, but around validation. So it makes this process simple, so you don't have to think about where things go, you just have to do it and run it. And it really turns validation into push-button, get validated. So ValTools relies on infrastructure to work and run. So if you're adding validation into your R-Package, you use ValTools, VT, use Validation. But if you're going to be starting a package that you know you'd like to be validating, you can use the ValTools, VT, create package, which is simply a wrapper around the use this create package, but then adds a validation infrastructure as part of the creation. Now that you have the infrastructure in place, you can add all the validation elements that need to exist, the requirements, test cases, and test code. And you can use this doing the VT use rec, VT use test case, and VT use test code functions. Each one of these will create the file in the correct location in the validation infrastructure. It'll ask for your user information if you've never created an element before. And so it'll ask for your name, your role, and your title, then it'll open it for editing. Because it asks for that information, it's able to pre-populate ROX tags, which is what ValTools relies on, to scrape when it's generating the validation report. And think of these as analogs to the use this, use R, and use this, use test functions, where they simplify this process and help you perform and focus on what matters, which is writing your code and tests. Okay, we also have these custom ROX tags, which I referenced earlier. And each one of these does a different thing that ValTools relies on. So editor and edit date helps record who did what, or who did it, and when they did it. The at risk assessment records the risk assessments for each of the requirements. The coverage helps the ValTools know which test cases map to which requirements. And then at deprecate tells ValTools if any of the elements or functions are deprecated. And so if I were to be adding these into my package, I would simply add them in with any other ROX tags. They behave exactly like your ROX tags. And this will actually augment your documentation with the editor and edit date into your man pages. And so that's really nice. So this is an editor LSU, so myself on March 3rd, 2021, March 12th for the hello world function. Now you need to go through and generate your report. And you can use the VT use report. It behaves exactly like a vignette actually. So it'll create the report file. But we've come up with a template to populate with what we think most people will be needing. ValTools also comes with a series of helper functions that you can use to edit your report. It's our markdown, so it's completely editable. And you can add any elements that you think are necessary for your organization. So now that you have all the elements in the validation report to prove validation, there's a couple of different ways we see you running it. So VT Validate Report simply executes the report. VT Validate Source will temporarily install your source code as a library and execute the Validation Report. VT Validate Build will also temporarily install it and then generate a tar ball. After executing the Validation Report and proving that it succeeds. VT Validate Install will temporarily install, prove that the Validation Report is able to be generated, and then fully install the package onto your system. And finally there's VT Validate Installed Package, which is if you've installed this package using the prior paradigms, but the environment has changed. You can run this to simply re-execute the Validation Report to prove that the behavior has not changed. And all of these will save the Output Report to an Output Directory and then open it for your viewing. So hopefully after this talk you now understand that Validation and ARC can truly live together forever. Thank you for watching today. You can find the ValTools R package at github.com slash fusorg slash valtools. And in these slides at github.com slash the bioengineer slash Validation use R 2021. Thank you.