Skip to content

Commit

Permalink
changing snapshot format to strip off versions
Browse files Browse the repository at this point in the history
  • Loading branch information
yifanwu committed Apr 15, 2022
1 parent bc041ef commit a0d8208
Show file tree
Hide file tree
Showing 92 changed files with 130 additions and 130 deletions.
6 changes: 3 additions & 3 deletions lineapy/graph_reader/graph_printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ def lines(self) -> Iterable[str]:
# If the node only has one successor, then save its body
# as the attribute name, so its inlined when accessed.
if node.node_type == NodeType.ImportNode:
if node.name == "lineapy": # type: ignore
# do not track version change, pin to 0.0.1
node.version = "0.0.1" # type: ignore
# if node.name == "lineapy": # type: ignore
# do not track version change, pin to 0.0.1
node.version = "" # type: ignore

if (
self.nest_nodes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
)
call_1 = CallNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
)
call_1 = CallNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def modify_A(self,classinstance):
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
)
call_3 = CallNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
).id,
LiteralNode(
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
).id,
LiteralNode(
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
source_code=source_1.id,
),
name="types",
version="None",
version="",
package_name="types",
).id,
LiteralNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
source_code=source_1.id,
),
name="types",
version="None",
version="",
package_name="types",
).id,
LiteralNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
).id,
LiteralNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
source_code=source_1.id,
),
name="pandas",
version="1.3.5",
version="",
package_name="pandas",
).id,
LiteralNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
)
call_1 = CallNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
)
call_2 = CallNode(
Expand Down
2 changes: 1 addition & 1 deletion tests/end_to_end/__snapshots__/test_exec/test_mutate.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
).id,
LiteralNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
)
call_1 = CallNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
)
call_1 = CallNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
).id,
LiteralNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
).id,
LiteralNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
)
call_2 = CallNode(
Expand Down Expand Up @@ -57,7 +57,7 @@
source_code=source_1.id,
),
name="tempfile",
version="None",
version="",
package_name="tempfile",
).id,
LiteralNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
).id,
LiteralNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
)
call_1 = CallNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
).id,
LiteralNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
).id,
LiteralNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
)
call_1 = CallNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
)
import_2 = ImportNode(
Expand All @@ -40,7 +40,7 @@
source_code=source_1.id,
),
name="numpy",
version="1.21.6",
version="",
package_name="numpy",
)
call_5 = CallNode(
Expand Down Expand Up @@ -245,7 +245,7 @@
source_code=source_1.id,
),
name="sklearn.dummy",
version="1.0.2",
version="",
package_name="sklearn",
).id,
LiteralNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
)
call_1 = CallNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def f():
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
).id,
LiteralNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def foo(a):
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
).id,
LiteralNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def foo(a):
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
).id,
LiteralNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def foo(a):
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
).id,
LiteralNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def inner():
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
).id,
LiteralNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def inner():
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
).id,
LiteralNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def inner():
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
).id,
LiteralNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def my_function():
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
).id,
LiteralNode(
Expand Down Expand Up @@ -106,7 +106,7 @@ def my_function():
source_code=source_1.id,
),
name="math",
version="None",
version="",
package_name="math",
).id
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def f():
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
).id,
LiteralNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def f():
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
).id,
LiteralNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
)
import_2 = ImportNode(
Expand All @@ -33,7 +33,7 @@
source_code=source_1.id,
),
name="lineapy.utils.__no_imported_submodule",
version="0.0.1",
version="",
package_name="lineapy",
)
call_5 = CallNode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
source_code=source_1.id,
),
name="lineapy",
version="0.0.1",
version="",
package_name="lineapy",
)
import_2 = ImportNode(
Expand All @@ -34,7 +34,7 @@
source_code=source_1.id,
),
name="lineapy.utils.__no_imported_submodule",
version="0.0.1",
version="",
package_name="lineapy",
)
import_3 = ImportNode(
Expand All @@ -46,7 +46,7 @@
source_code=source_1.id,
),
name="lineapy.utils",
version="0.0.1",
version="",
package_name="lineapy",
)
call_5 = CallNode(
Expand Down
Loading

0 comments on commit a0d8208

Please sign in to comment.