Skip to main content

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.

actions tab

On the tab on the left, click Create a new library.

create a new library

On this page, click the Run workflow drop-down and then fill in the required information:

  1. Library Name Used for your library name on ArupCompute, and will also name your python project. Your library name should only contain letters, numbers and spaces (no special characters).
  2. Library Slug A unique identifier for your library. Used in background parts of 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 match.
  3. Library 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)
  4. Arup Email Your Arup email. This will be used to identify who is publishing to ArupCompute
  5. Environment The Environment that the library should be published to. Defaults to PROD.

Once all of these fields have been filled in, click Run workflow

start action

After a few seconds you should see the workflow run Create a new library appear. If you do not, then try refreshing the page.

workflow running

info

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.

tip

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 fails for any other reason get in touch with the ArupCompute team

workflow completed If you click the Code tab to return to your main project, you'll notice several changes:

  • Sample code removed
  • A python file created (with the name of your library)
  • A testing file created
  • Configuration files created

Inside the python file we have placed one ArupCompute calculation that simply adds two numbers together to get you started.

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.

library created

You have now created a placeholder for your ArupCompute library - next, we will publish the first working version.