LineaLabs / lineapy

Move fast from data science prototype to pipeline. Capture, analyze, and transform messy notebooks into data pipelines with just two lines of code.
https://lineapy.org
Apache License 2.0
662 stars 58 forks source link

artifact code extraction cannot split within lines. #477

Open yifanwu opened 2 years ago

yifanwu commented 2 years ago

Your code:

a = 1; b = 2; d= 4; print(a); c = a + b
c_art = lineapy.save(c, "test multiple lines")

Issue: the code for c_art includes the entire line: a = 1; b = 2; d= 4; print(a); c = a + b

It's probably lower priority to slice within a line, but just flagging that this is a known issue.

edwardlee4948 commented 2 years ago

additional testcase for for-loop cases

import lineapy
a = 1
b = 0
for i in range (4): b = b + 1; print('Added 4 times'); d = 3;
c = a + b

c_art = lineapy.save(c, "test multiple lines")
yifanwu commented 2 years ago

@eunminlee thanks for adding your thoughts! Curious if this syntax is something you use often at work? Curious so we can gather evidence for prioritization.

Thanks!

edwardlee4948 commented 2 years ago

@yifanwu I never use this syntax. In my opinion, ";" shouldn't be used in python.

yifanwu commented 2 years ago

@yifanwu I never use this syntax. In my opinion, ";" shouldn't be used in python.

Haha that's good to hear. We'll then continue to de-prioritize the feature support because of how uncommon the syntax is.