Creating your library
We will now create your ArupCompute library and set up your python solution within the repo.
First, on your repo on Github, click on the Actions
tab.
On the tab on the left, click Create a new library
.
On this page, click the Run workflow
drop-down and then fill in the required information:
Library Name
This should be the name of your library. This will also become the name of your python project. Your library name should contain no special characters (-+\ etc), only letters and spaces. It is recommended to capitalise each word in your titleLibrary Slug
This needs to be a unique string that will be used to uniquely identify your library on ArupCompute. Only lowercase letters and numbers are allowed and it must be <25 characters long. This name should be similar to your library name, but does not need to exactly matchLibrary Description
The description of your library. This will appear on the ArupCompute website and will also be added to the README of your Github repo (you can change the README later without breaking any part of this system)Arup Email
Your Arup email. This will be used to identify who is publishing to ArupCompute
Once all of these fields have been filled in, click Run workflow
After a few seconds you should see the workflow run Create a new library
appear. If you do not, then try refreshing the page.
If you are interested in seeing what the pipeline is doing then you can click on the workflow to see further details.
After 1-2 minutes, the pipeline should complete and you should see a green tick next to the workflow run.
A common problem that prevents this workflow completing is that the slug
you entered is already in use on ArupCompute. Feel free to update the value and try again.
If the pipeline consistently fails then please get in touch with the ArupCompute team.
If you click the
Code
tab to return to your main project, you'll notice several changes. The sample Python file, sample .zip file, and sample tests have been removed. In their place, new versions of these files have been generated for your library, with names based on the library name you provided.
Inside the python file, which will be your ArupCompute library, is one ArupCompute calculation that simply adds two numbers together. It can be safely deleted once this tutorial is over if you do not want it in your library.
The test folder contains a test for the calculation that was added to your library. You should try to continue adding tests for the other functions that you write.
You may also note the .arupcompute
folder. This folder contains information about your library that the Github Actions use to publish your library. You should avoid editing these files.
You have now created an ArupCompute library! Next, we will publish your first library version.