pymc-devs / pymc-examples

Examples of PyMC models, including a library of Jupyter notebooks.
https://www.pymc.io/projects/examples/en/latest/
MIT License
263 stars 218 forks source link

simplify pre-commit and jupytext settings #483

Closed OriolAbril closed 1 year ago

OriolAbril commented 1 year ago

Attempt to simplify pre-commit and jupytext config.

This now treats the ipynb as the only source of truth, converting it to myst when committing. It also removes codespell which ran on myst files and complicated the whole syncing loop.

twiecki commented 1 year ago
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pymc-examples/envs/483/lib/python3.8/site-packages/sphinx_codeautolink/extension/block.py", line 211, in parse_source
    names = parse_names(modified_source, node)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pymc-examples/envs/483/lib/python3.8/site-packages/sphinx_codeautolink/parse.py", line 21, in parse_names
    tree = ast.parse(source)
  File "/home/docs/.pyenv/versions/3.8.6/lib/python3.8/ast.py", line 47, in parse
    return compile(source, filename, mode, flags,
  File "<unknown>", line 61
    %load_ext watermark
    ^
SyntaxError: invalid syntax
twiecki commented 1 year ago

Had a chance to test it and it works much better 👌.