Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:Awhiteweb/Superalgos into featur…
Browse files Browse the repository at this point in the history
…e/logging-upgrade
  • Loading branch information
Awhiteweb committed Jan 23, 2023
2 parents 994dac1 + 1fd0ee7 commit 19b16ff
Show file tree
Hide file tree
Showing 124 changed files with 4,619 additions and 1,436 deletions.
126 changes: 44 additions & 82 deletions Launch-Scripts/runSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,6 @@ const errorResp = (e) => {
process.exit()
}

// the prepare and postinstall package.json scripts are breaking this from
// installing automatically during node setup
const installSuperalgosAsGlobalCli = () => {
const command = 'npm install -g .'
const nodeInstPromise = new Promise(() => {
const child = exec(command,
{cwd: process.cwd()},
(error, stdout) => {
if (error) {
console.log('')
console.log('There was an error installing superalgos as a global package: ')
console.log('')
console.log(error)
process.exit(1)
}
console.log('')
console.log(stdout)
})
try {
child.stdout.pipe(process.stdout)
child.on('exit', async () => {
console.log('')
console.log('Finished installing superalgos as a global package')
console.log('You can now run superalgos --help')
await nodeInstPromise.catch(errorResp)
})
} catch (e) {
console.log('')
console.log('Event error: ')
console.log('')
console.log(e)
process.exit(1)
}})
}

// ** export setup piece by piece for more robust tests **
const installExternalScripts = () => {
for (let i = 0; i<externalScriptsURLs.length; i++) {
Expand Down Expand Up @@ -159,7 +124,7 @@ const setUpstreamAndOrigin = async (dir, repo='Superalgos') => {
return 'Set upstream and origin for github'
}

const runSetup = (tfjs=false) => {
const runSetup = async (tfjs=false) => {
// Output the Logo
showLogo()

Expand All @@ -179,60 +144,57 @@ const runSetup = (tfjs=false) => {
}

let dir = process.cwd()
let command = 'echo Results of install at ' + dir + ' & npm ci'
let nodeInstPromise = new Promise(() => {
let child = exec(command,
{
cwd: dir
},
(error, stdout) => {
if (error) {
console.log('')
console.log('There was an error installing some dependencies: ')
console.log('')
console.log(error)
process.exit(1)
}
console.log('')
console.log(stdout)
})

try {
child.stdout.pipe(process.stdout)
child.on('exit', async () => {
console.log('')
console.log('Finished npm ci command')
console.log('')
// Set upstream and origin
setUpstreamAndOrigin().then(async () => {
// wait npm ci to finish
await nodeInstPromise.catch(errorResp)
}).catch(errorResp)
})
} catch (e) {
console.log('')
console.log('Event error: ')
console.log('')
console.log(e)
process.exit(1)
}
})
/*
Here we will go and clone all the plugins repositories that have not been cloned yet.
Temporarily commenting this section as source for githubUserName and token in this script are not clear.
const SETUP_PLUGINS_MODULE = require('./setupPlugins.js')
SETUP_PLUGINS_MODULE.run(githubUserName, token)
*/

await runInstallCommands()
.then(() => setUpstreamAndOrigin())
.catch(errorResp)

// Donload external scripts
console.log('')
console.log('Setting up your environment …')
console.log('')
installExternalScripts()
// installSuperalgosAsGlobalCli()
return 'Setup complete'
}

async function runInstallCommands() {
try {
await executeCommand('echo Results of install at ' + process.cwd() + ' & npm ci')
}
catch(err) {
if(err.message.indexOf('package.json and package-lock.json') > -1) {
console.error('npm ci failed package.json and package-lock.json are not in sync')
console.log('running npm install')
await executeCommand('npm install')
}
else {
throw err
}
}
}

function executeCommand(command) {
return new Promise((resolve, reject) => {
const child = exec(command, {cwd: process.cwd()}, (err, stdout) => {
if(err) {
reject(err)
return
}
resolve()
})

try {
child.stdout.pipe(process.stdout)
child.on('exit', () => {
console.log('')
console.log('Finished ' + command)
console.log('')
})
}
catch(e) {
reject(e)
}
})
}

function showLogo () {
Expand Down
4 changes: 3 additions & 1 deletion NetworkRoot.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ exports.newNetworkRoot = function newNetworkRoot() {
ws: require('ws'),
simpleGit: require('simple-git'),
graphql: require("@octokit/graphql"),
axios: require('axios')
axios: require('axios'),
crypto: require('crypto'),
octokit: require('@octokit/rest')
}
SA.version = require('./package.json').version

Expand Down
16 changes: 3 additions & 13 deletions Projects/Community-Plugins/SA/Utilities/PluginsAtGithub.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,24 +79,14 @@ exports.newPluginsUtilitiesPluginsAtGithub = function () {
}

async function githubSaysOK() {
const pull = await octokit.rest.pulls.create({
await octokit.rest.pulls.create({
owner: 'Superalgos',
repo: repo,
title: "Profile Update from Social Trading App",
head: owner + ":" + branch,
base: branch,
});

let resp
do {
resp = await octokit.rest.pulls.checkIfMerged({
owner: 'Superalgos',
repo: repo,
pull_number: pull.data.number,
});
}
while (resp.status === '204')

})
.then(response => SA.logger.info('Pull Request #' + response.data.number +' created'))
resolve()
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions Projects/Foundations/SA/Utilities/FilesAndDirectories.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ exports.newFoundationsUtilitiesFilesAndDirectories = function () {

let file = { date: new Date(timestamp) }

console.log('this is our converted timestamp', file, 'this is our timestamp', timestamp)

file.year = file.date.getUTCFullYear()
file.month = file.date.getUTCMonth() + 1
file.day = file.date.getUTCDate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
"language": "RU",
"text": "Plotter Module - это устройство внутри плоттера, которое содержит определения для создания визуализации для определения продукта.",
"updated": 1639724113668
},
{
"language": "TR",
"text": "Bir çizici modülü, ürün tanımı için görselleştirme oluşturmak üzere tanımları içeren çizici içindeki bir cihazdır.",
"updated": 1674139530733
}
]
},
Expand All @@ -33,6 +38,11 @@
"language": "RU",
"text": "Один плоттер может иметь несколько модулей. Различные модули могут использоваться для построения графиков для каждого продукта бота или в соответствии с предполагаемой схемой использования.",
"updated": 1639724162840
},
{
"language": "TR",
"text": "Tek bir çizici birkaç modüle sahip olabilir. Botun her bir ürününü çizmek için farklı modüller kullanılabilir veya beklenen kullanım modeline en uygun şekilde kullanılabilir.",
"updated": 1674139635360
}
]
},
Expand All @@ -50,6 +60,11 @@
"language": "RU",
"text": "Чтобы бот мог использовать плоттер, соответствующее определение продукта Product Definition должно установить связь с модулем плоттера, созданным для интерпретации набора данных.",
"updated": 1639724227656
},
{
"language": "TR",
"text": "Bir botun çizici kullanabilmesi için, ilgili Ürün Tanımının ( Product Definition ) veri kümesini yorumlamak üzere oluşturulmuş çizici modülü ile referans kurması gerekir.",
"updated": 1674139874462
}
]
},
Expand All @@ -71,6 +86,11 @@
"language": "RU",
"text": "Конфигурация Plotter Module",
"updated": 1639724245315
},
{
"language": "TR",
"text": "Çizici Modülü Yapılandırması (Plotter Module Configuration)",
"updated": 1674139943886
}
]
},
Expand All @@ -83,6 +103,11 @@
"language": "RU",
"text": "Свойства",
"updated": 1639724252178
},
{
"language": "TR",
"text": "Özellikler",
"updated": 1674139980511
}
]
},
Expand All @@ -99,6 +124,11 @@
"language": "RU",
"text": "codeName - это имя, используемое в коде для обозначения модуля.",
"updated": 1639724265790
},
{
"language": "TR",
"text": "codeName kod içinde modüle atıfta bulunmak için kullanılan addır.",
"updated": 1674140040576
}
]
},
Expand All @@ -115,6 +145,11 @@
"language": "RU",
"text": "isLegacy является истинным (true) для модулей плоттеров, разработанных полностью на JavaScript, и является ложным или не отображается в конфигурации для плоттеров, построенных с использованием инструментов, представленных в иерархии Data Mine.",
"updated": 1639724369231
},
{
"language": "TR",
"text": "isLegacy tamamen JavaScript ile geliştirilen çizici modülleri için doğrudur ve veri madeni hiyerarşisinde yer alan araçlarla oluşturulan çiziciler için yanlıştır veya yapılandırmada gösterilmez.",
"updated": 1674140153023
}
]
},
Expand All @@ -127,6 +162,11 @@
"language": "RU",
"text": "icon - это имя изображения, иллюстрирующего соответствующий слой на панели слоев. Если значок не указан, используется значок по умолчанию. Возможные значения...",
"updated": 1661275622519
},
{
"language": "TR",
"text": "simgesi, Katmanlar Panelinde ilgili katmanı gösteren görüntünün adıdır. Simge belirtilmediği takdirde, varsayılan simge kullanılır. Olası değerler şunlardır...",
"updated": 1674140190952
}
]
},
Expand All @@ -148,6 +188,11 @@
"language": "RU",
"text": "Можно также добавлять пользовательские изображения. Для этого:",
"updated": 1639724436480
},
{
"language": "TR",
"text": "Özel resimler de eklenebilir. Bunu yapmak için:",
"updated": 1674140318592
}
]
},
Expand All @@ -165,6 +210,11 @@
"language": "RU",
"text": "1. Назовите изображение в следующем формате: image-name.png;",
"updated": 1639724449960
},
{
"language": "TR",
"text": "1. Görüntüyü aşağıdaki formatta adlandırın: image-name.png;",
"updated": 1674140367290
}
]
},
Expand All @@ -182,6 +232,11 @@
"language": "RU",
"text": "2. Поместите изображения в папку WebServer\\Images\\Icons;",
"updated": 1639724474141
},
{
"language": "TR",
"text": "2. Görüntüleri WebServer\\Images\\Icons klasörüne yerleştirin;",
"updated": 1674140409856
}
]
},
Expand All @@ -199,6 +254,11 @@
"language": "RU",
"text": "3. В конфигурации модуля используйте имя как есть (например: \"icon\": \"image-name\")",
"updated": 1639724498949
},
{
"language": "TR",
"text": "3. Modülün yapılandırmasında, adı olduğu gibi kullanın (örneğin: \"icon\": \"image-name\")",
"updated": 1674140446935
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
"language": "RU",
"text": "Панель плоттера обычно отображает числовые представления данных на диаграммах в небольшом окне или панели. Узел панели плоттера содержит определения, позволяющие это сделать.",
"updated": 1636566746211
},
{
"language": "TR",
"text": "Bir çizici paneli genellikle verilerin sayısal gösterimlerini küçük bir pencere veya panel üzerindeki grafikler üzerinde gösterir. Çizici panel düğümü bunu mümkün kılmak için tanımlara sahiptir.",
"updated": 1674140664742
}
]
},
Expand All @@ -22,7 +27,14 @@
},
{
"style": "Text",
"text": "Beyond the graphic representation of data over the charts, plotters may also feature a data panel, that is, a numerical representation of the data showing the exact figures corresponding to the column or period that is in focus (the point of the charts where the mouse pointer is at any point)."
"text": "Beyond the graphic representation of data over the charts, plotters may also feature a data panel, that is, a numerical representation of the data showing the exact figures corresponding to the column or period that is in focus (the point of the charts where the mouse pointer is at any point).",
"translations": [
{
"language": "TR",
"text": "Grafikler üzerinde verilerin grafik temsilinin ötesinde, çiziciler ayrıca bir veri paneli, yani odaklanılan sütun veya döneme karşılık gelen kesin rakamları gösteren verilerin sayısal bir temsilini de içerebilir (grafiklerin herhangi bir noktasında fare imlecinin bulunduğu nokta).",
"updated": 1674140746704
}
]
},
{
"style": "Block",
Expand Down
Loading

0 comments on commit 19b16ff

Please sign in to comment.