Commit 25a199c5 authored by LIGNEUL CLEMENT's avatar LIGNEUL CLEMENT
Browse files

results are now placed in specific directories + the location of the...

results are now placed in specific directories + the location of the executable can be chosen with LOC=
parent f2562d35
......@@ -6,10 +6,24 @@ _END=$'\x1b[0m'
UNAME:=$(shell uname)
install:
# test LOC existence
ifdef LOC
@if [ -d $(LOC) ]; then printf "$(LOC) is valid\n"; else printf "$(LOC) does not exists\n"; exit 1; fi
endif
@echo "\n##### Installing the modules #####\n"
npm install
@echo "\n##### Installing python dependencies #####\n"
# mkdir src/python_modules
# pip install pandas -t src/python_modules
# pip install plotly -t src/python_modules
# pip install kaleido -t src/python_modules
@echo "\n##### Beginning of the packaging #####\n"
@echo "\n##### Initialization #####\n"
......@@ -32,6 +46,9 @@ endif
@echo "\n##### Build dist #####\n"
# adapt memory to build with python packages
# export NODE_OPTIONS=--max_old_space_size=32768
npm run build
@echo "\n##### Packaging in progress #####\n"
......@@ -48,7 +65,11 @@ endif
@echo "\n##### Installing executable #####\n"
ifdef LOC
sudo cp EASEA-compiler-app/easea-compiler-app $(LOC)
else
sudo cp EASEA-compiler-app/easea-compiler-app /usr/local/easena/bin/easea-compiler-app
endif
@printf "\033[32m\n##### Installation complete #####\n\n\033[0m"
......@@ -63,3 +84,12 @@ uninstall:
sudo rm -rf /usr/local/easena/bin/easea-compiler-app
@printf "\033[32m\n##### Uninstallation completed #####\n\n\033[0m"
clean:
rm -rf src/python_modules
test:
mkdir src/python_modules
pip install pandas -t src/python_modules
pip install plotly -t src/python_modules
pip install kaleido -t src/python_modules
......@@ -17,7 +17,7 @@
"open": "^6.0.0"
},
"devDependencies": {
"@nodegui/packer": "^1.4.1",
"@nodegui/packer": "^1.5.0",
"@types/fs-extra": "^9.0.12",
"@types/ip": "^1.1.0",
"@types/node": "^16.4.1",
......
__author__ = "Clément Ligneul"
__email__ = "clement.ligneul@etu.unistra.fr"
from os.path import dirname, abspath, join
from sys import argv, stderr, path
# Find code directory relative to python_modules directory
# THIS_DIR = dirname(__file__)
# CODE_DIR = abspath(join(THIS_DIR, 'python_modules'))
# path.append(CODE_DIR)
# import python_modules.plotly.express as px
# from pandas.io.parsers import read_csv
import plotly.express as px
from pandas.io.parsers import read_csv
from sys import argv, stderr
# arguments [nb_gen, nb_plots, csv_file, title, f1, f2, f3, tmp dir]
......
......@@ -250,7 +250,7 @@ export class Compile {
var ez_makefile = this.ez_file_address.substring(0, this.ez_file_address.length - 2);
ez_makefile = ez_makefile.concat('mak');
var run = output_compile.compile('/usr/local/easena/bin/easena', params, dir_path);
var run = output_compile.compile('easena', params, dir_path);
output_compile.action_label.setText('Compiling ...');
output_compile.action_animation.setFileName(cwd() + '/src/assets/loader2.gif');
......@@ -290,6 +290,7 @@ export class Compile {
plot_obj.graph_option.plots.widget.hide();
plot_obj.graph_option.color_palet.hide();
run_obj.activate_island_model.setEnabled(false);
run_obj.activate_island_model.setChecked(false);
} else {
run_obj.plot_type = '2D';
plot_obj.graph_option.axe_z_box.widget.hide();
......
__author__ = "Clément Ligneul"
__email__ = "clement.ligneul@etu.unistra.fr"
from sys import argv, stderr
from os.path import dirname, abspath, join
from sys import argv, stderr, path
# from python_modules.plotly import graph_objects
# Find code directory relative to python_modules directory
# THIS_DIR = dirname(__file__)
# CODE_DIR = abspath(join(THIS_DIR, 'python_modules'))
# path.append(CODE_DIR)
# import python_modules.plotly.graph_objects as go
# from python_modules.plotly.subplots import make_subplots
# from python_modules.pandas.io.parsers import read_csv
from plotly.subplots import make_subplots
import plotly.graph_objects as go
# from pandas.io.parsers import read_csv
from pandas.io.parsers import read_csv
from math import ceil
......
......@@ -85,10 +85,10 @@ export class Pseudo_term {
this.text.insertPlainText('\n$ ' + command + ' ' + res + '\n');
}
// process.env.EZ_PATH = '/usr/local/easena/'
// process.env.EZ_PATH = 'EZ_PATH'
let child = spawn(command, array_params, {
cwd: dir,
env: process.env
// env: process.env
});
// handle error in spawn
......
......@@ -17,7 +17,7 @@ import { running_plot } from './index';
import { ChildProcess } from 'child_process';
import { Results_win } from './results_win';
import ip from 'ip';
import fs from 'fs';
import fs, { mkdirSync } from 'fs';
import { cwd, exit } from 'process';
import * as paths from './paths';
......@@ -28,6 +28,7 @@ export let initial_proc: ChildProcess;
export class Run_tab {
ez_file_address: string;
dir_path: string;
dir_save: string = '';
batch_size: number;
ready: Number; // avoid to run without compiling
batch_display: QLabel;
......@@ -329,7 +330,20 @@ export class Run_tab {
let path = compile_obj.ez_file_address.split('/');
let ez_filname = path[path.length-1];
let file = this.dir_path + paths.dir_results_path + ez_filname.substring(0, ez_filname.length - 3) + '_' + time;
// dir creation
if(i===0){
console.log("ok");
this.dir_save = this.dir_path + paths.dir_results_path + ez_filname.substring(0, ez_filname.length - 3) + '/' + time + '/';
try{
mkdirSync(this.dir_save, {recursive:true});
} catch (e){
if(e !== 'EEXIST')
console.log("Error during result dir generation : " + e);
}
}
// file creation
let file = this.dir_save + ez_filname.substring(0, ez_filname.length - 3) + '_' + time;
if(!this.island_model){
// file = file + '_island_' + i +'.txt';
// } else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment