ultralytics-actions 0.0.34__tar.gz → 0.0.35__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.34 → ultralytics_actions-0.0.35}/PKG-INFO +3 -3
- {ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/actions/__init__.py +1 -1
- {ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/actions/utils/common_utils.py +17 -14
- {ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/pyproject.toml +2 -2
- {ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/ultralytics_actions.egg-info/PKG-INFO +3 -3
- {ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/ultralytics_actions.egg-info/requires.txt +2 -2
- {ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/LICENSE +0 -0
- {ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/README.md +0 -0
- {ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/actions/first_interaction.py +0 -0
- {ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/actions/summarize_pr.py +0 -0
- {ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/actions/summarize_release.py +0 -0
- {ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/actions/update_markdown_code_blocks.py +0 -0
- {ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/actions/utils/__init__.py +0 -0
- {ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/actions/utils/github_utils.py +0 -0
- {ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/actions/utils/openai_utils.py +0 -0
- {ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/setup.cfg +0 -0
- {ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/ultralytics_actions.egg-info/SOURCES.txt +0 -0
- {ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/ultralytics_actions.egg-info/dependency_links.txt +0 -0
- {ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/ultralytics_actions.egg-info/entry_points.txt +0 -0
- {ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/ultralytics_actions.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ultralytics-actions
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.35
|
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>
|
@@ -28,8 +28,8 @@ Classifier: Operating System :: OS Independent
|
|
28
28
|
Requires-Python: >=3.8
|
29
29
|
Description-Content-Type: text/markdown
|
30
30
|
License-File: LICENSE
|
31
|
-
Requires-Dist: requests>=2.
|
32
|
-
Requires-Dist: ruff>=0.
|
31
|
+
Requires-Dist: requests>=2.32.3
|
32
|
+
Requires-Dist: ruff>=0.8.4
|
33
33
|
Requires-Dist: docformatter>=1.7.5
|
34
34
|
Provides-Extra: dev
|
35
35
|
Requires-Dist: pytest; extra == "dev"
|
@@ -1,10 +1,9 @@
|
|
1
1
|
# Ultralytics Actions 🚀, AGPL-3.0 license https://ultralytics.com/license
|
2
2
|
|
3
3
|
import re
|
4
|
-
import socket
|
5
4
|
import time
|
6
|
-
import urllib
|
7
5
|
from concurrent.futures import ThreadPoolExecutor
|
6
|
+
from urllib import parse
|
8
7
|
|
9
8
|
|
10
9
|
def remove_html_comments(body: str) -> str:
|
@@ -37,6 +36,10 @@ def is_url(url, check=True, max_attempts=3, timeout=2):
|
|
37
36
|
"github.com", # ignore GitHub links that may be private repos
|
38
37
|
"kaggle.com", # blocks automated header requests
|
39
38
|
"reddit.com", # blocks automated header requests
|
39
|
+
"linkedin.com",
|
40
|
+
"twitter.com",
|
41
|
+
"x.com",
|
42
|
+
"storage.googleapis.com", # private GCS buckets
|
40
43
|
)
|
41
44
|
try:
|
42
45
|
# Check allow list
|
@@ -44,7 +47,7 @@ def is_url(url, check=True, max_attempts=3, timeout=2):
|
|
44
47
|
return True
|
45
48
|
|
46
49
|
# Check structure
|
47
|
-
result =
|
50
|
+
result = parse.urlparse(url)
|
48
51
|
if not all([result.scheme, result.netloc]):
|
49
52
|
return False
|
50
53
|
|
@@ -52,16 +55,14 @@ def is_url(url, check=True, max_attempts=3, timeout=2):
|
|
52
55
|
if check:
|
53
56
|
for attempt in range(max_attempts):
|
54
57
|
try:
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
)
|
62
|
-
|
63
|
-
return response.getcode() < 400
|
64
|
-
except (urllib.error.URLError, socket.timeout):
|
58
|
+
headers = {
|
59
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/120.0.0.0",
|
60
|
+
"Accept": "*",
|
61
|
+
"Accept-Language": "*",
|
62
|
+
"Accept-Encoding": "*",
|
63
|
+
}
|
64
|
+
return requests.head(url, headers=headers, timeout=timeout, allow_redirects=True).status_code < 400
|
65
|
+
except Exception:
|
65
66
|
if attempt == max_attempts - 1: # last attempt
|
66
67
|
return False
|
67
68
|
time.sleep(2**attempt) # exponential backoff
|
@@ -84,13 +85,15 @@ def check_links_in_string(text, verbose=True, return_bad=False):
|
|
84
85
|
r"(?:/[^\s\"')\]]*)?" # Optional path
|
85
86
|
r")"
|
86
87
|
)
|
88
|
+
# all_urls.extend([url for url in match if url and parse.urlparse(url).scheme])
|
87
89
|
all_urls = []
|
88
90
|
for md_text, md_url, plain_url in re.findall(pattern, text):
|
89
91
|
url = md_url or plain_url
|
90
|
-
if url and
|
92
|
+
if url and parse.urlparse(url).scheme:
|
91
93
|
all_urls.append(url)
|
92
94
|
|
93
95
|
urls = set(map(clean_url, all_urls)) # remove extra characters and make unique
|
96
|
+
# bad_urls = [x for x in urls if not is_url(x, check=True)] # single-thread
|
94
97
|
with ThreadPoolExecutor(max_workers=16) as executor: # multi-thread
|
95
98
|
bad_urls = [url for url, valid in zip(urls, executor.map(lambda x: not is_url(x, check=True), urls)) if valid]
|
96
99
|
|
{ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/ultralytics_actions.egg-info/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ultralytics-actions
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.35
|
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>
|
@@ -28,8 +28,8 @@ Classifier: Operating System :: OS Independent
|
|
28
28
|
Requires-Python: >=3.8
|
29
29
|
Description-Content-Type: text/markdown
|
30
30
|
License-File: LICENSE
|
31
|
-
Requires-Dist: requests>=2.
|
32
|
-
Requires-Dist: ruff>=0.
|
31
|
+
Requires-Dist: requests>=2.32.3
|
32
|
+
Requires-Dist: ruff>=0.8.4
|
33
33
|
Requires-Dist: docformatter>=1.7.5
|
34
34
|
Provides-Extra: dev
|
35
35
|
Requires-Dist: pytest; extra == "dev"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/actions/update_markdown_code_blocks.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/ultralytics_actions.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
{ultralytics_actions-0.0.34 → ultralytics_actions-0.0.35}/ultralytics_actions.egg-info/top_level.txt
RENAMED
File without changes
|