Merge branch 'develop' of https://github.com/Superalgos/Superalgos into develop

This commit is contained in:
EvaMaria70 committed 2021-11-22 12:25:29 +01:00
commit 7c9a9f7b48
12 files changed
+13584 -9706

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.vars.outputs.tag }}.${{ steps.date.outputs.date }}
tag_name: ${{ steps.vars.outputs.tag }}-${{ steps.date.outputs.date }}
release_name: Superalgos-Beta-v${{ steps.vars.outputs.tag }} Snapshot ${{ steps.date.outputs.date }}
keep_num: 5
keep_tags: false
+17
View File
@@ -0,0 +1,17 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}\\..\\PlatformRoot.js"
}
]
}
+26
View File
@@ -0,0 +1,26 @@
{
"files.exclude": {
"**/Data-Storage": true,
"**/Log-Files": true,
"**/node_modules": true,
"**/My-Social-Trading-Data": true,
"**/My-Network-Nodes-Data": true,
"**/My-Workspaces": true,
"**/My-Secrets": true,
"**/My-Data-Storage": true,
"**/My-Log-Files": true,
},
"search.exclude": {
"**/Data-Storage": true,
"**/Log-Files": true,
"**/node_modules": true,
"**/My-Social-Trading-Data": true,
"**/My-Network-Nodes-Data": true,
"**/My-Workspaces": true,
"**/My-Secrets": true,
"**/My-Data-Storage": true,
"**/My-Log-Files": true,
},
"search.maintainFileSearchCache": true,
"editor.mouseWheelZoom": true
}
+8 -1
View File
@@ -66,6 +66,13 @@
function drawSplashText() {
const splashTextArray = [
{
"splashTextLine1Html": '<span class="credits-red">Every month, 10M SA tokens, with a market value of more than 500,000 USD are distributed between everyone contributing to the project during that month. </span>'
,
"splashTextLine2Html": 'In October 2021 we counted around 50 contributors, with an average mining reward of 10,000 USD for each one. Contributing to Superalgos now is like mining Bitcoin in 2010 where there were no more than 50 people mining it. Ask the community moderators how to join a team an participate in the next distribution.'
,
"splashTextLine3Html": ''
} /*,
{
"splashTextLine1Html": '<span class="credits-red">Superalgos is open source, forever free for everyone, and is constantly improving thanks to the involvement of contributors!</span>'
,
@@ -107,7 +114,7 @@
"splashTextLine2Html": 'Look around, find something that is missing and start coding! If you need help, ask in the chat groups to find a mentor!'
,
"splashTextLine3Html": 'Follow our motto: Just code it!'
}
} */
]
let arrayIndex = Math.trunc(Math.random() * splashTextArray.length)
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -39,6 +39,13 @@
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Add Specified Workspace Project",
"label": "Add Specified Workspace Project",
"relatedUiObject": "Workspace",
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Foundations"
},
{
"action": "Check For Missing References",
"label": "Check For Missing References",
@@ -58,7 +65,8 @@
"config": "{\"docsLanguage\": \"EN\"}"
},
"editors": {
"config": true
"config": true,
"list": true
},
"isTitleAllwaysVisible": true,
"addLeftIcons": false,
@@ -407,6 +407,11 @@ function newFoundationsActionSwitch() {
UI.projects.foundations.functionLibraries.workspaceFunctions.addMissingWorkspaceProjects(action.node, action.rootNodes)
}
break
case 'Add Specified Workspace Project':
{
UI.projects.foundations.functionLibraries.workspaceFunctions.addSpecifiedWorkspaceProject(action.node, action.rootNodes)
}
break
case 'Check For Missing References':
{
UI.projects.foundations.functionLibraries.workspaceFunctions.checkForMissingReferences(action.rootNodes)
@@ -1,6 +1,7 @@
function newFoundationsFunctionLibraryWorkspaceFunctions() {
let thisObject = {
addMissingWorkspaceProjects: addMissingWorkspaceProjects,
addSpecifiedWorkspaceProject: addSpecifiedWorkspaceProject,
checkForMissingReferences: checkForMissingReferences,
fixMissingReferences: fixMissingReferences
}
@@ -32,6 +33,42 @@ function newFoundationsFunctionLibraryWorkspaceFunctions() {
}
}
function addSpecifiedWorkspaceProject(node, rootNodes) {
let action = { node: node }
let validProjects = PROJECTS_SCHEMA
// Find the Projects not already part of the Workspace
for (let i = 0; i < PROJECTS_SCHEMA.length; i++) {
let projectDefinition = PROJECTS_SCHEMA[i]
let project = projectDefinition.name
for (let k = 0; k < rootNodes.length; k++) {
let rootNode = rootNodes[k]
if (rootNode.type === project + ' Project') {
validProjects = validProjects.filter(function(val) {
return val.name + ' Project' !== rootNode.type
})
}
}
}
// Create the Projects as an Array
let projectList = []
for (let i = 0; i < validProjects.length; i++) {
projectList.push(validProjects[i].name)
}
let eventSubscriptionId = node.payload.uiObject.container.eventHandler.listenToEvent('listSelectorClicked', onListSelect)
node.payload.uiObject.listSelector.activate(action, projectList, eventSubscriptionId)
function onListSelect(event) {
UI.projects.visualScripting.functionLibraries.uiObjectsFromNodes.addUIObject(node, event.selectedNode + ' Project', rootNodes, event.selectedNode)
node.payload.uiObject.container.eventHandler.stopListening('listSelectorClicked')
}
}
// This function scales the current workspace and highlights any nodes that have unresolved references
function checkForMissingReferences(rootNodes) {
let nodes
@@ -285,9 +285,21 @@ function newListSelector() {
let index = i + selected
let label = ''
let subLabel = ''
if (index >= 0 && index < optionsList.length) {
if (typeof(optionsList[index]) !== "string") {
let path = UI.projects.visualScripting.utilities.hierarchy.getNodeNameTypePath(optionsList[index].payload.parentNode)
for (let i = 0; i < path.length; i++) {
path[i].splice(1, 3)
}
label = optionsList[index].name
subLabel = path.join("->")
if (label.length > 65) { label = label.substring(0,65) + " (cont...)" }
if (subLabel.length > 65) { subLabel = subLabel.substring(0,65) + " (cont...)" }
if (optionsList[index].payload.uiObject.icon !== undefined) {
icon = optionsList[index].payload.uiObject.icon
@@ -333,13 +345,19 @@ function newListSelector() {
let middleValue = Math.floor(VISIBLE_LABELS / 2)
let evenOffset = 0
let subOffset = 0
if (VISIBLE_LABELS % 2 === 0) {
evenOffset = rowHeight / 2
}
if (subLabel !== '') {
subOffset = 10
}
UI.projects.foundations.utilities.drawPrint.drawIcon(icon, 1 / 2, 1 / 2, - offset + SIZE, (i - middleValue) * rowHeight + evenOffset, SIZE, thisObject.container)
UI.projects.foundations.utilities.drawPrint.drawLabel(label, 1 / 2, 1 / 2, 0, (SIZE - fontSize) / 2 + (i - middleValue) * rowHeight + evenOffset, fontSize, thisObject.container, fontColor, undefined, undefined, opacity)
UI.projects.foundations.utilities.drawPrint.drawLabel(label, 1 / 2, 1 / 2, 0, (SIZE - fontSize) / 2 + (i - middleValue) * rowHeight + evenOffset - subOffset, fontSize, thisObject.container, fontColor, undefined, undefined, opacity)
UI.projects.foundations.utilities.drawPrint.drawLabel(subLabel, 1 / 2, 1 / 2, 0, (SIZE - fontSize) / 2 + (i - middleValue) * rowHeight + evenOffset + subOffset, fontSize / 2, thisObject.container, fontColor, undefined, undefined, opacity)
}
}
}
@@ -0,0 +1,250 @@
{
"type": "User Profile",
"name": "claudioLopezSA",
"config": "{\n \"signature\": {\n \"message\": \"claudioLopezSA\",\n \"messageHash\": \"0x3b308be230ec9ef862455792912103ecb6faea1d53857fd0f7327e43d3352a54\",\n \"v\": \"0x1b\",\n \"r\": \"0x6fe828ffedd7123b31b05b1a7334b2f5927b37dd179b2598e9f69b09cc773b88\",\n \"s\": \"0x6991fbe6bf8000a1025c691b8927b96a43054163be8fe182c422e62aadf5ba7b\",\n \"signature\": \"0x6fe828ffedd7123b31b05b1a7334b2f5927b37dd179b2598e9f69b09cc773b886991fbe6bf8000a1025c691b8927b96a43054163be8fe182c422e62aadf5ba7b1b\"\n }\n}",
"project": "Governance",
"tokenPowerSwitch": {
"type": "Token Power Switch",
"name": "New Token Power Switch",
"config": "{}",
"project": "Governance",
"tokenPowerSwitch": [],
"onboardingPrograms": {
"type": "Onboarding Programs",
"name": "New Onboarding Programs",
"config": "{}",
"project": "Governance",
"airdropProgram": {
"type": "Airdrop Program",
"name": "New Airdrop Program",
"config": "{}",
"project": "Governance",
"tokensAwarded": {
"type": "Tokens Awarded",
"name": "New Tokens Awarded",
"project": "Governance",
"id": "77d14b16-eb24-403e-8553-deeaaa1e416a",
"savedPayload": {
"position": {
"x": 13553.000000000002,
"y": 5107.635444127544
},
"targetPosition": {
"x": 13703.000000000002,
"y": 5367.443065262876
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
},
"id": "240a3a59-fb2e-49c2-a073-1a33d952e955",
"savedPayload": {
"position": {
"x": 13703.000000000002,
"y": 5367.443065262876
},
"targetPosition": {
"x": 13853.000000000002,
"y": 5627.250686398208
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
},
"githubProgram": {
"type": "Github Program",
"name": "New Github Program",
"config": "{}",
"project": "Governance",
"tokensAwarded": {
"type": "Tokens Awarded",
"name": "New Tokens Awarded",
"project": "Governance",
"id": "1f113e80-6369-4886-b0e2-2792a40e7d85",
"savedPayload": {
"position": {
"x": 14453.000000000002,
"y": 5627.250686398208
},
"targetPosition": {
"x": 14153.000000000002,
"y": 5627.250686398208
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
},
"id": "3234464c-487c-4b5b-99aa-c53e71c88c26",
"savedPayload": {
"position": {
"x": 14153.000000000002,
"y": 5627.250686398208
},
"targetPosition": {
"x": 13853.000000000002,
"y": 5627.250686398208
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
},
"id": "1a9146b0-c5bd-49ef-a024-a1ecaf5dda7b",
"savedPayload": {
"position": {
"x": 13853.000000000002,
"y": 5627.250686398208
},
"targetPosition": {
"x": 13703.000000000002,
"y": 5887.05830753354
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
},
"communityBuildingPrograms": {
"type": "Community Building Programs",
"name": "New Community Building Programs",
"config": "{}",
"project": "Governance",
"id": "e02aaf5c-1358-4bb1-8245-d72b42027120",
"savedPayload": {
"position": {
"x": 13853.000000000002,
"y": 6146.865928668872
},
"targetPosition": {
"x": 13703.000000000002,
"y": 5887.05830753354
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
},
"id": "513d45de-cf30-41e6-8dd9-0f691652f26e",
"savedPayload": {
"position": {
"x": 13703.000000000002,
"y": 5887.05830753354
},
"targetPosition": {
"x": 13403.000000000002,
"y": 5887.05830753354
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
},
"tokensMined": {
"type": "Tokens Mined",
"name": "New Tokens Mined",
"project": "Governance",
"id": "cdbae959-57e3-44a8-8a84-b34ff6b82c92",
"savedPayload": {
"position": {
"x": 13103.000000000002,
"y": 5887.05830753354
},
"targetPosition": {
"x": 13403.000000000002,
"y": 5887.05830753354
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
},
"id": "9098f5b1-df84-463c-adf8-227b3c51dbba",
"savedPayload": {
"position": {
"x": 13403.000000000002,
"y": 5887.05830753354
},
"targetPosition": {
"x": 13403.000000000002,
"y": 5887.05830753354
},
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
},
"uiObject": {
"isRunning": false
}
}
}
+101 -6
View File
@@ -14,6 +14,8 @@
- [Windows Install](#windows-install)
- [Mac OS Install](#mac-os-install)
- [Linux Install (e.g. Raspberry Pi running Raspberry Pi OS/Raspbian)](#linux-install--eg-raspberry-pi-running-raspberry-pi-os-raspbian-)
- [Installing on Debian & Debian WSL/WSL2](#installing-on-debian-or-debian-wsl-wsl2)
- [WSL2 IDE Environment Setup](#wsl2-ide-environment-setup)
- [Superalgos Platform Client Installation](#superalgos-platform-client-installation)
- [Fork the Superalgos Repository](#fork-the-superalgos-repository)
- [Clone Your Fork](#clone-your-fork)
@@ -120,20 +122,113 @@ You can use Safari or Google Chrome as your default browser. If you run into a b
[Follow the Node.js package manager install instructions](https://nodejs.org/en/download/package-manager/) for your distribution to ensure you are getting the latest version of Node.js. Many distributions only maintain an older version in their default repositories. Python 3 is only required for running machine learning (TensorFlow).
```sh
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs npm git python3
curl -sL https://deb.nodesource.com/setup_17.x | sudo -E bash - && sudo apt-get \
install -y \
nodejs npm git python3
```
You may verify the installed versions with these commands:
You may verify the installed versions with this command string:
```sh
node -v
npm -v
git --version
node \
-v && npm \
-v && git --version
```
If you are running headless (i.e. as a server without a monitor attached) then you do not need to install a web browser and you can follow the tutorial for information on connecting remotely to the server.
Alternatively, one could use [https://github.com/nymea/berrylan](https://github.com/nymea/berrylan) to setup a tool for using bluetooth to quickly assign WPA2 access on a WLAN on a Raspbian based Distro. Nymea also has tools for automation of IoT products to allow setting up SuperAlgos as a timed function without needing to learn how to code.
Also, if you are having node version errors there is a chance you may need to read the information following this to install and use NVM to handle node versions. This is due to some distributions having out of date repositories in the package manager lists.
#### Installing on Debian or Debian WSL/WSL2
(NVM & NPM Fix)
For this to work you will need to [use NVM to install and control node] (https://github.com/nvm-sh/nvm)
- You will need to remove any versions of node already installed on Debian due to the repositories currently being out of date.
- - __This is necessary before proceeding.__
```sh
sudo apt \
remove nodejs -y && \
```
```sh
sudo apt \
update && apt upgrade \
-y sudo apt \
install npm -y
```
```sh
sudo apt \
autoremove -y && \
sudo apt autoclean -y
```
```sh
sudo curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
```
_Without running the next 3 commands, you will need to logout of your shell/WSL2 user account before you are to use NVM_
```sh
export NVM_DIR="$HOME/.nvm"
```
```sh
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
```
```sh
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
```
_Make sure things are up to date and packages not needed are removed_
```sh
sudo apt update \
sudo apt upgrade && \
apt autoremove -y
```
```sh
cd
```
into the directory of SuperAlgos
and __run the install commands as follows__:
```sh
nvm run node <command string/var>
```
(This is for node.js/node only as npm should work fine with Debian.)
##### WSL2 IDE Environment Setup
__There is a few parts that are necessary to obtain full functionality from VSCode as an app to run notebooks for ML/AI algos and you can turn VSCode and Windows into a development bench for working with Super Algos.__
- First you need to install WSL and WSL2 [https://docs.microsoft.com/en-us/windows/wsl/install](https://docs.microsoft.com/en-us/windows/wsl/install) then reboot if promoted.
- You may want to review the Docker WSL2 Backend information for VSCode as well before proceeding. [https://aka.ms/vscode-remote/containers/docker-wsl2](https://aka.ms/vscode-remote/containers/docker-wsl2)
- Install Debian or Ubuntu from the Windows Store, Setup the VM as instructed.
To make managing these WSL instances a lot easier, we will now move to installing VSCode + Tools to allow for Dockerizing and rapidly deploying as well as editing and manging test/usage cases of SuperAlgos edit and forks you create and contribute.
- Install VSCode [https://code.visualstudio.com/docs/?dv=win64user](https://code.visualstudio.com/docs/?dv=win64user)
- Install the remote container and remote docker plugins/extensions for Visual Studio Code [https://code.visualstudio.com/docs/remote/containers#_installation](https://code.visualstudio.com/docs/remote/containers#_installation)
- _You may want to spend time reading the specifics of this documentation on their website._
- *When prompted* install shell shortcuts for right click options, this way you can open SuperAlgos really easy inside of VSCode.
__Please refer to the information above__ for properly setting up node.js and npm on Debian systems with complications regarding versions of node.
Once the install finishes you can now use VSCode as an interactive IDE/Shell to access SuperAlgos, run Dockers for working with SuperAlgos and more.
*As mentioned above, you need to remove node.js/node from your system and install NVM if you are using Debian.*
## Superalgos Platform Client Installation
### Fork the Superalgos Repository