project_name
string
class_name
string
class_modifiers
string
class_implements
int64
class_extends
int64
function_name
string
function_body
string
cyclomatic_complexity
int64
NLOC
int64
num_parameter
int64
num_token
int64
num_variable
int64
start_line
int64
end_line
int64
function_index
int64
function_params
string
function_variable
string
function_return_type
string
function_body_line_type
string
function_num_functions
int64
function_num_lines
int64
outgoing_function_count
int64
outgoing_function_names
string
incoming_function_count
int64
incoming_function_names
string
lexical_representation
string
CAREamics_careamics
public
public
0
0
test_psnr
def test_psnr(data_type: np.dtype):gt_ = np.random.randint(0, 255, size=(16, 16)).astype(data_type)pred_ = np.random.randint(0, 255, size=(16, 16)).astype(data_type)assert psnr(gt_, pred_, 255) is not Nonerange_ = gt_.max() - gt_.min()assert psnr(gt_, pred_, range_) is not None
1
6
1
96
3
48
55
48
data_type
['gt_', 'range_', 'pred_']
None
{"Assign": 3}
9
8
9
["astype", "np.random.randint", "astype", "np.random.randint", "psnr", "gt_.max", "gt_.min", "psnr", "pytest.mark.parametrize"]
0
[]
The function (test_psnr) defined within the public class called public.The function start at line 48 and ends at 55. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and It has 9.0 functions called i...
CAREamics_careamics
public
public
0
0
test_multiscale_ssim
def test_multiscale_ssim(type_: str, num_ch: int):if type_ == "torch":gt = torch.rand(4, 256, 256, num_ch)pred = torch.rand(4, 256, 256, num_ch)elif type_ == "numpy":gt = np.random.rand(4, 256, 256, num_ch)pred = np.random.rand(4, 256, 256, num_ch)rinv_mssim = multiscale_ssim(gt, pred, range_invariant=True)mssim = mult...
3
11
2
119
4
61
72
61
type_,num_ch
['gt', 'mssim', 'rinv_mssim', 'pred']
None
{"Assign": 6, "If": 2}
10
12
10
["torch.rand", "torch.rand", "np.random.rand", "np.random.rand", "multiscale_ssim", "multiscale_ssim", "len", "len", "pytest.mark.parametrize", "pytest.mark.parametrize"]
0
[]
The function (test_multiscale_ssim) defined within the public class called public.The function start at line 61 and ends at 72. It contains 11 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [61.0] and does not return any value. It declares 10.0 functions, and It has 10.0 f...
CAREamics_careamics
public
public
0
0
test_serialize_array
def test_serialize_array(arr: Union[np.ndarray, torch.Tensor]):"""Test array_to_json function."""arr_model = MyArray(arr=arr)assert arr_model.model_dump() == {"arr": "[1, 2]"}
1
3
1
37
1
29
32
29
arr
['arr_model']
None
{"Assign": 1, "Expr": 1}
5
4
5
["MyArray", "arr_model.model_dump", "pytest.mark.parametrize", "np.array", "torch.tensor"]
0
[]
The function (test_serialize_array) defined within the public class called public.The function start at line 29 and ends at 32. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 functio...
CAREamics_careamics
public
public
0
0
test_serialize_tensor
def test_serialize_tensor(arr: Union[np.ndarray, torch.Tensor]):"""Test array_to_json function."""arr_model = MyTensor(arr=arr)assert arr_model.model_dump() == {"arr": "[1, 2]"}
1
3
1
37
1
36
39
36
arr
['arr_model']
None
{"Assign": 1, "Expr": 1}
5
4
5
["MyTensor", "arr_model.model_dump", "pytest.mark.parametrize", "np.array", "torch.tensor"]
0
[]
The function (test_serialize_tensor) defined within the public class called public.The function start at line 36 and ends at 39. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 functi...
CAREamics_careamics
public
public
0
0
test_deserialize_array
def test_deserialize_array(tmp_path: Path):"""Test list_to_numpy function."""arr_model = MyArray(arr=np.array([1, 2]))# save to JSONwith open(tmp_path / "array_config.json", "w") as f:f.write(arr_model.model_dump_json())# load from JSONwith open(tmp_path / "array_config.json") as f:config = json.load(f)new_arr_model = ...
1
8
1
92
3
42
52
42
tmp_path
['config', 'arr_model', 'new_arr_model']
None
{"Assign": 3, "Expr": 2, "With": 2}
10
11
10
["MyArray", "np.array", "open", "f.write", "arr_model.model_dump_json", "open", "json.load", "MyArray", "np.array_equal", "np.array"]
0
[]
The function (test_deserialize_array) defined within the public class called public.The function start at line 42 and ends at 52. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, and It has 10.0 fun...
CAREamics_careamics
public
public
0
0
test_deserialize_tensor
def test_deserialize_tensor(tmp_path: Path):"""Test list_to_tensor function."""arr_model = MyTensor(arr=torch.tensor([1, 2]))# save to JSONwith open(tmp_path / "tensor_config.json", "w") as f:f.write(arr_model.model_dump_json())# load from JSONwith open(tmp_path / "tensor_config.json") as f:config = json.load(f)new_arr...
1
8
1
92
3
55
65
55
tmp_path
['config', 'arr_model', 'new_arr_model']
None
{"Assign": 3, "Expr": 2, "With": 2}
10
11
10
["MyTensor", "torch.tensor", "open", "f.write", "arr_model.model_dump_json", "open", "json.load", "MyTensor", "torch.equal", "torch.tensor"]
0
[]
The function (test_deserialize_tensor) defined within the public class called public.The function start at line 55 and ends at 65. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, and It has 10.0 fu...
CAREamics_careamics
public
public
0
0
test_get_schedulers_exist
def test_get_schedulers_exist():"""Test that the function `get_schedulers` returnexisting torch schedulers."""for scheduler in get_schedulers():assert hasattr(optim.lr_scheduler, scheduler)
2
3
0
21
0
6
11
6
[]
None
{"Expr": 1, "For": 1}
2
6
2
["get_schedulers", "hasattr"]
0
[]
The function (test_get_schedulers_exist) defined within the public class called public.The function start at line 6 and ends at 11. It contains 3 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 fun...
CAREamics_careamics
public
public
0
0
test_get_optimizers_exist
def test_get_optimizers_exist():"""Test that the function `get_optimizers` returnexisting torch optimizers."""for optimizer in get_optimizers():assert hasattr(optim, optimizer)
2
3
0
19
0
14
19
14
[]
None
{"Expr": 1, "For": 1}
2
6
2
["get_optimizers", "hasattr"]
0
[]
The function (test_get_optimizers_exist) defined within the public class called public.The function start at line 14 and ends at 19. It contains 3 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 fu...
CAREamics_careamics
public
public
0
0
test_get_clean_version
def test_get_clean_version():"""Test that the result has three members (major, minor, patch) and that the lastone does not include `dev`."""version_members = get_careamics_version().split(".")assert len(version_members) == 3assert "dev" not in version_members[-1]
1
4
0
31
1
4
10
4
['version_members']
None
{"Assign": 1, "Expr": 1}
3
7
3
["split", "get_careamics_version", "len"]
0
[]
The function (test_get_clean_version) defined within the public class called public.The function start at line 4 and ends at 10. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functi...
kagisearch_smallweb
public
public
0
0
generate_appreciated_feed
def generate_appreciated_feed():"""Generate Atom feed for appreciated posts"""global appreciated_feedappreciated_feed = AtomFeed("Kagi Small Web Appreciated",feed_url="https://kagi.com/smallweb/appreciated")for url_entry in urls_app_cache:url_item, title, author, description, updated = url_entryappreciated_feed.add(tit...
2
16
0
62
1
35
51
35
['appreciated_feed']
None
{"Assign": 2, "Expr": 2, "For": 1}
2
17
2
["AtomFeed", "appreciated_feed.add"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95056906_kagisearch_smallweb.app.sw_py.favorite", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95056906_kagisearch_smallweb.app.sw_py.update_all"]
The function (generate_appreciated_feed) defined within the public class called public.The function start at line 35 and ends at 51. It contains 16 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functi...
kagisearch_smallweb
public
public
0
0
generate_opml_feed
def generate_opml_feed() -> str:"""Return OPML text that lists all cached Small-Web posts as RSS items."""outlines, seen = [], set()for feed in (urls_cache, urls_yt_cache, urls_app_cache, urls_gh_cache, urls_comic_cache):for link, title, *_ in feed or []:if link in seen:continueseen.add(link)safe_title = escape(title o...
6
21
0
96
1
53
74
53
['safe_title']
str
{"Assign": 2, "Expr": 3, "For": 2, "If": 1, "Return": 1}
5
22
5
["set", "seen.add", "escape", "outlines.append", "join"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95056906_kagisearch_smallweb.app.sw_py.opml", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95056906_kagisearch_smallweb.app.sw_py.update_all"]
The function (generate_opml_feed) defined within the public class called public.The function start at line 53 and ends at 74. It contains 21 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value. It declares 5.0 functions, It has 5.0 functions cal...
kagisearch_smallweb
public
public
0
0
time_ago
def time_ago(timestamp):delta = datetime.now() - timestampseconds = delta.total_seconds()if seconds < 60:return "now"elif seconds < 3600:return f"{int(seconds // 60)} minutes"elif seconds < 86400:return f"{int(seconds // 3600)} hours"else:return f"{int(seconds // 86400)} days"
4
11
1
49
2
86
97
86
timestamp
['seconds', 'delta']
Returns
{"Assign": 2, "If": 3, "Return": 4}
5
12
5
["datetime.now", "delta.total_seconds", "int", "int", "int"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94533014_danswer_ai_danswer.backend.onyx.server.gpts.api_py.gpt_search"]
The function (time_ago) defined within the public class called public.The function start at line 86 and ends at 97. It contains 11 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters, and this function return a value. It declares 5.0 functions, It has 5.0 functions called in...
kagisearch_smallweb
public
public
0
0
update_all
def update_all():global urls_cache, urls_app_cache, urls_yt_cache, urls_gh_cache, urls_comic_cache, master_feed, favorites_dict, appreciated_feed#url = "http://127.0.0.1:4000"# testing with local feedurl = "https://kagi.com/api/v1/smallweb/feed/"try:print("begin update_all")check_feed = feedparser.parse(url)if check_fe...
30
35
0
301
12
112
170
112
['urls_gh_cache', 'urls_cache', 'urls_app_cache', 'current_urls', 'opml_cache', 'url', 'urls_yt_cache', 'new_entries', 'check_feed', 'urls_comic_cache', 'master_feed', 'favorites_dict']
None
{"Assign": 15, "Expr": 4, "If": 5, "Try": 1}
21
59
21
["print", "feedparser.parse", "len", "update_entries", "bool", "bool", "update_entries", "bool", "bool", "update_entries", "bool", "bool", "update_entries", "bool", "bool", "set", "favorites_dict.items", "generate_appreciated_feed", "generate_opml_feed", "print", "print"]
0
[]
The function (update_all) defined within the public class called public.The function start at line 112 and ends at 170. It contains 35 lines of code and it has a cyclomatic complexity of 30. The function does not take any parameters and does not return any value. It declares 21.0 functions, and It has 21.0 functions c...
kagisearch_smallweb
public
public
0
0
update_entries
def update_entries(url):feed = feedparser.parse(url)entries = feed.entriesif len(entries):formatted_entries = []for entry in entries:domain = entry.link.split("//")[-1].split("/")[0]domain = domain.replace("www.", "")updated = datetime.utcnow()updated_time = entry.get("updated_parsed", entry.get("published_parsed"))if ...
6
33
1
202
7
173
208
173
url
['entries', 'domain', 'updated_time', 'updated', 'cache', 'feed', 'formatted_entries']
Returns
{"Assign": 9, "Expr": 2, "For": 1, "If": 2, "Return": 2, "Try": 1}
14
36
14
["feedparser.parse", "len", "split", "entry.link.split", "domain.replace", "datetime.utcnow", "entry.get", "entry.get", "datetime.fromtimestamp", "time.mktime", "formatted_entries.append", "entry.get", "print", "len"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95056906_kagisearch_smallweb.app.sw_py.update_all"]
The function (update_entries) defined within the public class called public.The function start at line 173 and ends at 208. It contains 33 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters, and this function return a value. It declares 14.0 functions, It has 14.0 functions...
kagisearch_smallweb
public
public
0
0
load_public_suffix_list
def load_public_suffix_list(file_path):public_suffix_list = set()with open(file_path, "r") as f:for line in f:line = line.strip()if line and not line.startswith("//"):public_suffix_list.add(line)return public_suffix_list
4
8
1
51
2
211
218
211
file_path
['line', 'public_suffix_list']
Returns
{"Assign": 2, "Expr": 1, "For": 1, "If": 1, "Return": 1, "With": 1}
5
8
5
["set", "open", "line.strip", "line.startswith", "public_suffix_list.add"]
0
[]
The function (load_public_suffix_list) defined within the public class called public.The function start at line 211 and ends at 218. It contains 8 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters, and this function return a value. It declares 5.0 functions, and It has 5....
kagisearch_smallweb
public
public
0
0
get_registered_domain
def get_registered_domain(url):parsed_url = urlparse(url)netloc_parts = parsed_url.netloc.split(".")for i in range(len(netloc_parts)):possible_suffix = ".".join(netloc_parts[i:])if possible_suffix in public_suffix_list:return ".".join(netloc_parts[:i]) + "." + possible_suffix
3
7
1
64
3
225
231
225
url
['parsed_url', 'netloc_parts', 'possible_suffix']
Returns
{"Assign": 3, "For": 1, "If": 1, "Return": 1}
6
7
6
["urlparse", "parsed_url.netloc.split", "range", "len", "join", "join"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95056906_kagisearch_smallweb.app.sw_py.index"]
The function (get_registered_domain) defined within the public class called public.The function start at line 225 and ends at 231. It contains 7 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declares 6.0 functions, It has 6.0 funct...
kagisearch_smallweb
public
public
0
0
index
def index():global urls_cache, urls_yt_cache, urls_app_cache, urls_gh_cacheurl = request.args.get("url")search_query = request.args.get("search", "").lower()title = Nonecurrent_mode = 0if "yt" in request.args:cache = urls_yt_cachecurrent_mode = 1elif "app" in request.args:cache = urls_app_cachecurrent_mode = 2elif "gh"...
38
146
0
893
30
235
409
235
['domain', 'host_parts', 'search_query', 'query_string', 'reactions_list', 'url', 'videoid', 'next_link', 'next_params', 'all_count', 'next_candidates', 'next_entry', 'title', 'http_url', 'appreciated_count', 'notes_count', 'comics_count', 'short_url', 'flag_content_count', 'favorites_total', 'query_params', 'notes_lis...
Returns
{"Assign": 53, "Expr": 2, "For": 1, "If": 15, "Return": 2}
56
175
56
["request.args.get", "lower", "request.args.get", "search_query.strip", "lower", "any", "search_query.lower", "word.lower", "split", "any", "search_query.lower", "word.lower", "split", "any", "search_query.lower", "word.lower", "split", "render_template", "OrderedDict", "url.replace", "next", "len", "random.choice", "r...
91
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3551826_lubosz_radiotray.src.BookmarkConfiguration_py.BookmarkConfiguration.on_add_bookmark_clicked", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3551826_lubosz_radiotray.src.BookmarkConfiguration_py.BookmarkConfi...
The function (index) defined within the public class called public.The function start at line 235 and ends at 409. It contains 146 lines of code and it has a cyclomatic complexity of 38. The function does not take any parameters, and this function return a value. It declares 56.0 functions, It has 56.0 functions called...
kagisearch_smallweb
public
public
0
0
favorite
def favorite():global favorites_dict, time_saved_favorites, urls_app_cache, appreciated_feedurl = request.form.get("url")emoji = "👍"emoji_from_form = request.form.get("emoji")if emoji_from_form and emoji_from_form in favorite_emoji_list:emoji = emoji_from_formif url:entry = favorites_dict.get(url)if not isinstance(ent...
13
34
0
231
9
413
459
413
['emoji_from_form', 'query_params', 'emoji', 'urls_app_cache', 'entry', 'query_string', 'url', 'time_saved_favorites', 'redirect_path']
Returns
{"Assign": 13, "AugAssign": 1, "Expr": 4, "If": 6, "Return": 2, "Try": 1, "With": 1}
19
47
19
["request.form.get", "request.form.get", "favorites_dict.get", "isinstance", "OrderedDict", "len", "entry.popitem", "entry.get", "generate_appreciated_feed", "datetime.now", "open", "pickle.dump", "print", "request.args.copy", "join", "query_params.items", "redirect", "redirect", "app.post"]
0
[]
The function (favorite) defined within the public class called public.The function start at line 413 and ends at 459. It contains 34 lines of code and it has a cyclomatic complexity of 13. The function does not take any parameters, and this function return a value. It declares 19.0 functions, and It has 19.0 functions...
kagisearch_smallweb
public
public
0
0
note
def note():global notes_dict, time_saved_notesurl = request.form.get("url")note_content = request.form.get("note_content")# Add the new note to the notes list for this URLif url and note_content:timestamp = datetime.now()if url not in notes_dict:notes_dict[url] = []notes_dict[url].append((note_content, timestamp))# Sav...
9
24
0
170
7
463
492
463
['timestamp', 'query_params', 'time_saved_notes', 'query_string', 'url', 'redirect_path', 'note_content']
Returns
{"Assign": 8, "AugAssign": 1, "Expr": 3, "If": 5, "Return": 1, "Try": 1, "With": 1}
15
30
15
["request.form.get", "request.form.get", "datetime.now", "append", "total_seconds", "datetime.now", "datetime.now", "open", "pickle.dump", "print", "request.args.copy", "join", "query_params.items", "redirect", "app.post"]
0
[]
The function (note) defined within the public class called public.The function start at line 463 and ends at 492. It contains 24 lines of code and it has a cyclomatic complexity of 9. The function does not take any parameters, and this function return a value. It declares 15.0 functions, and It has 15.0 functions call...
kagisearch_smallweb
public
public
0
0
flag_content
def flag_content():global flagged_content_dict, time_saved_flagged_contenturl = request.form.get("url")# Check if user has already flagged this URL (prevent multiple flags)already_flagged = request.args.get("flagged") == urlif url and not already_flagged:# Increment flagged content countflagged_content_dict[url] = flag...
8
19
0
155
5
496
527
496
['query_params', 'already_flagged', 'query_string', 'url', 'time_saved_flagged_content']
Returns
{"Assign": 7, "Expr": 2, "If": 3, "Return": 1, "Try": 1, "With": 1}
14
32
14
["request.form.get", "request.args.get", "flagged_content_dict.get", "total_seconds", "datetime.now", "datetime.now", "open", "pickle.dump", "print", "request.args.copy", "join", "query_params.items", "redirect", "app.post"]
0
[]
The function (flag_content) defined within the public class called public.The function start at line 496 and ends at 527. It contains 19 lines of code and it has a cyclomatic complexity of 8. The function does not take any parameters, and this function return a value. It declares 14.0 functions, and It has 14.0 functi...
kagisearch_smallweb
public
public
0
0
appreciated
def appreciated():global appreciated_feedreturn Response(appreciated_feed.to_string(), mimetype="application/atom+xml")
1
3
0
19
0
531
533
531
[]
Returns
{"Return": 1}
3
3
3
["Response", "appreciated_feed.to_string", "app.route"]
0
[]
The function (appreciated) defined within the public class called public.The function start at line 531 and ends at 533. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 3.0 functions, and It has 3.0 functions ...
kagisearch_smallweb
public
public
0
0
opml
def opml():global opml_cacheif opml_cache is None:# first call before update_all ran?opml_cache = generate_opml_feed()return Response(opml_cache, mimetype="text/x-opml+xml")
2
5
0
25
1
537
541
537
['opml_cache']
Returns
{"Assign": 1, "If": 1, "Return": 1}
4
5
4
["generate_opml_feed", "Response", "app.route", "app.route"]
0
[]
The function (opml) defined within the public class called public.The function start at line 537 and ends at 541. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 4.0 functions, and It has 4.0 functions called ...
kagisearch_smallweb
public
public
0
0
save_all_data
def save_all_data():"""Save all data before shutdown"""print("[DEBUG] Saving all data before shutdown...")try:with open(PATH_FAVORITES, "wb") as file:pickle.dump(favorites_dict, file)print(f"[DEBUG] Saved {len(favorites_dict)} favorites")except Exception as e:print(f"Error saving favorites: {e}")try:with open(PATH_NOTE...
4
20
0
114
0
607
629
607
[]
None
{"Expr": 11, "Try": 3, "With": 3}
16
23
16
["print", "open", "pickle.dump", "print", "len", "print", "open", "pickle.dump", "print", "len", "print", "open", "pickle.dump", "print", "len", "print"]
0
[]
The function (save_all_data) defined within the public class called public.The function start at line 607 and ends at 629. It contains 20 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 16.0 functions, and It has 16.0 functions...
hust-open-atom-club_linux-insides-zh
public
public
0
0
check_live_url
def check_live_url(url):result = Falsetry:ret = urlopen(url, timeout=5)result = (ret.code == 200)except HTTPError as e:print(e, file=sys.stderr)except URLError as e:print(e, file=sys.stderr)except timeout as e:print(e, file=sys.stderr)except Exception as e:print(e, file=sys.stderr)return result
5
14
1
91
2
16
31
16
null
['result', 'ret']
None
null
0
0
0
null
0
null
The function (check_live_url) defined within the public class called public.The function start at line 16 and ends at 31. It contains 14 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value..
hust-open-atom-club_linux-insides-zh
public
public
0
0
main
def main(path):filenames = []for (dirpath, dnames, fnames) in os.walk(path):for fname in fnames:if fname.endswith('.md'):filenames.append(os.sep.join([dirpath, fname]))urls = []for filename in filenames:fd = codecs.open(filename, mode="r", encoding="utf-8")for line in fd.readlines():refs = re.findall(r'(?<=<a href=")[^...
11
23
1
168
4
34
60
34
null
['filenames', 'fd', 'refs', 'urls']
None
null
0
0
0
null
0
null
The function (main) defined within the public class called public.The function start at line 34 and ends at 60. It contains 23 lines of code and it has a cyclomatic complexity of 11. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
install
def install(ctx: invoke.Context,update: bool = False,verbose: bool = False,skip: Optional[list[str]] = None,) -> None:"""Refresh/Install all Poetry-based projects' environments.Args:update: Whether to update the dependencies or just installing them.verbose: Whether to run in verbose mode.skip: List of project directori...
7
20
4
124
3
18
49
18
ctx,update,verbose,skip
['project_name', 'cmd', 'poetry_cmd']
None
{"Assign": 4, "AugAssign": 3, "Expr": 3, "For": 1, "If": 3}
6
32
6
["_iter_project_dirs", "print", "poetry_cmd.replace", "exists", "subprocess.check_call", "shlex.split"]
60
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3916900_edf_hpc_clara.clara.plugins.clara_easybuild_py.install", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3916900_edf_hpc_clara.clara.plugins.clara_easybuild_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Datas...
The function (install) defined within the public class called public.The function start at line 18 and ends at 49. It contains 20 lines of code and it has a cyclomatic complexity of 7. It takes 4 parameters, represented as [18.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions called insi...
Sema4AI_actions
public
public
0
0
docs
def docs(ctx: invoke.Context) -> None:"""Regenerate documentation for each library."""cmd = "invoke docs"for project_dir in _iter_project_dirs():if project_dir.name in DOCS_IGNORE:continueprint(f"Generating docs in {str(project_dir)!r}...")subprocess.check_call(shlex.split(cmd), cwd=project_dir)
3
7
1
50
1
53
61
53
ctx
['cmd']
None
{"Assign": 1, "Expr": 3, "For": 1, "If": 1}
7
9
7
["_iter_project_dirs", "print", "str", "subprocess.check_call", "shlex.split", "task", "call"]
0
[]
The function (docs) defined within the public class called public.The function start at line 53 and ends at 61. It contains 7 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 7.0 functions, and It has 7.0 functions called inside...
Sema4AI_actions
public
public
0
0
unreleased
def unreleased(ctx: invoke.Context) -> None:"""Compare current branch to PyPI."""import tomlkitignored = ["devutils","integration_tests",]ok = Truefor project_dir in _iter_project_dirs():if project_dir.name in ignored:continuepyproject = project_dir / "pyproject.toml"contents = tomlkit.loads(pyproject.read_text())poetr...
5
23
1
115
8
65
94
65
ctx
['pyproject', 'current', 'ok', 'ignored', 'name', 'remote', 'contents', 'poetry']
None
{"Assign": 9, "Expr": 3, "For": 1, "If": 3}
7
30
7
["_iter_project_dirs", "tomlkit.loads", "pyproject.read_text", "_pypi_version", "print", "print", "invoke.Exit"]
0
[]
The function (unreleased) defined within the public class called public.The function start at line 65 and ends at 94. It contains 23 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declares 7.0 functions, and It has 7.0 functions called...
Sema4AI_actions
public
public
0
0
lock
def lock(ctx: invoke.Context, skip: Optional[list[str]] = None) -> None:"""Make lock for all Poetry-based projects' environments.Args:skip: List of project directories to skip."""for project_dir in _iter_project_dirs():project_name = project_dir.nameif skip and project_name in skip:print(f"Skipping project {project_nam...
4
7
2
63
1
98
110
98
ctx,skip
['project_name']
None
{"Assign": 1, "Expr": 3, "For": 1, "If": 1}
3
13
3
["_iter_project_dirs", "print", "subprocess.check_call"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3560326_cloudmatrix_esky.esky.tests.__init___py.TestableEsky.lock", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3607851_andsens_bootstrap_vz.tests.system.providers.virtualbox.instance_py.VirtualBoxInstance.create"...
The function (lock) defined within the public class called public.The function start at line 98 and ends at 110. It contains 7 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [98.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions called inside ...
Sema4AI_actions
public
public
0
0
_iter_project_dirs
def _iter_project_dirs():for path in ROOT.iterdir():if path.is_dir():if (path / "pyproject.toml").exists():yield path
4
5
0
33
0
113
117
113
[]
None
{"Expr": 1, "For": 1, "If": 2}
3
5
3
["ROOT.iterdir", "path.is_dir", "exists"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.tasks_py.docs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.tasks_py.install", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_...
The function (_iter_project_dirs) defined within the public class called public.The function start at line 113 and ends at 117. It contains 5 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 3.0 functions, It has 3.0 functions ca...
Sema4AI_actions
public
public
0
0
_pypi_version
def _pypi_version(name: str) -> str:import jsonimport urllib.requestimport semverwith urllib.request.urlopen(f"https://pypi.org/pypi/{name}/json") as response:metadata = json.loads(response.read())latest = max(metadata["releases"].keys(), key=semver.Version.parse)return latest
1
8
1
65
2
120
130
120
name
['metadata', 'latest']
str
{"Assign": 2, "Return": 1, "With": 1}
5
11
5
["urllib.request.urlopen", "json.loads", "response.read", "max", "keys"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.tasks_py.unreleased"]
The function (_pypi_version) defined within the public class called public.The function start at line 120 and ends at 130. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, It has 5.0 functions called ...
Sema4AI_actions
public
public
0
0
collect_deps_pyprojects
def collect_deps_pyprojects(root_pyproject: Path, found=None) -> Iterator[Path]:if found is None:found = set()import tomlkit# allows roundtrip of toml filescontents: dict = tomlkit.loads(root_pyproject.read_bytes().decode("utf-8"))dependencies = list(contents["tool"]["poetry"]["dependencies"])try:dependencies.extend(co...
8
24
2
177
4
49
75
49
root_pyproject,found
['dep_pyproject', 'dep_name', 'found', 'dependencies']
Iterator[Path]
{"AnnAssign": 1, "Assign": 5, "Expr": 4, "For": 1, "If": 5, "Try": 1}
12
27
12
["set", "tomlkit.loads", "decode", "root_pyproject.read_bytes", "list", "dependencies.extend", "key.startswith", "replace", "len", "dep_pyproject.exists", "found.add", "collect_deps_pyprojects"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions._github.workflows._gen_workflows_py.BaseWorkflow.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions._github.workflows._gen_workflows_py.collect_deps_pyprojects...
The function (collect_deps_pyprojects) defined within the public class called public.The function start at line 49 and ends at 75. It contains 24 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [49.0] and does not return any value. It declares 12.0 functions, It has 12.0 fun...
Sema4AI_actions
public
public
0
0
get_python_version
def get_python_version(pyproject):import tomlkitcontents: dict = tomlkit.loads(pyproject.read_bytes().decode("utf-8"))dependencies = contents["tool"]["poetry"]["dependencies"]for key, value in dependencies.items():if key == "python":version = value.strip("^")assert "." in version# Extract the first major minor from ">=...
5
17
1
125
2
78
99
78
pyproject
['version', 'dependencies']
Returns
{"AnnAssign": 1, "Assign": 4, "For": 1, "If": 2, "Return": 1}
11
22
11
["tomlkit.loads", "decode", "pyproject.read_bytes", "dependencies.items", "value.strip", "version.split", "version.strip", "tuple", "int", "version.split", "RuntimeError"]
6
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3645277_yelp_venv_update.tests.functional.conflict_test_py.test_editable_egg_conflict", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3645277_yelp_venv_update.venv_update_py.invalid_virtualenv_reason", "_.content.gd...
The function (get_python_version) defined within the public class called public.The function start at line 78 and ends at 99. It contains 17 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters, and this function return a value. It declares 11.0 functions, It has 11.0 functio...
Sema4AI_actions
BaseWorkflow
public
0
0
__init__
def __init__(self):project_dir = CURDIR.parent.parent / self.project_nameassert project_dir.exists(), f"{project_dir} does not exist"self.target_file = CURDIR / f"{self.target}"paths = [f"{self.project_name}/**",f".github/workflows/{self.target}","devutils/**",]pyproject_toml_file = project_dir / "pyproject.toml"self.p...
3
24
1
177
0
105
132
105
self
[]
None
{"Assign": 10, "Expr": 6, "For": 1, "If": 1}
13
28
13
["project_dir.exists", "get_python_version", "list", "collect_deps_pyprojects", "paths.append", "self.full.update", "self.full.update", "self.full.update", "self.on_part", "self.full.update", "self.defaults_part", "self.full.update", "self.jobs_part"]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called BaseWorkflow.The function start at line 105 and ends at 132. It contains 24 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 13.0 functions, It has 13.0 functions cal...
Sema4AI_actions
BaseWorkflow
public
0
0
setup_python
def setup_python(self):return [# {# "name": "Set up Python ${{ matrix.python }}",# "uses": "actions/setup-python@v5",# "with": {# "python-version": "${{ matrix.python }}",# "cache": "poetry",# },{"name": "Install the latest version of uv","uses": "astral-sh/setup-uv@v5","with": {"enable-cache": True,},},{"name": f"Inst...
1
14
1
41
0
134
154
134
self
[]
Returns
{"Return": 1}
0
21
0
[]
0
[]
The function (setup_python) defined within the public class called BaseWorkflow.The function start at line 134 and ends at 154. It contains 14 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
matrix
def matrix(self, pyversion: str):matrix = {"name": [f"ubuntu-py{pyversion}-devmode",f"windows-py{pyversion}-devmode",f"macos-py{pyversion}-devmode",],"include": [{"name": f"ubuntu-py{pyversion}-devmode","python": pyversion,"os": UBUNTU_VERSION,},{"name": f"windows-py{pyversion}-devmode","python": pyversion,"os": "windo...
1
26
2
82
0
156
181
156
self,pyversion
[]
Returns
{"Assign": 1, "Return": 1}
0
26
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3951377_blueqat_blueqat.blueqat.macros.__init___py.mcu_gray"]
The function (matrix) defined within the public class called BaseWorkflow.The function start at line 156 and ends at 181. It contains 26 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [156.0], and this function return a value. It has 1.0 function calling this function which...
Sema4AI_actions
BaseWorkflow
public
0
0
matrix_binary_release
def matrix_binary_release(self, pyversion: str):return {# Important: Changing os requires updating the related references in this yml."os": [UBUNTU_VERSION,"windows-2022","macos-13",# used for the x86_64 binary"macos-15",# used for the arm64 binary],"include": [{"os": UBUNTU_VERSION,"python": pyversion,"asset_path": "a...
1
31
2
90
0
183
214
183
self,pyversion
[]
Returns
{"Return": 1}
0
32
0
[]
0
[]
The function (matrix_binary_release) defined within the public class called BaseWorkflow.The function start at line 183 and ends at 214. It contains 31 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [183.0], and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
matrix_cibuildwheel
def matrix_cibuildwheel(self, pyversion: str):return {# Important: Changing os requires updating the related references in this yml."os": [UBUNTU_VERSION,"windows-2022",# "macos-13",skipped (cibuildwheel is having some issue with it)."macos-15",# used for the arm64 binary],"include": [{"os": UBUNTU_VERSION,"python": py...
1
22
2
61
0
216
239
216
self,pyversion
[]
Returns
{"Return": 1}
0
24
0
[]
0
[]
The function (matrix_cibuildwheel) defined within the public class called BaseWorkflow.The function start at line 216 and ends at 239. It contains 22 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [216.0], and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
matrix_ubuntu
def matrix_ubuntu(self, pyversion: str):matrix = {"name": [f"ubuntu-py{pyversion}",],"include": [{"name": f"ubuntu-py{pyversion}","python": pyversion,"os": UBUNTU_VERSION,},],}return matrix
1
14
2
44
0
241
254
241
self,pyversion
[]
Returns
{"Assign": 1, "Return": 1}
0
14
0
[]
0
[]
The function (matrix_ubuntu) defined within the public class called BaseWorkflow.The function start at line 241 and ends at 254. It contains 14 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [241.0], and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
jobs_part
def jobs_part(self):return {"jobs": {"build": self.build_job_part()}}
1
2
1
19
0
256
257
256
self
[]
Returns
{"Return": 1}
1
2
1
["self.build_job_part"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions._github.workflows._gen_workflows_py.ActionServerBinaryRelease.jobs_part"]
The function (jobs_part) defined within the public class called BaseWorkflow.The function start at line 256 and ends at 257. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function call...
Sema4AI_actions
BaseWorkflow
public
0
0
build_job_part
def build_job_part(self):build = {}build.update(self.runs_on_and_strategy_part())build.update(self.build_steps_part())return build
1
5
1
31
0
259
263
259
self
[]
Returns
{"Assign": 1, "Expr": 2, "Return": 1}
4
5
4
["build.update", "self.runs_on_and_strategy_part", "build.update", "self.build_steps_part"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions._github.workflows._gen_workflows_py.ActionServerBinaryRelease.build_job_part"]
The function (build_job_part) defined within the public class called BaseWorkflow.The function start at line 259 and ends at 263. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 4.0 functions, It has 4.0 functi...
Sema4AI_actions
BaseWorkflow
public
0
0
build_steps_part
def build_steps_part(self):return {"steps": self.build_steps()}
1
2
1
15
0
265
266
265
self
[]
Returns
{"Return": 1}
1
2
1
["self.build_steps"]
0
[]
The function (build_steps_part) defined within the public class called BaseWorkflow.The function start at line 265 and ends at 266. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It has 1.0 f...
Sema4AI_actions
BaseWorkflow
public
0
0
runs_on_and_strategy_part
def runs_on_and_strategy_part(self):return {"runs-on": "${{ matrix.os }}","strategy": {"fail-fast": self.fail_fast,"matrix": self.matrix(self.minimum_python_version),},}
1
8
1
34
0
268
275
268
self
[]
Returns
{"Return": 1}
1
8
1
["self.matrix"]
0
[]
The function (runs_on_and_strategy_part) defined within the public class called BaseWorkflow.The function start at line 268 and ends at 275. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It ...
Sema4AI_actions
BaseWorkflow
public
0
0
defaults_part
def defaults_part(self):return {"defaults": {"run": {"working-directory": f"./{self.project_name}"}}}
1
2
1
20
0
277
278
277
self
[]
Returns
{"Return": 1}
0
2
0
[]
0
[]
The function (defaults_part) defined within the public class called BaseWorkflow.The function start at line 277 and ends at 278. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
on_part
def on_part(self, dep_paths):return {"on": {"push": {"branches": ["master", "wip"],"paths": dep_paths[:],},"pull_request": {"branches": ["master"],"paths": dep_paths[:],},}}
1
13
2
52
0
280
292
280
self,dep_paths
[]
Returns
{"Return": 1}
0
13
0
[]
0
[]
The function (on_part) defined within the public class called BaseWorkflow.The function start at line 280 and ends at 292. It contains 13 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [280.0], and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
generate
def generate(self):contents = yaml.safe_dump(self.full, sort_keys=False)path = CURDIR / self.targetprint("Writing to ", path)path.write_text(f"""{AUTO_GEN_HEADER}{contents}{AUTO_GEN_HEADER}""","utf-8",)
1
7
1
42
0
294
306
294
self
[]
None
{"Assign": 2, "Expr": 2}
3
13
3
["yaml.safe_dump", "print", "path.write_text"]
86
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3554290_abakan_zz_ablog.ablog.start_py.ablog_start", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3630950_deliveryhero_lymph.lymph.autodoc_py.RPCMethodDocumenter.generate", "_.content.gdrive.MyDrive.Phd_Thesis.Data...
The function (generate) defined within the public class called BaseWorkflow.The function start at line 294 and ends at 306. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, It has 3.0 functions called...
Sema4AI_actions
BaseWorkflow
public
0
0
is_beta_in_outputs
def is_beta_in_outputs(self):# A step defining if it's a beta release. Needs 2 things:# 1. Add to the outputs# 2. Add to the steps# 3. Add to the needs# Can then be checked with:#if: ${{ needs.<job-name>.outputs.is_beta == 'false' }}#output = {"is_beta": "${{ steps.check_beta.outputs.is_beta }}",}return output
1
5
1
15
0
308
319
308
self
[]
Returns
{"Assign": 1, "Return": 1}
0
12
0
[]
0
[]
The function (is_beta_in_outputs) defined within the public class called BaseWorkflow.The function start at line 308 and ends at 319. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
is_beta_in_steps
def is_beta_in_steps(self):step = {"name": "Check if this is a beta release","id": "check_beta","run": """is_beta=${{ endsWith(github.ref_name, '-beta') }}echo "is_beta: $is_beta"echo "::set-output name=is_beta::$is_beta"""",}return step
1
6
1
23
0
321
331
321
self
[]
Returns
{"Assign": 1, "Return": 1}
0
11
0
[]
0
[]
The function (is_beta_in_steps) defined within the public class called BaseWorkflow.The function start at line 321 and ends at 331. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
install_with_devmode
def install_with_devmode(self, env: dict | None = None):ret = {"name": "Install project (not dev)","if": "contains(matrix.name, '-devmode') == false","run": f"{run_in_env}inv install",}if env:ret["env"] = env.copy()return ret
2
9
2
45
0
333
341
333
self,env
[]
Returns
{"Assign": 2, "If": 1, "Return": 1}
1
9
1
["env.copy"]
0
[]
The function (install_with_devmode) defined within the public class called BaseWorkflow.The function start at line 333 and ends at 341. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [333.0], and this function return a value. It declare 1.0 function, and It h...
Sema4AI_actions
BaseWorkflow
public
0
0
install_without_devmode
def install_without_devmode(self, env: dict | None = None):ret = {"name": "Install project (dev)","if": "contains(matrix.name, '-devmode')","run": f"{run_in_env}inv devinstall",}if env:ret["env"] = env.copy()return ret
2
9
2
45
0
343
351
343
self,env
[]
Returns
{"Assign": 2, "If": 1, "Return": 1}
1
9
1
["env.copy"]
0
[]
The function (install_without_devmode) defined within the public class called BaseWorkflow.The function start at line 343 and ends at 351. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [343.0], and this function return a value. It declare 1.0 function, and I...
Sema4AI_actions
BaseWorkflow
public
0
0
install
def install(self, env: dict | None = None) -> list[dict]:return [self.install_with_devmode(env), self.install_without_devmode(env)]
1
2
2
34
0
353
354
353
self,env
[]
list[dict]
{"Return": 1}
2
2
2
["self.install_with_devmode", "self.install_without_devmode"]
60
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3916900_edf_hpc_clara.clara.plugins.clara_easybuild_py.install", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3916900_edf_hpc_clara.clara.plugins.clara_easybuild_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Datas...
The function (install) defined within the public class called BaseWorkflow.The function start at line 353 and ends at 354. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [353.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions cal...
Sema4AI_actions
BaseWorkflow
public
0
0
setup_node
def setup_node(self):return {"name": "Setup node","uses": "actions/setup-node@v4","with": {"node-version": "20.x","registry-url": "https://npm.pkg.github.com","scope": "@robocorp",},}
1
10
1
33
0
356
365
356
self
[]
Returns
{"Return": 1}
0
10
0
[]
0
[]
The function (setup_node) defined within the public class called BaseWorkflow.The function start at line 356 and ends at 365. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
setup_go
def setup_go(self):return {"name": "Setup go","uses": "actions/setup-go@v5","with": {"go-version": "1.23",},}
1
8
1
25
0
367
374
367
self
[]
Returns
{"Return": 1}
0
8
0
[]
0
[]
The function (setup_go) defined within the public class called BaseWorkflow.The function start at line 367 and ends at 374. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
build_frontend
def build_frontend(self):return {"name": "Build frontend","run": f"{run_in_env}inv build-frontend","env": {"CI": True,"NODE_AUTH_TOKEN": "${{ secrets.GH_PAT_READ_PACKAGES }}",},}
1
9
1
30
0
376
384
376
self
[]
Returns
{"Return": 1}
0
9
0
[]
0
[]
The function (build_frontend) defined within the public class called BaseWorkflow.The function start at line 376 and ends at 384. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
build_oauth2_config
def build_oauth2_config(self):return {"name": "Build OAuth2 config","run": f"{run_in_env}inv build-oauth2-config","env": {"GH_TOKEN": "${{ secrets.GH_PAT_GHA_TO_ANOTHER_REPO }}"},}
1
6
1
25
0
386
391
386
self
[]
Returns
{"Return": 1}
0
6
0
[]
0
[]
The function (build_oauth2_config) defined within the public class called BaseWorkflow.The function start at line 386 and ends at 391. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
checkout_repo
def checkout_repo(self):return {"name": "Checkout repository and submodules","uses": "actions/checkout@v5",}
1
5
1
16
0
393
397
393
self
[]
Returns
{"Return": 1}
0
5
0
[]
0
[]
The function (checkout_repo) defined within the public class called BaseWorkflow.The function start at line 393 and ends at 397. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
install_devutils
def install_devutils(self, additional_packages: list[str] = []):run = f"{run_in_env} python -m pip install --break-system-packages -r ../devutils/requirements.txt"if additional_packages:run += f"\n{run_in_env} python -m pip install --break-system-packages {' '.join(additional_packages)}"return {"name": "Install devutil...
2
8
2
37
0
399
406
399
self,additional_packages
[]
Returns
{"Assign": 1, "AugAssign": 1, "If": 1, "Return": 1}
1
8
1
["join"]
0
[]
The function (install_devutils) defined within the public class called BaseWorkflow.The function start at line 399 and ends at 406. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [399.0], and this function return a value. It declare 1.0 function, and It has 1...
Sema4AI_actions
BaseWorkflow
public
0
0
run_lint
def run_lint(self):return {"name": "`inv lint`, potentially fixed with `inv pretty`","if": "always()","run": f"{run_in_env}inv lint",}
1
6
1
21
0
408
413
408
self
[]
Returns
{"Return": 1}
0
6
0
[]
0
[]
The function (run_lint) defined within the public class called BaseWorkflow.The function start at line 408 and ends at 413. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
run_typecheck
def run_typecheck(self):return {"name": "`inv typecheck`","if": "always()","run": f"{run_in_env}inv typecheck",}
1
6
1
21
0
415
420
415
self
[]
Returns
{"Return": 1}
0
6
0
[]
0
[]
The function (run_typecheck) defined within the public class called BaseWorkflow.The function start at line 415 and ends at 420. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
run_docs
def run_docs(self):return {"name": "`inv docs` with checking on files changed","if": "always()","run": f"{run_in_env}inv docs --check",}
1
6
1
21
0
422
427
422
self
[]
Returns
{"Return": 1}
0
6
0
[]
0
[]
The function (run_docs) defined within the public class called BaseWorkflow.The function start at line 422 and ends at 427. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
run_docstrings_validation
def run_docstrings_validation(self):return {"name": "`inv docs --validate`","if": "always()","run": f"{run_in_env}inv docs --validate",}
1
6
1
21
0
429
434
429
self
[]
Returns
{"Return": 1}
0
6
0
[]
0
[]
The function (run_docstrings_validation) defined within the public class called BaseWorkflow.The function start at line 429 and ends at 434. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
check_tag_version
def check_tag_version(self):return {"name": "Check tag version","run": f"{run_in_env}poetry run inv check-tag-version","if": NOT_BETA_IF_CLAUSE,}
1
6
1
21
0
436
441
436
self
[]
Returns
{"Return": 1}
0
6
0
[]
0
[]
The function (check_tag_version) defined within the public class called BaseWorkflow.The function start at line 436 and ends at 441. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
build_action_server_binary
def build_action_server_binary(self):return {"name": "Build binary","env": {"RC_ACTION_SERVER_FORCE_DOWNLOAD_RCC": "true","RC_ACTION_SERVER_DO_SELFTEST": "true","MACOS_SIGNING_CERT": "${{ secrets.MACOS_SIGNING_CERT_SEMA4AI }}","MACOS_SIGNING_CERT_PASSWORD": "${{ secrets.MACOS_SIGNING_CERT_PASSWORD_SEMA4AI }}","MACOS_SI...
1
23
1
86
0
443
465
443
self
[]
Returns
{"Return": 1}
0
23
0
[]
0
[]
The function (build_action_server_binary) defined within the public class called BaseWorkflow.The function start at line 443 and ends at 465. It contains 23 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
build_steps
def build_steps(self) -> list[dict]:raise NotImplementedError("Subclasses must implement this method")
1
2
1
15
0
467
468
467
self
[]
list[dict]
{}
1
2
1
["NotImplementedError"]
0
[]
The function (build_steps) defined within the public class called BaseWorkflow.The function start at line 467 and ends at 468. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function c...
Sema4AI_actions
BaseWorkflow
public
0
0
upload_artifact
def upload_artifact(self, name: str, path: str, if_clause: str | None = None) -> dict:"""Helper method to create a standardized artifact upload step.Args:name: Name of the artifactpath: Path to the files to upload"""ret = {"name": f"Upload artifact: {path}","uses": "actions/upload-artifact@v4","with": {"name": name,"pa...
2
14
4
61
0
470
489
470
self,name,path,if_clause
[]
dict
{"Assign": 2, "Expr": 1, "If": 1, "Return": 1}
0
20
0
[]
0
[]
The function (upload_artifact) defined within the public class called BaseWorkflow.The function start at line 470 and ends at 489. It contains 14 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [470.0] and does not return any value..
Sema4AI_actions
BaseTests
public
0
1
run_tests
def run_tests(self):return {"name": "Test","env": {"GITHUB_ACTIONS_MATRIX_NAME": "${{ matrix.name }}","CI_CREDENTIALS": "${{ secrets.CI_CREDENTIALS }}","CI_ENDPOINT": "${{ secrets.CI_ENDPOINT }}","ACTION_SERVER_TEST_ACCESS_CREDENTIALS": "${{ secrets.ACTION_SERVER_TEST_ACCESS_CREDENTIALS }}","ACTION_SERVER_TEST_HOSTNAME...
1
12
1
42
0
499
510
499
self
[]
Returns
{"Return": 1}
0
12
0
[]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.pystache.commands.test_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3684470_stanfordsnr_pantheon.src.experiments.test_py.main", "_.content.gdrive.MyDrive.Phd_...
The function (run_tests) defined within the public class called BaseTests, that inherit another class.The function start at line 499 and ends at 510. It contains 12 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 5.0 functions ca...
Sema4AI_actions
BaseWorkflow
public
0
0
build_steps
def build_steps(self) -> list[dict]:steps = [self.checkout_repo()] + self.setup_python() + [self.install_devutils()]steps.extend(self.install())if self.require_go:steps.append(self.setup_go())if self.require_build_frontend or self.require_node:steps.append(self.setup_node())if self.require_build_frontend:steps.append(s...
8
20
1
177
0
513
541
513
self
[]
list[dict]
{}
1
2
1
["NotImplementedError"]
0
[]
The function (build_steps) defined within the public class called BaseWorkflow.The function start at line 513 and ends at 541. It contains 20 lines of code and it has a cyclomatic complexity of 8. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function ...
Sema4AI_actions
BaseTests
public
0
1
run_tests
def run_tests(self):return [# As we want to run the tests in the binary, we do the following:# 1. Build the binary# 2. Run the unit-tests (not integration) in the current environment# 3. Run the integration-tests in the binaryself.build_action_server_binary(),self.upload_artifact(name="action-server-${{ matrix.os }}", ...
1
29
1
101
0
554
586
554
self
[]
Returns
{"Return": 1}
0
12
0
[]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.pystache.commands.test_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3684470_stanfordsnr_pantheon.src.experiments.test_py.main", "_.content.gdrive.MyDrive.Phd_...
The function (run_tests) defined within the public class called BaseTests, that inherit another class.The function start at line 554 and ends at 586. It contains 29 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 5.0 functions ca...
Sema4AI_actions
BaseWorkflow
public
0
0
on_part
def on_part(self, dep_paths):return {"on": {"push": {"tags": ["sema4ai-action_server-*"],"branches": ["*-beta"],},}}
1
9
2
31
0
596
604
596
self,dep_paths
[]
Returns
{"Return": 1}
0
13
0
[]
0
[]
The function (on_part) defined within the public class called BaseWorkflow.The function start at line 596 and ends at 604. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [596.0], and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
runs_on_and_strategy_part
def runs_on_and_strategy_part(self):return {"runs-on": "${{ matrix.os }}","strategy": {"fail-fast": self.fail_fast,"matrix": self.matrix(self.minimum_python_version),},}
1
8
1
34
0
607
614
268
self
[]
Returns
{"Return": 1}
1
8
1
["self.matrix"]
0
[]
The function (runs_on_and_strategy_part) defined within the public class called BaseWorkflow.The function start at line 607 and ends at 614. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It ...
Sema4AI_actions
ActionServerPyPiRelease
public
0
1
build_sdist
def build_sdist(self):return {"name": "Build sdist","run": f"""# Make sure that we have no binaries present when doing the build.rm src/sema4ai/bin/rcc* -f# Just sdist here, wheels are built in the manylinux job.{run_in_env}poetry build -f sdist""","env": {"CI": True,"NODE_AUTH_TOKEN": "${{ secrets.GH_PAT_READ_PACKAGES...
1
10
1
38
0
616
631
616
self
[]
Returns
{"Return": 1}
0
16
0
[]
0
[]
The function (build_sdist) defined within the public class called ActionServerPyPiRelease, that inherit another class.The function start at line 616 and ends at 631. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
Sema4AI_actions
ActionServerPyPiRelease
public
0
1
upload_artifact_action_server_dist
def upload_artifact_action_server_dist(self):return self.upload_artifact(name="action-server-dist", path="action_server/dist/*")
1
4
1
18
0
633
636
633
self
[]
Returns
{"Return": 1}
1
4
1
["self.upload_artifact"]
0
[]
The function (upload_artifact_action_server_dist) defined within the public class called ActionServerPyPiRelease, that inherit another class.The function start at line 633 and ends at 636. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function r...
Sema4AI_actions
ActionServerPyPiRelease
public
0
1
upload_to_pypi
def upload_to_pypi(self):return {"name": "Upload to PyPI","run": f"""{run_in_env}poetry config pypi-token.pypi${{{{ secrets.PYPI_TOKEN_SEMA4AI_ACTION_SERVER }}}}{run_in_env}poetry publish""","env": {"ACTION_SERVER_SKIP_DOWNLOAD_IN_BUILD": True,},"if": NOT_BETA_IF_CLAUSE,}
1
8
1
30
0
638
649
638
self
[]
Returns
{"Return": 1}
0
12
0
[]
0
[]
The function (upload_to_pypi) defined within the public class called ActionServerPyPiRelease, that inherit another class.The function start at line 638 and ends at 649. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
build_steps
def build_steps(self) -> list[dict]:steps = [self.checkout_repo()] + self.setup_python() + [self.install_devutils()]steps.extend(self.install(env={"ACTION_SERVER_SKIP_DOWNLOAD_IN_BUILD": "true"}))steps.append(self.setup_node())steps.append(self.check_tag_version())steps.append(self.build_frontend())steps.append(self.bu...
1
11
1
122
0
652
666
652
self
[]
list[dict]
{}
1
2
1
["NotImplementedError"]
0
[]
The function (build_steps) defined within the public class called BaseWorkflow.The function start at line 652 and ends at 666. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function ...
Sema4AI_actions
BaseWorkflow
public
0
0
on_part
def on_part(self, dep_paths):return {"on": {"push": {"tags": ["sema4ai-action_server-*"],"branches": ["*-beta"],},}}
1
9
2
31
0
676
684
596
self,dep_paths
[]
Returns
{"Return": 1}
0
13
0
[]
0
[]
The function (on_part) defined within the public class called BaseWorkflow.The function start at line 676 and ends at 684. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [596.0], and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
runs_on_and_strategy_part
def runs_on_and_strategy_part(self):return {"runs-on": "${{ matrix.os }}","strategy": {"fail-fast": self.fail_fast,"matrix": self.matrix(self.minimum_python_version),},}
1
8
1
34
0
687
694
268
self
[]
Returns
{"Return": 1}
1
8
1
["self.matrix"]
0
[]
The function (runs_on_and_strategy_part) defined within the public class called BaseWorkflow.The function start at line 687 and ends at 694. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It ...
Sema4AI_actions
ActionServerBinaryRelease
public
0
1
upload_artifact_with_asset_path
def upload_artifact_with_asset_path(self):return self.upload_artifact(name="action-server-${{ matrix.os }}", path="action_server/dist/final/")
1
4
1
18
0
696
699
696
self
[]
Returns
{"Return": 1}
1
4
1
["self.upload_artifact"]
0
[]
The function (upload_artifact_with_asset_path) defined within the public class called ActionServerBinaryRelease, that inherit another class.The function start at line 696 and ends at 699. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function re...
Sema4AI_actions
ActionServerBinaryRelease
public
0
1
set_version_on_ubuntu
def set_version_on_ubuntu(self):return {"name": "Set version","run": f"""{run_in_env}poetry version | awk '{{print $2}}' > version.txtVERSION=$(cat version.txt)echo "Version: $VERSION"echo "version=$VERSION" >> "$GITHUB_OUTPUT"""","id": "set_version","if": "${{ matrix.os == '" + UBUNTU_VERSION + "' }}",}
1
6
1
29
0
701
713
701
self
[]
Returns
{"Return": 1}
0
13
0
[]
0
[]
The function (set_version_on_ubuntu) defined within the public class called ActionServerBinaryRelease, that inherit another class.The function start at line 701 and ends at 713. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a val...
Sema4AI_actions
ActionServerBinaryRelease
public
0
1
upload_artifact_action_server_version_on_ubuntu
def upload_artifact_action_server_version_on_ubuntu(self):# Having a separate artifact for version.txt helps downstream workflowsreturn self.upload_artifact(name="action-server-version",path="action_server/version.txt",if_clause="${{ matrix.os == '" + UBUNTU_VERSION + "' }}",)
1
6
1
27
0
715
721
715
self
[]
Returns
{"Return": 1}
1
7
1
["self.upload_artifact"]
0
[]
The function (upload_artifact_action_server_version_on_ubuntu) defined within the public class called ActionServerBinaryRelease, that inherit another class.The function start at line 715 and ends at 721. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and ...
Sema4AI_actions
BaseWorkflow
public
0
0
build_steps
def build_steps(self) -> list[dict]:steps = [self.checkout_repo()] + self.setup_python() + [self.install_devutils()]steps.extend(self.install())steps.append(self.setup_node())steps.append(self.setup_go())steps.append(self.check_tag_version())steps.append(self.build_frontend())steps.append(self.build_oauth2_config())ste...
1
13
1
135
0
723
740
723
self
[]
list[dict]
{}
1
2
1
["NotImplementedError"]
0
[]
The function (build_steps) defined within the public class called BaseWorkflow.The function start at line 723 and ends at 740. It contains 13 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 function ...
Sema4AI_actions
BaseWorkflow
public
0
0
build_job_part
def build_job_part(self):build = super().build_job_part()build["outputs"] = {"version": "${{ steps.set_version.outputs.version }}"}return build
1
4
1
26
0
742
745
742
self
[]
Returns
{"Assign": 1, "Expr": 2, "Return": 1}
4
5
4
["build.update", "self.runs_on_and_strategy_part", "build.update", "self.build_steps_part"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions._github.workflows._gen_workflows_py.ActionServerBinaryRelease.build_job_part"]
The function (build_job_part) defined within the public class called BaseWorkflow.The function start at line 742 and ends at 745. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 4.0 functions, It has 4.0 functi...
Sema4AI_actions
BaseWorkflow
public
0
0
jobs_part
def jobs_part(self):jobs = super().jobs_part()jobs["jobs"]["deploy-s3"] = self.deploy_s3_job_part()jobs["jobs"].update(self.trigger_brew_workflow_job_part())jobs["jobs"].update(self.release_job_part())return jobs
1
6
1
55
0
748
753
748
self
[]
Returns
{"Return": 1}
1
2
1
["self.build_job_part"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions._github.workflows._gen_workflows_py.ActionServerBinaryRelease.jobs_part"]
The function (jobs_part) defined within the public class called BaseWorkflow.The function start at line 748 and ends at 753. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function call...
Sema4AI_actions
ActionServerBinaryRelease
public
0
1
trigger_brew_workflow_job_part
def trigger_brew_workflow_job_part(self):return {"trigger-brew-workflow": {"needs": ["build", "deploy-s3"],"defaults": {"run": {"working-directory": "."}},"if": "${{ needs.deploy-s3.outputs.is_beta == 'false' }}","runs-on": UBUNTU_VERSION,"steps": [{"name": "Wait for Downloads S3 Bucket to have the right content","time...
1
18
1
72
0
755
794
755
self
[]
Returns
{"Return": 1}
0
40
0
[]
0
[]
The function (trigger_brew_workflow_job_part) defined within the public class called ActionServerBinaryRelease, that inherit another class.The function start at line 755 and ends at 794. It contains 18 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function re...
Sema4AI_actions
ActionServerBinaryRelease
public
0
1
release_job_part
def release_job_part(self):return {"release": {"if": "${{ needs.deploy-s3.outputs.is_beta == 'false' }}","permissions": {"contents": "write"},"needs": ["deploy-s3", "trigger-brew-workflow"],"defaults": {"run": {"working-directory": "."}},"runs-on": UBUNTU_VERSION,"steps": [{"uses": "actions/checkout@v4"},{"name": "Crea...
1
95
1
330
0
796
908
796
self
[]
Returns
{"Return": 1}
0
113
0
[]
0
[]
The function (release_job_part) defined within the public class called ActionServerBinaryRelease, that inherit another class.The function start at line 796 and ends at 908. It contains 95 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
Sema4AI_actions
ActionServerBinaryRelease
public
0
1
deploy_s3_job_part
def deploy_s3_job_part(self):return {"permissions": {"id-token": "write",# required by AWS aws-actions/configure-aws-credentials"contents": "read",},"needs": ["build"],"defaults": {"run": {"working-directory": "./action_server",},},"runs-on": UBUNTU_VERSION,"outputs": {"is_beta": "${{ steps.check_beta.outputs.is_beta }...
1
16
1
61
0
910
925
910
self
[]
Returns
{"Return": 1}
1
16
1
["self.deploy_s3_job_steps"]
0
[]
The function (deploy_s3_job_part) defined within the public class called ActionServerBinaryRelease, that inherit another class.The function start at line 910 and ends at 925. It contains 16 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value...
Sema4AI_actions
ActionServerBinaryRelease
public
0
1
download_artifacts
def download_artifacts(self):# It'll generate something as (for all the OSes we require):# - uses: actions/download-artifact@v4# with:# name: action-server-windows-2022# path: action_server/build/windows64/ret = []for os, path in [("windows-2022", "windows64"),("macos-13", "macos64"),("macos-15", "macos-arm64"),(UBUNTU...
2
29
1
102
0
927
962
927
self
[]
Returns
{"Assign": 1, "Expr": 2, "For": 1, "Return": 1}
2
36
2
["ret.append", "ret.append"]
0
[]
The function (download_artifacts) defined within the public class called ActionServerBinaryRelease, that inherit another class.The function start at line 927 and ends at 962. It contains 29 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value...
Sema4AI_actions
ActionServerBinaryRelease
public
0
1
deploy_s3_job_steps
def deploy_s3_job_steps(self):steps = []steps.append(self.checkout_repo())steps.append(self.is_beta_in_steps())steps.extend(self.download_artifacts())steps.extend(self.upload_to_s3())return steps
1
7
1
51
0
964
970
964
self
[]
Returns
{"Assign": 1, "Expr": 4, "Return": 1}
8
7
8
["steps.append", "self.checkout_repo", "steps.append", "self.is_beta_in_steps", "steps.extend", "self.download_artifacts", "steps.extend", "self.upload_to_s3"]
0
[]
The function (deploy_s3_job_steps) defined within the public class called ActionServerBinaryRelease, that inherit another class.The function start at line 964 and ends at 970. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value...
Sema4AI_actions
ActionServerBinaryRelease
public
0
1
upload_to_s3
def upload_to_s3(self):ret = []ret.append({"name": "Put files in s3-drop","run": """ls -lpwdls -l buildmkdir s3-dropmv build/version.txt s3-drop/mv build/macos64 s3-drop/mv build/macos-arm64 s3-drop/mv build/linux64 s3-drop/mv build/windows64 s3-drop/ls -l s3-drop/ver=`cat s3-drop/version.txt`echo "actionServerVersion=...
1
29
1
87
0
972
1,033
972
self
[]
Returns
{"Assign": 1, "Expr": 4, "Return": 1}
5
62
5
["ret.append", "ret.append", "self.upload_artifact", "ret.append", "ret.append"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567358_coursera_dataduct.dataduct.s3.s3_file_py.S3File.upload_to_s3"]
The function (upload_to_s3) defined within the public class called ActionServerBinaryRelease, that inherit another class.The function start at line 972 and ends at 1033. It contains 29 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It ...
Sema4AI_actions
BaseWorkflow
public
0
0
on_part
def on_part(self, dep_paths):return {"on": {"push": {"tags": ["sema4ai-action_server-*"],"branches": ["*-beta"],},}}
1
9
2
31
0
1,043
1,051
596
self,dep_paths
[]
Returns
{"Return": 1}
0
13
0
[]
0
[]
The function (on_part) defined within the public class called BaseWorkflow.The function start at line 1043 and ends at 1051. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [596.0], and this function return a value..
Sema4AI_actions
BaseWorkflow
public
0
0
runs_on_and_strategy_part
def runs_on_and_strategy_part(self):return {"runs-on": "${{ matrix.os }}","strategy": {"fail-fast": self.fail_fast,"matrix": self.matrix(self.minimum_python_version),},}
1
8
1
34
0
1,054
1,061
268
self
[]
Returns
{"Return": 1}
1
8
1
["self.matrix"]
0
[]
The function (runs_on_and_strategy_part) defined within the public class called BaseWorkflow.The function start at line 1054 and ends at 1061. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and I...
Sema4AI_actions
ActionServerManylinuxRelease
public
0
1
build_manylinux_wheels
def build_manylinux_wheels(self):CIBW_BUILD = "cp312-*macos*arm64 "CIBW_BUILD += "cp313-*macos*arm64 "CIBW_BUILD += "cp312-*manylinux*x86_64 "CIBW_BUILD += "cp313-*manylinux*x86_64 "CIBW_BUILD += "cp312-*win*amd64 "CIBW_BUILD += "cp313-*win*amd64"return {"name": "Build wheels","run": f"{run_in_env} python -m cibuildwhe...
1
16
1
52
0
1,063
1,078
1,063
self
[]
Returns
{"Assign": 1, "AugAssign": 5, "Return": 1}
0
16
0
[]
0
[]
The function (build_manylinux_wheels) defined within the public class called ActionServerManylinuxRelease, that inherit another class.The function start at line 1063 and ends at 1078. It contains 16 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function retur...
Sema4AI_actions
ActionServerManylinuxRelease
public
0
1
upload_artifact_manylinux_wheels
def upload_artifact_manylinux_wheels(self):return self.upload_artifact(name="${{ runner.os }}-wheels", path="action_server/wheelhouse/*")
1
4
1
18
0
1,080
1,083
1,080
self
[]
Returns
{"Return": 1}
1
4
1
["self.upload_artifact"]
0
[]
The function (upload_artifact_manylinux_wheels) defined within the public class called ActionServerManylinuxRelease, that inherit another class.The function start at line 1080 and ends at 1083. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this funct...
Sema4AI_actions
ActionServerManylinuxRelease
public
0
1
upload_wheels_to_pypi
def upload_wheels_to_pypi(self):return {"name": "Upload to PyPI .whl","run": f"{run_in_env}twine upload wheelhouse/*.whl","if": NOT_BETA_IF_CLAUSE,"env": {"TWINE_USERNAME": "__token__","TWINE_PASSWORD": "${{ secrets.PYPI_TOKEN_SEMA4AI_ACTION_SERVER }}",},}
1
10
1
34
0
1,085
1,094
1,085
self
[]
Returns
{"Return": 1}
0
10
0
[]
0
[]
The function (upload_wheels_to_pypi) defined within the public class called ActionServerManylinuxRelease, that inherit another class.The function start at line 1085 and ends at 1094. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return...
Sema4AI_actions
BaseWorkflow
public
0
0
build_steps
def build_steps(self) -> list[dict]:steps = [self.checkout_repo()] + self.setup_python() + [self.install_devutils()]steps.extend(self.install())steps.append(self.setup_node())steps.append(self.setup_go())steps.append(self.check_tag_version())steps.append(self.build_frontend())steps.append(self.build_oauth2_config())ste...
1
15
1
135
0
1,097
1,111
723
self
[]
list[dict]
{}
1
2
1
["NotImplementedError"]
0
[]
The function (build_steps) defined within the public class called BaseWorkflow.The function start at line 1097 and ends at 1111. It contains 15 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declare 1.0 function, and It has 1.0 functio...
Sema4AI_actions
public
public
0
0
main
def main():for t in TARGETS:t.generate()
2
3
0
14
0
1,151
1,153
1,151
[]
None
{"Expr": 1, "For": 1}
1
3
1
["t.generate"]
199
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.pystache.tests.test_commands_py.CommandsTestCase.callScript", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3518760_makerbot_pyserial.ez_setup_py.main", "_.content.gdriv...
The function (main) defined within the public class called public.The function start at line 1151 and ends at 1153. It contains 3 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called inside whi...
Sema4AI_actions
public
public
0
0
generate_dependabot_config.create_ecosystem_config
def create_ecosystem_config(ecosystem, directories):directories = sorted([f"{Path(directory).as_posix()}" if directory != "/" else "/"for directory in directories])configs = [{"package-ecosystem": ecosystem,"directories": directories,"schedule": {"interval": "daily"},"open-pull-requests-limit": 0,# Only notifications, ...
3
17
2
64
0
1,239
1,256
1,239
null
[]
None
null
0
0
0
null
0
null
The function (generate_dependabot_config.create_ecosystem_config) defined within the public class called public.The function start at line 1239 and ends at 1256. It contains 17 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [1239.0] and does not return any value..
Sema4AI_actions
public
public
0
0
generate_dependabot_config
def generate_dependabot_config():"""We want to generate a dependabot yaml that's roughly as what's below, butwe want to define `directories` instead of `directory` where the directorieshas the paths that have the files that need to be targeted.For:- "gomod" this is any file with a `go.mod` file- "pip" this is any file ...
10
33
0
247
10
1,156
1,288
1,156
['configs', 'config', 'go_mod_dirs', 'directories', 'pyproject_dirs', 'dependabot_file', 'github_actions_dirs', 'root', 'contents', 'package_json_dirs']
Returns
{"Assign": 10, "Expr": 9, "If": 3, "Return": 1}
27
133
27
["str", "f.parent.relative_to", "root.rglob", "str", "f.parent.relative_to", "root.rglob", "f.as_posix", "f.as_posix", "str", "f.parent.relative_to", "root.rglob", "str", "sorted", "as_posix", "Path", "extend", "create_ecosystem_config", "extend", "create_ecosystem_config", "extend", "create_ecosystem_config", "extend"...
0
[]
The function (generate_dependabot_config) defined within the public class called public.The function start at line 1156 and ends at 1288. It contains 33 lines of code and it has a cyclomatic complexity of 10. The function does not take any parameters, and this function return a value. It declares 27.0 functions, and I...
Sema4AI_actions
public
public
0
0
load_curr
def load_curr():ON_PART = yaml.safe_load(r"""- name: Set up chrome for testsrun: choco install googlechrome --ignore-checksums""")print(ON_PART)
1
4
0
17
1
1,291
1,299
1,291
['ON_PART']
None
{"Assign": 1, "Expr": 1}
2
9
2
["yaml.safe_load", "print"]
0
[]
The function (load_curr) defined within the public class called public.The function start at line 1291 and ends at 1299. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions call...
Sema4AI_actions
public
public
0
0
_download_with_resume
def _download_with_resume(url: str, target: Path) -> Path:import statlog.info(f"Downloading '{url}' to '{target}'")chunk_size = 1024 * 5with _open_urllib(url) as response:content_size = int(response.getheader("Content-Length") or -1)try:with open(target, "wb") as stream:while True:chunk = response.read(chunk_size)if no...
12
39
2
195
6
18
70
18
url,target
['chunk', 'chunk_size', 'MAX_TRIES', 'curr_file_size', 'st', 'content_size']
Path
{"Assign": 6, "Expr": 5, "For": 1, "If": 6, "Return": 1, "Try": 2, "While": 1, "With": 2}
14
53
14
["log.info", "_open_urllib", "int", "response.getheader", "open", "response.read", "stream.write", "range", "_get_file_size", "log.info", "_resume_download", "RuntimeError", "os.stat", "os.chmod"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.build_py._download_rcc"]
The function (_download_with_resume) defined within the public class called public.The function start at line 18 and ends at 70. It contains 39 lines of code and it has a cyclomatic complexity of 12. It takes 2 parameters, represented as [18.0] and does not return any value. It declares 14.0 functions, It has 14.0 func...
Sema4AI_actions
public
public
0
0
_open_urllib
def _open_urllib(url: str, headers=None):import urllib.request# Cloudflare seems to be blocking "User-Agent: Python-urllib/3.9".# Use a different one as that must be sorted out.use_headers = {"User-Agent": "Mozilla"}if headers:use_headers.update(headers)return urllib.request.urlopen(urllib.request.Request(url, headers=...
2
8
2
55
1
73
83
73
url,headers
['use_headers']
Returns
{"Assign": 1, "Expr": 1, "If": 1, "Return": 1}
3
11
3
["use_headers.update", "urllib.request.urlopen", "urllib.request.Request"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.build_py._download_with_resume", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.build_py._resume_download"]
The function (_open_urllib) defined within the public class called public.The function start at line 73 and ends at 83. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [73.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions cal...