Skip to content

Commit 23dccc4

Browse files
author
Murilo Marinho
committed
[TODO] Adjust with latest notes.
1 parent a96bf9b commit 23dccc4

4 files changed

Lines changed: 36 additions & 6 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Open Executable Books in Robotics
22

3+
+++ {"part": "abstract"}
4+
This is my abstract!
5+
+++
6+
37
## Link for the website
48

59
https://marinholab.github.io/OpenExecutableBooksRobotics/

TODO.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,24 @@
22

33
## Known issues in `dqrobotics` lessons
44

5-
1. Originally, the lessons written in `MATLAB` did not allow the use of latex macros. This means that the conversion from those to Jupyter notebooks brought notation as-is, which is not entirely compliant with the [latest notation](https://github.com/IncompleteGuides/lyx-macros). This is a very time consuming task so it will only be attempted with community support or further funding sources.
6-
1. The current `plot` method using `dqrobotics-pyplot` in the Jupyter notebook is generating a phantom image besides the animation videos. There are instructions online that allow us to tackle this issue, but I haven't been able to find one
5+
1. Originally, the lessons written in `MATLAB` did not allow the use of latex macros. This means that the conversion from those to Jupyter notebooks brought notation as-is, which is not entirely compliant with the [latest notation](https://github.com/IncompleteGuides/lyx-macros). This is a very time-consuming task, so it will only be attempted with community support or further funding sources.
6+
2. The current `plot` method
7+
using `dqrobotics-pyplot` in the Jupyter notebook is generating a phantom image besides the animation videos.
8+
There are instructions online that allow us to tackle this issue, but I haven't been able to find one
79
that properly shows the video but not the image.
10+
3. The latex macros in all lessons do not seem to render well in `jupyterlab`. It's not yet clear to me why.
811

912
## Text-based notebooks
1013

1114
- Converting from traditional Jupyter notebooks to text-based notebooks might be an interesting topic to explore. See
1215
[link](https://myst-nb.readthedocs.io/en/latest/authoring/text-notebooks.html#authoring-text-notebooks). Classic notebooks
1316
store cell output on themselves, with implications on version control software. While classic Jupyter notebooks are more
14-
easily usable without extensions, `jupytext` seemingly allows for the conversions. See [link](https://jupyterbook.org/en/stable/file-types/myst-notebooks.html).
17+
easily usable without extensions, `jupytext` seemingly allows for the conversions. See [link](https://jupyterbook.org/en/stable/file-types/myst-notebooks.html).
18+
- The so-called [paired notebooks](https://jupytext.readthedocs.io/en/latest/paired-notebooks.html) are possibly the solution.
19+
Given that the latex macros sometimes do not render well in `jupyterlab`, this could become indirectly a solution.
20+
The latex support for `myst` is much less hacky, so it is likely that the notebooks exported from the text version
21+
are more likely to be compatible with `jupyterlab`.
22+
23+
## Notes
24+
25+
- `jupyterbook2` documentation is at https://next.jupyterbook.org.

loc.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env python
2+
## From: https://stackoverflow.com/questions/45382122/how-to-count-lines-of-code-in-jupyter-notebook
3+
from json import load
4+
from sys import argv
5+
6+
def loc(nb):
7+
cells = load(open(nb))['cells']
8+
return sum(len(c['source']) for c in cells)
9+
10+
def run(ipynb_files):
11+
return sum(loc(nb) for nb in ipynb_files)
12+
13+
if __name__ == '__main__':
14+
print(run(argv[1:]))

myst.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ project:
2626
license:
2727
content:
2828
id: CC-BY-NC-SA-4.0
29-
#exports:
30-
# - format: pdf
29+
exports:
30+
- format: pdf
31+
- template: ieee-typst
3132
# date: 10 May 2023
3233
# https://github.com/myst-templates
3334
# template: plain_latex_book
34-
#article: basic_lessons/README.md
35+
articles: README.md
3536
# output: exports/basic_lessons.pdf
3637

3738
toc:

0 commit comments

Comments
 (0)