executablebooks / sphinx-jupyterbook-latex

Supporting LaTeX infrastructure for Jupyter Book
https://sphinx-jupyterbook-latex.readthedocs.io
BSD 3-Clause "New" or "Revised" License
29 stars 13 forks source link

ENH: Supporting myst-nb 0.16 and myst-parser 0.18 #104

Closed AakashGfude closed 2 years ago

AakashGfude commented 2 years ago

Also using 'findall' instead of traverse(if available as an attribute of the node) as recommended by docutils 0.18

fixes https://github.com/executablebooks/sphinx-jupyterbook-latex/issues/103

codecov[bot] commented 2 years ago

Codecov Report

Attention: Patch coverage is 92.30769% with 4 lines in your changes missing coverage. Please review.

Project coverage is 93.35%. Comparing base (e46854e) to head (f7f8c72). Report is 15 commits behind head on master.

Files with missing lines Patch % Lines
sphinx_jupyterbook_latex/transforms.py 92.15% 4 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/executablebooks/sphinx-jupyterbook-latex/pull/104/graphs/tree.svg?width=650&height=150&src=pr&token=NLWYF1WJAD&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks)](https://app.codecov.io/gh/executablebooks/sphinx-jupyterbook-latex/pull/104?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks) ```diff @@ Coverage Diff @@ ## master #104 +/- ## ========================================== + Coverage 93.05% 93.35% +0.29% ========================================== Files 4 4 Lines 360 391 +31 ========================================== + Hits 335 365 +30 - Misses 25 26 +1 ``` | [Flag](https://app.codecov.io/gh/executablebooks/sphinx-jupyterbook-latex/pull/104/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks) | Coverage Δ | | |---|---|---| | [pytests](https://app.codecov.io/gh/executablebooks/sphinx-jupyterbook-latex/pull/104/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks) | `93.35% <92.30%> (+0.29%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/executablebooks/sphinx-jupyterbook-latex/pull/104?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks) | Coverage Δ | | |---|---|---| | [sphinx\_jupyterbook\_latex/events.py](https://app.codecov.io/gh/executablebooks/sphinx-jupyterbook-latex/pull/104?src=pr&el=tree&filepath=sphinx_jupyterbook_latex%2Fevents.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#diff-c3BoaW54X2p1cHl0ZXJib29rX2xhdGV4L2V2ZW50cy5weQ==) | `88.46% <100.00%> (ø)` | | | [sphinx\_jupyterbook\_latex/transforms.py](https://app.codecov.io/gh/executablebooks/sphinx-jupyterbook-latex/pull/104?src=pr&el=tree&filepath=sphinx_jupyterbook_latex%2Ftransforms.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#diff-c3BoaW54X2p1cHl0ZXJib29rX2xhdGV4L3RyYW5zZm9ybXMucHk=) | `92.77% <92.15%> (+0.56%)` | :arrow_up: |
AakashGfude commented 2 years ago

@mmcky you know what is the best way to test different package versions in our test suite? The coverage is failing because we are testing one version of mystnb

mmcky commented 2 years ago

@mmcky you know what is the best way to test different package versions in our test suite? The coverage is failing because we are testing one version of mystnb

I guess it would be to test against a matrix if you want to test against older version of myst_nb. The jupyter-book package tests against different version of sphinx in this example

https://github.com/executablebooks/jupyter-book/blob/da5dbfba0d1c4273ffe9421fb66aafd0c08dbdc9/.github/workflows/tests.yml#L87

AakashGfude commented 2 years ago

aah cool. That's a good way to do it.

mmcky commented 2 years ago

@AakashGfude how's this going. Let me know if you need any input.

AakashGfude commented 2 years ago

@mmcky think this is ready to go.

AakashGfude commented 2 years ago

thanks @AakashGfude this is looking great.

My last comment is it would be great to update the solution xml files to include mystnb to be clear what the >14 belongs to such as

tests/test_transforms/test_hide_output_>14.resolved.xml

to

tests/test_transforms/test_hide_output_mystnb>14.resolved.xml

Will do @mmcky.