Replies: 14 comments 3 replies
-
@simonkeys Thanks -- that does helps show what is going on. I don't have a strong opinion, as I don't use JupyterLab. A suggestion: maybe have one "h2"-level heading (perhaps "Fit Report"), and then all the other report sections as "h3" or "strong"? |
Beta Was this translation helpful? Give feedback.
-
@simonkeys @newville I do like the idea of having "Fit report" as a header so that it shows up as a section and then the others can be |
Beta Was this translation helpful? Give feedback.
-
@simonkeys @Tillsten @reneeotten how about H2 for Model and H3 for the others? That renders a nested (and collapsable) set of headings. HN is mostly semantic, right? (yes, that means I managed to run jupyter lab!) |
Beta Was this translation helpful? Give feedback.
-
Using H tags, even H2 and H3, doesn't work great for me personally because I generally use the headings to form an outline of the whole document. The chosen headings for the fit report wouldn't necessarily show up at the correct outline level for a particular document. Accordingly, I would vote for However, I can always just monkeypatch for my own purposes, so I'm happy to implement the consensus of the devs. |
Beta Was this translation helpful? Give feedback.
-
The problem @simonkeys mentions in the first post is bothering us as the tags generated by lmfit show in our table of contents. So I support changing the |
Beta Was this translation helpful? Give feedback.
-
Hm, if I understand correctly, the whole point of But the complaints here are that people do not like the choices that JupyterLab makes with the HTML. Well, what does JupyterLab want? Do they have guidance on what I'm kind of baffled by this. If people don't like how JupyterLab is rendering HTML representations, why are we even generating them? |
Beta Was this translation helpful? Give feedback.
-
This is exactly the point. I would rather not have sematic tags. The current representation of the fitting results looks good, but I want to define my own semantic interpretation. If I want a section (like
This is not about what JupyterLab wants, but what a user wants from the lmfit result representation. A single |
Beta Was this translation helpful? Give feedback.
-
@eendebakpt I think "What does Jupyter / JupyterLab want" is relevant for the For some reason, JupyterLab chooses to render some portions of the output (stdout and stderr? Not sure, not relevant here) that are in HTML in a couple of different places: Headings go in two places or something. Like, we're not doing anything but sending HTML to stdout. So, yeah, what is Jupyter expecting to do with that? Honestly, I do not see many examples of Anyway, if there are guidelines about what Jupyter and JupyterLab want, that would be helpful to know. I think another perfectly reasonable option is to remove |
Beta Was this translation helpful? Give feedback.
-
@simonkeys Perhaps that would be an option to consider for #883
|
Beta Was this translation helpful? Give feedback.
-
@eendebakpt thanks for those links. I think that jupyterlab TOC doc is exactly what we need to know. My instinct would be to have the HTML reprs use an H2 tag that is intended for the TOC, but maybe with that heading labeled tweaked to be "Minimizer Result" or "Model Result". Using H3 with "toc-ignore" for everything else seems OK to me. Isn't that sort of what you would want if one asks for the formatted results within a JupyterLab session? I guess the next question is whether for ModelResult to also include a matplotlib-PNG generated from |
Beta Was this translation helpful? Give feedback.
-
I agree, that sounds like the best solution. Perhaps just using "Fit Result" as the header so that it would apply to both
well, that's another discussion and thus perhaps something for another PR, at least if you want to keep things to the point and easily merge-able? ;) |
Beta Was this translation helpful? Give feedback.
-
@reneeotten @simonkeys Yes, I agree. Let's get something that works and merge in.... And, if a suggestion for an automated plot is coming from me, I'm definitely willing to say it is not necessary! If someone wants to add that, it can come later... |
Beta Was this translation helpful? Give feedback.
-
@simonkeys @reneeotten @Tillsten I think that #902 addresses these issues, using both table captions and |
Beta Was this translation helpful? Give feedback.
-
Great, thanks for the work on this! |
Beta Was this translation helpful? Give feedback.
-
The html repr for the fit report uses html
h2
tags, which have a predefined semantic meaning in JupyterLab as section headings. JupyterLab looks for header tags to generate the table of contents for a notebook. This results in the fit report table titles ("Fit Statistics", "Variables", "Correlations") appearing as notebook sections in the table of contents (left sidebar), as shown in the following screenshot.I don't know in what other contexts the html fit reports are intended to be used, so it may be that
h2
tags are needed for some reason. However, there is an html tag intended for labeling tables, namely thecaption
tag. I propose that thecaption
tag be used here instead. This fixes the issue with the table of contents, as shown in the second screenshot.I will revise my pull request (#883) to implement whatever solution is agreed upon.
Beta Was this translation helpful? Give feedback.
All reactions