ultralytics-actions 0.0.46__tar.gz → 0.0.48__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/PKG-INFO +1 -1
- {ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/actions/__init__.py +1 -1
- {ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/actions/utils/common_utils.py +15 -6
- {ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/tests/test_urls.py +7 -7
- {ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/ultralytics_actions.egg-info/PKG-INFO +1 -1
- {ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/LICENSE +0 -0
- {ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/README.md +0 -0
- {ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/actions/first_interaction.py +0 -0
- {ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/actions/summarize_pr.py +0 -0
- {ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/actions/summarize_release.py +0 -0
- {ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/actions/update_markdown_code_blocks.py +0 -0
- {ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/actions/utils/__init__.py +0 -0
- {ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/actions/utils/github_utils.py +0 -0
- {ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/actions/utils/openai_utils.py +0 -0
- {ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/pyproject.toml +0 -0
- {ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/setup.cfg +0 -0
- {ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/ultralytics_actions.egg-info/SOURCES.txt +0 -0
- {ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/ultralytics_actions.egg-info/dependency_links.txt +0 -0
- {ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/ultralytics_actions.egg-info/entry_points.txt +0 -0
- {ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/ultralytics_actions.egg-info/requires.txt +0 -0
- {ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/ultralytics_actions.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: ultralytics-actions
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.48
|
4
4
|
Summary: Ultralytics Actions for GitHub automation and PR management.
|
5
5
|
Author-email: Glenn Jocher <glenn.jocher@ultralytics.com>
|
6
6
|
Maintainer-email: Ultralytics <hello@ultralytics.com>
|
@@ -22,7 +22,18 @@ REQUESTS_HEADERS = {
|
|
22
22
|
"Referer": "https://www.google.com/",
|
23
23
|
"Origin": "https://www.google.com/",
|
24
24
|
}
|
25
|
-
|
25
|
+
BAD_HTTP_CODES = frozenset(
|
26
|
+
{
|
27
|
+
# 403, # Forbidden - client lacks permission to access the resource (commented as works in browser typically)
|
28
|
+
404, # Not Found - requested resource doesn't exist
|
29
|
+
405, # Method Not Allowed - HTTP method not supported for this endpoint
|
30
|
+
410, # Gone - resource permanently removed
|
31
|
+
500, # Internal Server Error - server encountered an error
|
32
|
+
502, # Bad Gateway - upstream server sent invalid response
|
33
|
+
503, # Service Unavailable - server temporarily unable to handle request
|
34
|
+
504, # Gateway Timeout - upstream server didn't respond in time
|
35
|
+
}
|
36
|
+
)
|
26
37
|
URL_IGNORE_LIST = frozenset(
|
27
38
|
{
|
28
39
|
"localhost",
|
@@ -44,16 +55,15 @@ URL_IGNORE_LIST = frozenset(
|
|
44
55
|
"storage.googleapis.com", # private GCS buckets
|
45
56
|
}
|
46
57
|
)
|
47
|
-
|
48
58
|
URL_PATTERN = re.compile(
|
49
|
-
r"\[([^]]+)]\((
|
59
|
+
r"\[([^]]+)]\(([^)]+)\)" # Matches Markdown links [text](url)
|
50
60
|
r"|"
|
51
61
|
r"(" # Start capturing group for plaintext URLs
|
52
62
|
r"(?:https?://)?" # Optional http:// or https://
|
53
63
|
r"(?:www\.)?" # Optional www.
|
54
64
|
r"(?:[\w.-]+)?" # Optional domain name and subdomains
|
55
65
|
r"\.[a-zA-Z]{2,}" # TLD
|
56
|
-
r"(?:/[^\s\"'\]]*)?" # Optional path
|
66
|
+
r"(?:/[^\s\"')\]]*)?" # Optional path
|
57
67
|
r")"
|
58
68
|
)
|
59
69
|
|
@@ -85,7 +95,6 @@ def is_url(url, session=None, check=True, max_attempts=3, timeout=2):
|
|
85
95
|
|
86
96
|
if check:
|
87
97
|
requester = session or requests
|
88
|
-
bad_codes = {404, 410, 500, 502, 503, 504}
|
89
98
|
kwargs = {"timeout": timeout, "allow_redirects": True}
|
90
99
|
if not session:
|
91
100
|
kwargs["headers"] = REQUESTS_HEADERS
|
@@ -94,7 +103,7 @@ def is_url(url, session=None, check=True, max_attempts=3, timeout=2):
|
|
94
103
|
try:
|
95
104
|
# Try HEAD first, then GET if needed
|
96
105
|
for method in (requester.head, requester.get):
|
97
|
-
if method(url, stream=method == requester.get, **kwargs).status_code not in
|
106
|
+
if method(url, stream=method == requester.get, **kwargs).status_code not in BAD_HTTP_CODES:
|
98
107
|
return True
|
99
108
|
return False
|
100
109
|
except Exception:
|
@@ -22,8 +22,8 @@ URLS = [
|
|
22
22
|
"https://www.statisticshowto.com/probability-and-statistics/find-outliers/",
|
23
23
|
"https://www.reddit.com/r/Ultralytics/comments/1fw3605/release_megathread/",
|
24
24
|
"https://www.kaggle.com/models/ultralytics/yolo11",
|
25
|
+
# "https://en.wikipedia.org/wiki/Active_learning_(machine_learning)", # ends in trailing parenthesis (not working)
|
25
26
|
"https://apps.apple.com/xk/app/ultralytics/id1583935240",
|
26
|
-
"https://en.wikipedia.org/wiki/Active_learning_(machine_learning)", # parentheses in link
|
27
27
|
]
|
28
28
|
|
29
29
|
|
@@ -41,22 +41,22 @@ def test_is_url():
|
|
41
41
|
|
42
42
|
def test_links_in_string_func():
|
43
43
|
"""Test URLs in strings function."""
|
44
|
-
assert check_links_in_string(" abc ".join(url for url in URLS))
|
44
|
+
assert check_links_in_string(", abc ".join(url for url in URLS))
|
45
45
|
|
46
46
|
|
47
47
|
def test_markdown_links_in_string_func():
|
48
48
|
"""Test Markdown links in strings function."""
|
49
|
-
assert check_links_in_string(" abc ".join(f"[text]({url})" for url in URLS))
|
49
|
+
assert check_links_in_string(", abc ".join(f"[text]({url})" for url in URLS))
|
50
50
|
|
51
51
|
|
52
52
|
def test_html_links_in_string_func():
|
53
53
|
"""Test HTML links in strings function."""
|
54
|
-
assert check_links_in_string(" abc ".join(f'<a href="{url}">text</a>' for url in URLS))
|
54
|
+
assert check_links_in_string(", abc ".join(f'<a href="{url}">text</a>' for url in URLS))
|
55
55
|
|
56
56
|
|
57
57
|
def test_html_links(verbose):
|
58
58
|
"""Tests the validity of URLs within HTML anchor tags and returns any invalid URLs found."""
|
59
|
-
text = "Visit <a href='https://err.com'>our site</a
|
59
|
+
text = "Visit <a href='https://err.com'>our site</a>, or <a href=\"http://test.org\">test site</a>?"
|
60
60
|
result, urls = check_links_in_string(text, verbose, return_bad=True)
|
61
61
|
assert result is False
|
62
62
|
assert set(urls) == {"https://err.com", "http://test.org"}
|
@@ -64,10 +64,10 @@ def test_html_links(verbose):
|
|
64
64
|
|
65
65
|
def test_markdown_links(verbose):
|
66
66
|
"""Validates URLs in Markdown links within a given text using check_links_in_string."""
|
67
|
-
text = "Check [Example](https://err.com) or [Test](http://test.org)"
|
67
|
+
text = "Check [Example](https://err.com/), or [Test](http://test.org)?"
|
68
68
|
result, urls = check_links_in_string(text, verbose, return_bad=True)
|
69
69
|
assert result is False
|
70
|
-
assert set(urls) == {"https://err.com", "http://test.org"}
|
70
|
+
assert set(urls) == {"https://err.com/", "http://test.org"}
|
71
71
|
|
72
72
|
|
73
73
|
def test_mixed_formats(verbose):
|
{ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/ultralytics_actions.egg-info/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: ultralytics-actions
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.48
|
4
4
|
Summary: Ultralytics Actions for GitHub automation and PR management.
|
5
5
|
Author-email: Glenn Jocher <glenn.jocher@ultralytics.com>
|
6
6
|
Maintainer-email: Ultralytics <hello@ultralytics.com>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/actions/update_markdown_code_blocks.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/ultralytics_actions.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
{ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/ultralytics_actions.egg-info/requires.txt
RENAMED
File without changes
|
{ultralytics_actions-0.0.46 → ultralytics_actions-0.0.48}/ultralytics_actions.egg-info/top_level.txt
RENAMED
File without changes
|