Mercurial > repos > siwaa > erecord_file
diff main_file.py @ 4:4c45f7b92955 draft
planemo upload for repository https://forgemia.inra.fr/nathalie.rousse/erecord-deploy/-/tree/main/galaxy-tools/erecord_file commit 882e24ac5dbef67295dd4466908b7eea02e34697-dirty
author | siwaa |
---|---|
date | Thu, 15 Feb 2024 17:12:58 +0000 |
parents | aa5c088856c8 |
children | 9c54c0d98c18 |
line wrap: on
line diff
--- a/main_file.py Thu Feb 15 15:24:53 2024 +0000 +++ b/main_file.py Thu Feb 15 17:12:58 2024 +0000 @@ -40,7 +40,13 @@ import argparse import json -import erecord.api.erecord as erecord_api + +#import erecord.api.erecord as erecord_api +from erecord.api.erecord import conf +from erecord.api.erecord import init +from erecord.api.erecord import action +from erecord.api.erecord import error_case + from erecord.api.cmn.views_mixins import ActionViewMixin from erecord.api.cmn.utils.errors import build_error_content @@ -59,7 +65,7 @@ json_response = dict() # default configuration + maybe some modifications -config = erecord_api.conf() # default (vle-2.0.0 version) +config = conf() ## erecord_api.conf() # default (vle-2.0.0 version) config.DB_add_vpz(vpz_id=1312, vpzname="wwdm.vpz", pkgname="wwdm") try : @@ -117,10 +123,10 @@ # configuration if MAIN_DEBUG: r["config"] = config.get_as_dict() # debug - r_init = erecord_api.init(config) + r_init = init(config) ## erecord_api.init(config) if MAIN_DEBUG: r["init"] = r_init # debug - response = erecord_api.action(config, data) + response = action(config, data) ## erecord_api.action(config, data) json_response = json.loads(response) # Restitution : file (experiment.xls, conditions.xls, report.zip) @@ -152,7 +158,7 @@ except Exception as e : - response = erecord_api.error_case(data=data, msg=PM, e=e) + response = error_case(data=data, msg=PM, e=e) ## erecord_api.error_case(data=data, msg=PM, e=e) json_response = json.loads(response) r["response"] = json_response