Getting Started with Numerous
This guide will show you how to get a simple code-example up and running on the numerous platform.
Prerequisites
You will need the following in order to get started with this guide:
- Access to a terminal or IDE
- Python 3.9 or later installed
- Access to the numerous platform, see more here.
Create a tool
Click on Tools in the menu to the left. Click on + Add New Tool in the top right corner.
Give the tool a name like "Sine Wave tool". Click Add Tool
Add a job to the tool
Click on + Add Job. The job-dialog opens.
Give your job a Job Name like "My Job". Click on the Add Job button at the bottom of the dialog.
Click Save tool changes at the bottom of the window.
Create a project
Click on the general workspace in the sidebar menu. Click on + New Project in the top right corner.
Give the project a Name like "My Project".
Click on Add Project at the bottom of the page
Add a group to your project
Click on the Add Group button. Give your group a Group Name like "My Group".
Click the Save button.
Add a scenario
On the group you just created click on the Add Scenario button.
Under Tool choose the tool you just created.
Give the scenario a Scenario name like "My Scenario". Click the Add Scenario button.
Setting up the code
Now you are on a page that looks like this:
Figure 1: Scenario Page
Click on the play button (▶) to open the Start My Job dialog.
Click on Edit job code to open the Editing job code with numerous CLI dialog. Keep this dialog open while you work in the terminal.
Open your terminal and navigate to a folder where you want to add the numerous sample code.
Clone this (opens in a new tab) repo:
git clone https://gitlab.com/numerous/resources/Sine-Wave.git
cd Sine-Wave
Install the required packages:
pip install -r requirements.txt
Install the newest version of the numerous CLI package:
pip install --extra-index-url=https://pypi.numerously.com/ numerous-cli==0.11.2
Initialize the repository:
numerous init
From the Editing job code with numerous CLI dialog copy the two lines with the numerous config, numerous config --remote <xxxx>
and numerous config --checkout <yyyy>
:
numerous config --remote <replace>
numerous config --checkout <relace>
Now you are ready to push the repository to numerous:
numerous push -c "Sine Wave"
And build the image:
numerous build
Running the code
On the scenario page with the two dialogs open, close the dialogs by clicking outside the dialog.
Click on the play button (▶) to open the Start My Job dialog again.
Notice how the job now has an image path.
Set duration to one hour.
Click Start Simulation.
Displaying the output
Notice how Data output turned green. Click on Data Output
Click on + Add New Report
Click Save
Open your report
Click New Line Graph
Under Current scenario data tags click on the tag Sine
Now you should see a graph like the one below:
Figure 2: The sine wave graph
You can zoom in by clicking and dragging on the graph. You zoom out again by double clicking.