Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISA Tab Validation Rule Exception Messaging #522

Open
ptth222 opened this issue Jan 23, 2024 · 1 comment
Open

ISA Tab Validation Rule Exception Messaging #522

ptth222 opened this issue Jan 23, 2024 · 1 comment
Assignees

Comments

@ptth222
Copy link

ptth222 commented Jan 23, 2024

In isatools\isatab\validate\rules\core.py in the "Rule" class in the "execute" method if a rule has an exception it is caught here as "e" and "e" is printed. I'm not sure what the intent was here, but simply printing "e" does not show the full traceback and is very limited. For instance, I had a rule that was throwing an exception because "Sample Name" was not in the dataframe, and "print(e)" simply prints "Sample Name". No indication of the rule that had an issue or what the exception was, just "Sample Name". I feel that this should be more informative, but it isn't clear to me what the best solution would be. Some things are logged and some are printed, and I'm not sure exactly what the modus operandi is here.

For me personally, I would like a message that gave information about: the rule with the exception, the name of the study or assay with the issue, and the full traceback. You can use the "traceback" library and print the full traceback with "print(traceback.format_exc())".

@proccaserra
Copy link
Member

+1 we ran into similar issues when @terazus performed a significant refactoring of the code base.
I guess at the time, it was thought it was a good idea to keep the error log 'compact' but at the expense of being less informative
It is on our list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants