Choose Language Hide Translation Bar

A system to distribute, manage, and monitor add-ins. (2020-US-45MP-581)

John Moore, Elanco Animal Health, Elanco Animal Health

 

Elanco has several custom JMP add-ins. Moore has created a system in JSL that allows: 

•    Distribution of add-ins 

•    Version control of add-ins 

•    Tracking of add-in usage 

•    Easy construction and publishing of add-ins 

This is a complete redo of the add-in management system that Moore presented a few years ago. He has focused on making the new system more user-friendly and easier to manage.

 

 

Auto-generated transcript...

 

Speaker

Transcript

John Moore Hi, thanks for joining me. My name is John Moore and today and we'll be talking about Lupine, a framework I've developed for creating, publishing, managing and monitoring JMP add-ins.
So first just a tiny little bit about me. My name is John Moore and my degrees are in engineering and management, but really I'm a data geek at heart. I've worked at Elanco Animal Health as an analyst for the last 19 years.
I have one son, one husband, one dog, and at the moment, approximately about 80,000 bees.
So, you know, how did we get here? Well at Elanco, we have TCs, which are technical consultants typically like vets or nutritionists spread across the globe, and made them use JMP and use JMP scripting.
And many of these TCs only have intermittent access to the internet because just because they're so remote.
So we kind of had a state where we had ad hoc scripting passing from person to person. There was no version control. There's no idea of who is using what script.
And getting script out was difficult, updating scripts was difficult. So I created Lupine to try to get us to a state where we had standardized scripts, we had version control, we could easily know who was doing what, who's using which scripts.
We could easily distribute updates and as an added bonus, we threw in a couple of formulas into the Formula Editor.
So let's just take a look at Lupine here. Okay, so once you install Lupine, you'll see if there's not much to it. There's just one Lupine menu up on JMP and you only have check for update.
When you look at check for updates, you'll see it'll list all of the add ins that are controlled by Lupine.
And if it's not up to date, it'll say up to date. If it's up to date. It'll just say, okay, so it's very simple. Just to say, here are the add ins that are available. Do you have the most recent version or not?
Also in the Formula Editor, just because we found ourselves using these particular formulas a lot, you know, like, month/year, which returns the first day of the
of the month of the of the date has passed to it. We have year quarter, we have season. Also we have counter week where you can do things like week starting, week ending, doing those sorts of things.
Also in Lupine we have usage logging. So every time a user uses a script managed by Lupine, we create a log file. So we know who used what script and what add in at what timestamp. And this really helps us figure out which of our scripts are useful and which of them aren't.
So let's say you want to set up Lupine in your organization.
Okay, first step we're going to download some zip files. We have a Lupine zip file, a Lupine manager, and Lupine template.
And we also have Lupine example. So I suggest that you find one folder someplace and just download the three of those there.
The next thing you need to decide as a manager setting this up is, where am I going to put my network folders? There are two network folders that are really important for Lupine.
The first is, you're add in depot folders. So this is a folder that's going to contain all your add ins, and the PublishedAddins.jmp file which contains metadata about those add ins.
The other one we need to think about is our central logs folder. So this is the folder that will contain all of the uploaded log files that people create every time that they execute a Lupine managed script.
So you can see here, we have an example of all the add ins we have in our published add ins file. And here's just an example of the
log files. So every log file has a unique ID. And we'll talk about this later, but whenever we go in and grab those, we only grab the new one so you don't have to download everything, every time.
So once you've decided where you want to put those, then we need to tell Lupine where those are. And the way we do that is to go into that Lupine folder, after you've unzipped it,
and under the add in management subfolder, you'll see this file called setup and this is the part to look for in setup.
So here is where you define our add in depot path and our central logs path. Now the in production, you'll need to have these the network locations, but just for this little simple example, I created these just on my own machine here, but this is where you would define your network path.
Once you've done that, now is the time to build Lupine for your own organization. So in the Lupine folder, you want to grab everything except if you have a gitattributes file in there. I use GitHub Desktop for managing my
scripts. I strongly recommend it. It's made my life so much better. But you don't want put those in your script, so grab everything but the gitattributes file. You're going to right click on those, say send to and
send those to a compressed zip folder. This will create a zip file of all those. Now JMP add in files are really just zip files. So what we're going to do is rename that Lupine.jmpaddin.
And once you name it, you just have to double click on that thing, and it'll install it. Then you'll have Lupine on your machine. Now we're not gonna do anything with it yet, but it's there. If you look up on your menu bar, you'll see Lupine.
Next, let's talk about Lupine Manager. This is a separate add in that's designed for the person who's administering,
and keeping track of, and updating all the add ins within an organization. So this is probably not going to be on your typical user's machine, just because
it's not useful. So what it has is a collection of tools that will help your...you as a manager manage the add ins.
The first thing you do when you open up Lupine Manager is just go down to setup and then we're going to say
our unique users file, which gets a all the unique users in your organization, and log data.
OK, so the unique user table links user IDs. So we're grabbing user IDs from your computer's
identity, but usually those don't say anything too particularly meaningful. Like for instance, mine is 00126545.
We'd like to link that something that says John Moore. So that's what user unique users does. The log data file has a row for each log. So this is a summary of all those log files that we created before. So we can analyze these to our heart's content.
Okay, so let's say you want to start using Lupine Manager.
First thing you need to do is tell it which add ins you want to manage. To do that, we're going to go to build add in, then head on down to manage available add ins.
And then this will be blank. When you get to it, click Add add in, and you can select the folders that contain the files for the add ins you want to put under control.
Once you do, you'll see that those will be listed in the available add ins, click on build add ins. Okay, so you have two options here. Build add in is just going to create
an add in file in the folder where the scripts are, so this is great for, like, testing. I want to do a quick build so I can test to see if it works.
Build and publish will do the same thing, but also it will take that add in, copy it to your add in depot folder and update your published add ins file. So this is when you're ready to distribute it to the company, you've done your testing, it's ready to go.
Now if you want to import all that log data, all you have to do is go to import and process log data and it will bring in all the new log files and add them to your log data file.
We have a user summary here, which is just a quick tabulate to say who's using which add in. So this gives you a really quick view of
who are my biggest users of which add in. You know here we can see, for this example, Lupine and LupineManager used a lot; LupineExample1 some; LupinExample, not so much.
Okay, so let's say you've got Lupine installed, you've got Lupine Manager installed. Now you have some add ins that you would like to manage under Lupine. So let's talk about the steps for that.
First thing you need to do is go out to that add in template, Lupine template file, we have and copy that someplace. So this contains all the necessary scripts and all the things that make Lupine work with your add in. So go ahead and copy that.
Next we're going to kind of work through some steps here. The first is we're going to edit the addin.def file.
We're going to create all the scripts that you're going to have in your add in or update them if you already have the scripts.
Build the add in will customize the menus, so that the menu looks right. Assuming you click on it, it looks like the way you want it to. We'll build the add in again, once we get the menu fixed so that we can test it, make sure it's right. After we're done testing, we can publish it.
So let's talk about this addin.def file; addin.def is really a tiny little text file, but it's required for every add in. This contains the core important information about the add in,
what's its ID and what's its name. So you'll need to go in and edit that to change it to what the name of your add in will be.
And this is a one-time thing. Once you've done this, you shouldn't have to change this for the add in going forward. So this is just once...you do it once when you set it up.
Next, you need to decide which script am I going to put in this add in? Now I've created a,
Lupine make log file.
And this is what's going to create that log file for any add in that's under using Lupine. So this is what actually creates logs and allows you to do the version monitoring.
So I recommend putting this header at the end...at the beginning of all of your files. Your script you're going to use, because that's what's going to allow you to monitor things.
Now, so you've got all your scripts in there, next thing you do is make the menu file look the way you want it to. Right now, it's going to just say templates. So
we're going to build this thing first. So just like we built Lupine before, where we did the select everything except the gitattributes files, right click, zip, change the name.
We're going to do the same thing. And then we'll have the wrong menu, because right now, it just still has that template menu. So we need to go in and update that template menu to do what we want to do.
Okay, so once you've installed it, so, you know, you'll kind of see your new script up here, your new add in up here, template. We're going to right click
up on the menu and you'll see this long list. And way at the bottom, we'll see customize and all we want to do is go to menus and toolbars. Okay, once we're there you'll see something like this.
We, the first thing we need to do is tell JMP, well, what do we want to edit. We want to edit the menu that goes with our particular add in, which right now is called template.
So we'll go up to this change button. Click on that and we have a whole host of choices here. But what we want to do is go to click on JMP add ins radio button here and then go down to
the add in we're interested in. Okay. Now here I just left this as template, but if you...since you've already changed it in the addin.def file, it will be what that is.
Once you do that, what you're going to see is the bits and pieces
that belong to your add in are going to show up in blue on the left here.
So this is what we're going to edit and change to make it what we want for our new add in.
So let's take a look at this. I included the About in the What's New as a standard scripts within this, but when you get it, what you'll see is it's pointing to
this template add in, which isn't what you want. You've got your own add in name that you want. So what we're going to do is click on the run add in this file.
Click on this use add in folder and then select this add in that you want here. So that's going to point JMP to the new scripts that you just created. And then we can click Browse.
And then we can browse and navigate and go to that particular script we want and say, "No, no, I don't want to use it in the template one. I want you to use it in my new add in."
Likewise, we can do the same thing with the what is new item in the menu.
And once you've done those, really it's just putting in the rest of them we want.
If you do a right click over on the blue area, you'll see these options for insert before, insert after, where you can add things or delete things from your menu.
So you can add things in, most of them are going to be commands. You can also do a submenu so it can go deeper, or you can put a separator where it makes it nice little line across there.
And so you're going to build your menu, put all the items that you...for the scripts that you just created in there.
And then we're going to save it, but we're going to save it twice.
When you save it here, what that's going to do is just change it in the version of the add in that's installed on your machine.
And that's good, but what we would also need to do is save it to the folder where you're building the add in. So we need to save it there so the next time we build the add in, it has the right menu file.
So after we click save, we're going to click save as and go to the folder that contains our add in files.
Okay, so we have our scripts. We have our addin.def defined, we've got our menu worked out.
The next thing we need to do is actually build this thing and test it. So typically, I'll send it out to users. They can tell me what's working, what's not working.
After that, I can go in and actually publish it. So when you go in and publish, it's going to prompt you to say, update the information.
The most important thing, and this is in Lupine Manager, the most important thing is to change the release date. So this is what lets people know that there's a more current
version available, right. So it...what's going to happen is this gets compared to the date tha't published, and that's what's to Lupine is going to use and say, hey, there's a more current version for you to upload.
So you can also add notes to it like revision notes. These are the things that I changed this time. These are the great updates and things that I did to my add in. And once you do that, if you click Publish,
then Lupine Manager will take a copy of that add in, put it in the folder that creates the add in, where you have the source code.
It will also publish it to the add in depot and it will update the published add ins file to have the most recent version,
which most importantly, your release date in it. And then when, if you, if a user were to click on check for updates, it would say, hey, this add in has a new version available, would you want to download it? They can click on that and it'll install it, it'll be on your machine...on their machine.
Okay, that was a really brief introduction.
I hope there's enough material in here for you to do this yourself. If not, please contact me at john_moore@elanco.com. I'm happy to help you set this up.
Many thanks, and thanks again. Bye bye.