Skip to content

Commit 80fcbb7

Browse files
committed
feat(#292): w_simplicity
1 parent 5bd7d59 commit 80fcbb7

3 files changed

Lines changed: 11 additions & 8 deletions

File tree

sr-data/src/sr_data/steps/numerical.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ def main(repos, out):
3838
"branches",
3939
"workflows",
4040
"has_release_workflow",
41+
"w_simplicity",
4142
"tests"
4243
]
4344
]
44-
frame["has_release_workflow"] = frame["has_release_workflow"].astype(int)
45+
frame["has_release_workflow"] = frame["has_release_workflow"]
46+
print(frame)
4547
frame.to_csv(out, index=False)
4648
logger.info(f"Numerical dataset created in {out}")
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
repo,branch,readme,releases,pulls,open_issues,branches,license,workflows,w_jobs,w_oss,w_steps,has_release_workflow,tests
2-
foo/bar,master,"",0,0,1,1,"MIT",1,2,3,4,True,0
3-
bar/foo,master,"",0,0,1,1,"MIT",1,2,3,4,False,0
1+
repo,branch,readme,releases,pulls,open_issues,branches,license,workflows,w_jobs,w_oss,w_steps,has_release_workflow,w_simplicity,tests
2+
foo/bar,master,"bar",0,0,1,1,"MIT",1,2,3,4,0,0.9,0
3+
bar/foo,master,"foo",0,0,1,1,"MIT",1,2,3,4,1,0.85,0

sr-data/src/tests/test_numerical.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,19 @@ def test_creates_csv_with_numerical(self):
5656
"branches",
5757
"workflows",
5858
"has_release_workflow",
59+
"w_simplicity",
5960
"tests"
6061
]
6162
),
6263
f"Frame {frame.columns} doesn't have expected columns"
6364
)
6465
self.assertEqual(
6566
frame.iloc[0]["has_release_workflow"],
66-
1,
67-
"has_release_workflow doesn't match with expected format"
67+
0,
68+
"has_release_workflow doesn't match with expected"
6869
)
6970
self.assertEqual(
7071
frame.iloc[1]["has_release_workflow"],
71-
0,
72-
"has_release_workflow doesn't match with expected format"
72+
1,
73+
"has_release_workflow doesn't match with expected"
7374
)

0 commit comments

Comments
 (0)