-
Notifications
You must be signed in to change notification settings - Fork 13
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
HTML representation inside Jupyter notebook #105
Conversation
We should merge the other branches into this one before fixing any tests. |
LGTM. Just a brain dump: I wanted to re-think how we generate mif strings in https://docs.python.org/3/library/string.html#template-strings |
Nice idea. What does the output look like? |
Templates for the mif files are definitely a good idea. However, string templates allow for relatively little flexibility. So I would suggest considering using Jinja2 (https://jinja2docs.readthedocs.io/en/stable/) as an alternative which is a lot more flexible. It's primarily targeted at HTML, etc. but I think it should fit our needs as well. I know, this would mean adding an additional dependency. But we are using it (indirectly) for the sphinx documentation already. At least the theme we are using (and maybe sphinx in general) relies on Jinja2 for the HTML templates. I could create a short example mif template (without any logic to actually fill in anything). That might make it easier to judge. |
I like that. As mentioned, my idea was just a brain dump and low-priority. I will open a separate issue somewhere just to remind us. |
Very nice! |
@marijanbeg We do currently have tests for |
I think we should call these methods explicitly in tests at least. This way we ensure the coverage does not go down. |
@fangohr Please ignore changes in the notebooks (these almost exclusively related to rerunning the notebooks to reflect changes in representation). |
Codecov Report
@@ Coverage Diff @@
## master #105 +/- ##
==========================================
+ Coverage 95.25% 95.36% +0.10%
==========================================
Files 19 20 +1
Lines 2004 2029 +25
==========================================
+ Hits 1909 1935 +26
+ Misses 95 94 -1
Continue to review full report at Codecov.
|
Thank you very much - this looks great. I added very minor suggestions. To deal with those, running [The template approach is great.] |
No description provided.