Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/pinning_file_in_publishi…
Browse files Browse the repository at this point in the history
…ng' into feature/pinning_file_in_publishing
  • Loading branch information
antirotor committed Sep 17, 2024
2 parents ab3f860 + 9e71df1 commit f70006f
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
5 changes: 3 additions & 2 deletions client/ayon_usd/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from .utils import ADDON_DATA_JSON_PATH, DOWNLOAD_DIR
from .version import __version__

from .ayon_bin_client.ayon_bin_distro.gui import progress_ui
from .ayon_bin_client.ayon_bin_distro.work_handler import worker
from .ayon_bin_client.ayon_bin_distro.util import zip
from .ayon_bin_client.ayon_bin_distro.work_handler import worker

Expand Down Expand Up @@ -123,11 +123,12 @@ def tray_start(self):
dependency_id=[usd_download_work_item.get_uuid()],
)

from .ayon_bin_client.ayon_bin_distro.gui import progress_ui
download_ui = progress_ui.ProgressDialog(
controller,
close_on_finish=True,
auto_close_timeout=1,
delet_progress_bar_on_finish=False,
delete_progress_bar_on_finish=False,
title="ayon_usd-Addon [UsdLib Download]",
)
download_ui.setStyleSheet(style.load_stylesheet())
Expand Down
6 changes: 4 additions & 2 deletions client/ayon_usd/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ def _get_lakefs_repo_items(lake_fs_repo: str) -> list:
def get_lakefs_usdlib_name(lake_fs_repo: str) -> str:
"""Return AyonUsdBin/usd LakeFS repo object name for current platform."""
platform_name = platform.system().lower()
for item in _get_lakefs_repo_items(lake_fs_repo):
lake_fs_repo_items = _get_lakefs_repo_items(lake_fs_repo)
for item in lake_fs_repo_items:
if "AyonUsdBin/usd" in item and platform_name in item:
return item

raise RuntimeError(
"No AyonUsdBin/usd item found for current platform "
f"'{platform_name}' on LakeFS server: {lake_fs_repo}")
f"'{platform_name}' on LakeFS server: {lake_fs_repo}. "
f"All LakeFS repository items found: {lake_fs_repo_items}")


def get_lakefs_usdlib_path(settings: dict) -> str:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@


def _normalize_path(path):
if (sys.platform.startswith('win')
and len(path) > 1
and path[1] == ':'
):

path = path[0].lower() + path[1:]
# On windows force drive letter to lowercase
if sys.platform.startswith('win'):
drive, tail = os.path.splitdrive(path)
drive = drive.lower()
path = f"{drive}{tail}"

return os.path.normpath(path)

Expand Down
2 changes: 1 addition & 1 deletion client/ayon_usd/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
"""Package declaring AYON addon 'ayon_usd' version."""
__version__ = "0.1.0-alpha-dev.1"
__version__ = "0.1.0-alpha"
2 changes: 1 addition & 1 deletion package.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

name = "ayon_usd"
title = "Usd Addon"
version = "0.1.0-alpha-dev.1"
version = "0.1.0-alpha"
client_dir = "ayon_usd"

services = {}
Expand Down
2 changes: 1 addition & 1 deletion server/settings/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class LakeFsSettings(BaseSettingsModel):
description="The url to your LakeFs server.",
)
server_repo: str = SettingsField(
"lakefs://ayon-usd/main/",
"lakefs://ayon-usd/v0.1.0/",
title="LakeFs Repository Uri",
description="The url to your LakeFs Repository Path",
)
Expand Down

0 comments on commit f70006f

Please sign in to comment.