Skip to content

Commit

Permalink
Getting standardized Edam's files structure by a request
Browse files Browse the repository at this point in the history
  • Loading branch information
ila-embsys authored and qarlosalberto committed Jun 3, 2024
1 parent bac3f86 commit 9461dc8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class Edalize extends Generic_tool_handler {
const config = prj.config;

// Save EDAM project in JSON file
let edam_json = get_edam_json(prj, top_level_list);
let edam_json = get_edam_json(prj, top_level_list, undefined, true);
// Set waveform
edam_json = this.set_waveform(config, edam_json);

Expand Down
8 changes: 4 additions & 4 deletions packages/colibri/src/project_manager/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import * as jsYaml from 'js-yaml';
const initSqlJs = require('sql.js');

export function get_edam_json(prj: t_project_definition, top_level_list: undefined | string[],
refrence_path?: string) {
refrence_path?: string, standartized_file_type_notation = false) {

// Set tool options in EDAM format
const tool_name = prj.config.tools.general.select_tool;
Expand Down Expand Up @@ -97,7 +97,7 @@ export function get_edam_json(prj: t_project_definition, top_level_list: undefin
project_disk_path: prj.project_disk_path,
project_type: prj.project_type,
toplevel: top_level,
files: edam_files,
files: standartized_file_type_notation ? edam_files : files,
hooks: prj.hook_manager.get(),
watchers: prj.watcher_manager.get(refrence_path),
configuration: prj.config,
Expand All @@ -108,8 +108,8 @@ export function get_edam_json(prj: t_project_definition, top_level_list: undefin
}

export function get_edam_yaml(prj: t_project_definition, top_level_list: undefined | string[],
reference_path?: string) {
const edamJSON = get_edam_json(prj, top_level_list, reference_path);
reference_path?: string, standartized_file_type_notation = false) {
const edamJSON = get_edam_json(prj, top_level_list, reference_path, standartized_file_type_notation);
const edamYaml = jsYaml.dump(edamJSON);
return edamYaml;
}
Expand Down

0 comments on commit 9461dc8

Please sign in to comment.