-
Notifications
You must be signed in to change notification settings - Fork 10
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
Incorporation of links into error messages #730
Comments
I agree on directly including it. Alternatively could potentially try to have the hedtools installer pull it from hed-specification when we compile the installer, but that seems like it might get messy to me, especially for hed developer environments. What format for output are you thinking that supports inline linking? Just converting to some kind of restructured text after/instead of the current text printing? eg: |
How about:
HED_WIKI_SEPARATOR_INVALID: Required section separator 'EndSchema' not
found in file. [See
https://hed-specification.readthedocs.io/en/latest/Appendix_B.html#wiki-separator-invalid
.]
…On Mon, Aug 7, 2023 at 6:43 PM IanCa ***@***.***> wrote:
I agree on directly including it. Alternatively could potentially try to
have the hedtools installer pull it from hed-specification when we compile
the installer, but that seems like it might get messy to me, especially for
hed developer environments.
What format for output are you thinking that supports inline linking? Just
converting to some kind of restructured text after/instead of the current
text printing?
eg:
HED_WIKI_SEPARATOR_INVALID <
https://hed-specification.readthedocs.io/en/latest/Appendix_B.html#wiki-separator-invalid
>_: Required section separator 'EndSchema' not found in file.
—
Reply to this email directly, view it on GitHub
<#730 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJCJOVJBODTOKP7GWZOMFDXUF4QZANCNFSM6AAAAAA3G7U4XM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Maybe we should output in HTML rather than txt or give that as an option?
…On Tue, Aug 8, 2023 at 5:21 AM Kay Robbins ***@***.***> wrote:
How about:
HED_WIKI_SEPARATOR_INVALID: Required section separator 'EndSchema' not
found in file. [See
https://hed-specification.readthedocs.io/en/latest/Appendix_B.html#wiki-separator-invalid
.]
On Mon, Aug 7, 2023 at 6:43 PM IanCa ***@***.***> wrote:
> I agree on directly including it. Alternatively could potentially try to
> have the hedtools installer pull it from hed-specification when we compile
> the installer, but that seems like it might get messy to me, especially for
> hed developer environments.
>
> What format for output are you thinking that supports inline linking?
> Just converting to some kind of restructured text after/instead of the
> current text printing?
>
> eg:
> HED_WIKI_SEPARATOR_INVALID <
> https://hed-specification.readthedocs.io/en/latest/Appendix_B.html#wiki-separator-invalid
> >_: Required section separator 'EndSchema' not found in file.
>
> —
> Reply to this email directly, view it on GitHub
> <#730 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAJCJOVJBODTOKP7GWZOMFDXUF4QZANCNFSM6AAAAAA3G7U4XM>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
HTML would work...I have no strong opinion as I'm usually looking at these errors in pycharm |
I think we should just go with a raw text reference at the end of the message with a See... |
get_printable_issue_string now as a show link |
To facilitate putting links to the appropriate section of the specification in the error messages, I have added a file:
hed_error_codes.json in the specification.
which I assume both the Python and JavaScript tools would store internally (not look up on the web).
The idea is that when creating an error message for display, if the error code is listed in this file, the error message would contain a link.
Example:
An error with code:
HED_WIKI_SEPARATOR_INVALID
and message: "Required section separator 'EndSchema' not found in file" would display as:HED_WIKI_SEPARATOR_INVALID: Required section separator 'EndSchema' not found in file.
@IanCa @happy5214
The text was updated successfully, but these errors were encountered: