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:
parent
f0d8e4718b
commit
790f9c067c
21 changed files with 272 additions and 107 deletions
|
|
@ -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'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue