ultralytics 8.0.51 add assets and CI actions (#1296)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Paul Kehrer <paulhkehrer@gmail.com>
This commit is contained in:
Glenn Jocher 2023-03-07 20:25:10 +01:00 committed by GitHub
parent f0d8e4718b
commit 790f9c067c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 272 additions and 107 deletions

View file

@ -134,12 +134,20 @@ def check_latest_pypi_version(package_name='ultralytics'):
return None
def check_pip_update():
def check_pip_update_available():
"""
Checks if a new version of the ultralytics package is available on PyPI.
Returns:
bool: True if an update is available, False otherwise.
"""
from ultralytics import __version__
latest = check_latest_pypi_version()
if pkg.parse_version(__version__) < pkg.parse_version(latest):
if pkg.parse_version(__version__) < pkg.parse_version(latest): # update is available
LOGGER.info(f'New https://pypi.org/project/ultralytics/{latest} available 😃 '
f"Update with 'pip install -U ultralytics'")
return True
return False
def check_font(font='Arial.ttf'):