diff --git a/run_tests.py b/run_tests.py index 0832fd9cdbfe2..1ca7963a8843b 100644 --- a/run_tests.py +++ b/run_tests.py @@ -2,6 +2,9 @@ import os import sys from pymongo import MongoClient +import requests +from run_tests_CLI.get_all_tests import BACKENDS + submodules = ( "test_paddle", @@ -45,6 +48,18 @@ } +def get_latest_package_version(package_name): + try: + url = f"https://pypi.org/pypi/{package_name}/json" + response = requests.get(url) + response.raise_for_status() + package_info = response.json() + return package_info["info"]["version"] + except requests.exceptions.RequestException as e: + print(f"Error: Failed to fetch package information for {package_name}.") + return None + + def make_clickable(url, name): return ( f'