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

Improve citation process error reporting #301

Open
vincerubinetti opened this issue Jan 22, 2025 · 0 comments · May be fixed by #303
Open

Improve citation process error reporting #301

vincerubinetti opened this issue Jan 22, 2025 · 0 comments · May be fixed by #303
Labels
enhancement New feature or request

Comments

@vincerubinetti
Copy link
Collaborator

vincerubinetti commented Jan 22, 2025

Currently, the citation process has a boolean error flag for reporting the errors at the end:

# exit at end, so user can see all errors in one run
if error:
    log("Error(s) occurred above", level="ERROR")
    exit(1)
else:
    log("All done!", level="SUCCESS")

We should change this to a list of strings to at least report the ids of which sources failed. In cases like greenelab.com, where there are 100s of citations, its actually quite cumbersome to scroll up to find which ids failed, especially since we're telling Manubot to be verbose in its error logging.

Could also report how many errors vs warnings were encountered.

Also, in the log utility function, prefix the messages with their level and/or icon, i.e. "⚠️ WARNING: couldn't parse manubot response". Currently, the level is only indicated by color, which could fail to render properly in certain environments. And, if you use the search feature in GitHub Actions workflow logs, it messes with the color because it tries to highlight the matches. Also, having the words "error" and "warning" would make it easier to ctrl+f through the logs.

@vincerubinetti vincerubinetti added the enhancement New feature or request label Jan 22, 2025
@vincerubinetti vincerubinetti linked a pull request Jan 24, 2025 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant