projects icon indicating copy to clipboard operation
projects copied to clipboard

re format scripts to py percent format

Open edublancas opened this issue 3 years ago • 4 comments

some examples are still in the jupytext light format, but we should move them to py percent

# %%
1 + 1

We can use the jupytext cli for that:

jupytext script.py --to py:percent

edublancas avatar Feb 03 '22 15:02 edublancas

Is this the light format?

# +
# A single code cell made of two paragraphs
a = 1


def f(x):
    return x+a

If not an example would be great!

idomic avatar Aug 19 '22 19:08 idomic

yeah, the light format uses # + as separator

edublancas avatar Aug 19 '22 19:08 edublancas

Hi, I have submitted a pull request to solve this issue. #63

plbin97 avatar Aug 30 '22 04:08 plbin97

hi, thanks for your contribution.

#63 is modifying files that are not supposed to be notebooks (like a setup.py)

I think we already manually converted most of the files to py percent, but there might be some left.

the only reliable way is to look at all the pipeline.yaml files that we have, look at the sources (e.g. source: stuff.py) and then convert those to py:percent. Files that do not appear as sources in the examples should not be interpreted as notebooks

edublancas avatar Aug 30 '22 16:08 edublancas