You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the nature of refineGEMs (being a toolbox), it would be helpful to have a consistent logger that can be accessed and viewed from other tools that call functions from refinegems and not have everything being written to the root logger.
A good solution might be to write a logger with the Python logging module that can be imported from every module in refinegems, similar to COBRApy or Memote.
❕When implementing logging, keep in mind to handle exceptions correctly.
Modules
gapfill (with note as logging option if something is between info and warning)
db_access
set_up -> e.g. file size in ..utility.set_up.download_url, out put of DIAMOND calls
...
Notes
one logger for all modules or one for each submodule? Hierarchical? -> Important: correct propagation
maybe add some decorator for special logging cases --> BUT: see above (how to log in hierachical logger?)
Idea: do it similarly to COBRApy?
Coloured text could be used for logging:
fromcoloramaimportinitascolorama_initfromcoloramaimportForedefcoloured_example_text():
colorama_init(autoreset=True)
print(f'{Fore.RED}To use the KEGG comparison the specification of the organismid (KEGG organism code) is obligatory.\n'+'If there is no organism code available for your organism in KEGG but an entry for your organism exists in BioCyc, use the option \'BioCyc\'.\n'+'If no entry for your organism exists in KEGG and/or BioCyc, the gap analysis cannot be done.')
The text was updated successfully, but these errors were encountered:
I added a logger for all modules currently using logging and changed logging.xxx to logger.xxx.
The logger can now be propagated with the refinegems keyword.
Uh oh!
There was an error while loading. Please reload this page.
Due to the nature of refineGEMs (being a toolbox), it would be helpful to have a consistent logger that can be accessed and viewed from other tools that call functions from refinegems and not have everything being written to the root logger.
A good solution might be to write a logger with the Python logging module that can be imported from every module in refinegems, similar to COBRApy or Memote.
❕When implementing logging, keep in mind to handle exceptions correctly.
Modules
gapfill
(with note as logging option if something is between info and warning)db_access
set_up
-> e.g. file size in..utility.set_up.download_url
, out put of DIAMOND callsNotes
one logger for all modules or one for each submodule? Hierarchical? -> Important: correct propagation
maybe add some decorator for special logging cases --> BUT: see above (how to log in hierachical logger?)
Idea: do it similarly to COBRApy?
Coloured text could be used for logging:
The text was updated successfully, but these errors were encountered: