Skip to content

Commit

Permalink
AARD-1741: Exporter PIP Dependency Updates (#1024)
Browse files Browse the repository at this point in the history
  • Loading branch information
HunterBarclay authored Aug 2, 2024
2 parents 28b3a96 + 459c8ff commit a8fb4d9
Show file tree
Hide file tree
Showing 4 changed files with 171 additions and 217 deletions.
47 changes: 26 additions & 21 deletions exporter/SynthesisFusionAddin/Synthesis.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
# DO NOT CHANGE ORDER, OR ADD IMPORTS BEFORE UNTIL END COMMENT

import os
from shutil import rmtree
import sys

import adsk.core

from .src.general_imports import APP_NAME, DESCRIPTION, INTERNAL_ID, gm
from .src.Logging import getLogger, logFailure, setupLogger
from .src.UI import (
HUI,
Camera,
ConfigCommand,
Handlers,
Helper,
MarkingMenu,
ShowAPSAuthCommand,
ShowWebsiteCommand,
)
from .src.UI.Toolbar import Toolbar
# Currently required for `resolveDependencies()`, will be required for absolute imports.
sys.path.append(os.path.dirname(os.path.abspath(__file__)))

from .src.Dependencies import resolveDependencies # isort:skip

# END OF RESTRICTION
# Transition: AARD-1741
# Import order should be removed in AARD-1737 and `setupLogger()` moved to `__init__.py`
from .src.Logging import getLogger, logFailure, setupLogger # isort:skip

# Transition: AARD-1721
# Should attempt to fix this ordering scheme within AARD-1741
from .src.APS import APS # isort:skip
setupLogger()

try:
from .src.general_imports import APP_NAME, DESCRIPTION, INTERNAL_ID, gm
from .src.UI import (
HUI,
Camera,
ConfigCommand,
MarkingMenu,
ShowAPSAuthCommand,
ShowWebsiteCommand,
)
from .src.UI.Toolbar import Toolbar
except (ImportError, ModuleNotFoundError) as error:
getLogger().warn(f"Running resolve dependencies with error of:\n{error}")
result = resolveDependencies()
if result:
adsk.core.Application.get().userInterface.messageBox("Installed required dependencies.\nPlease restart Fusion.")


@logFailure
Expand All @@ -33,7 +39,6 @@ def run(_):
Arguments:
**context** *context* -- Fusion context to derive app and UI.
"""
setupLogger()

# Remove all items prior to start just to make sure
unregister_all()
Expand Down
191 changes: 0 additions & 191 deletions exporter/SynthesisFusionAddin/proto/deps.py

This file was deleted.

Loading

0 comments on commit a8fb4d9

Please sign in to comment.