-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Settings and fix launch environment #33
Conversation
…fix/refactor_settings_fix_31 # Conflicts: # client/ayon_usd/hooks/pre_resolver_init.py # client/ayon_usd/utils.py
…s, that'd be a bug that we should squash instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes look good to me, needs testing.
@Lypsolon I suppose this is now in your lap - but I'll also add @antirotor as reviewer just in case. |
…ix/refactor_settings_fix_31 # Conflicts: # client/ayon_usd/addon.py # server/settings/main.py
Basic Testing on Almalinux 9 Im not the biggest fan of using direct Dict[] access but if most developers like this we can keep it this way. i would like to ask @BigRoy and @iLLiCiTiT what you think about using a data class that simply exposes the data. aka: Dataclass(settings).lakeFs_Setting_A instead of the direct dict asses. |
I think the best we could get to is sharing the actual pydantic setting classes and somehow be able to use that frontend without much magic and code shuffling around at runtime so that an IDE is able to pick that up. Otherwise it's still a matter of maintaining the models on both client and backend site separately - which I'd prefer to avoid. But then we'd get type hints as well! (which copying a dataclass to client manually would also do, etc.) - however I have no idea if anything like that is even feasible without code duplication. Anyway, again - there's merit to it, but preferably this is done in a way that makes sense across all addons. So this may be worth a separate issue in a more global space and go from there. Also, no matter what we choose - definitely a separate issue or PR. @Lypsolon could you give the the "Approved" stamp? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple Tests have been Done under Almalinux 9 and looks like it works.
the code looks good.
We could have model that is dynamically created based on server models, but only change at the end would be that I do Sum up: I don't see any advantage to use attributes over dictionary keys. It only adds unecessary conversion step of settings to objects, that cannot be used in IDE, because it has to be created on the fly based on current server model (which IDE does not doo). |
Changelog Description
Refactor settings to match with feedback in #31
Additional info
This is a first pass draft, and likely does not work. Just wanted to put it up so there's visibility on that I have a first pass on this.This now works for me, with both Houdini 20 and Maya 2024.2ayon_core
studio settings and project settings retrieval)PATH
on Windows by accident because it previously stacked toLD_LIBRARY_PATH
and got set toPATH
. It is now 'appended'to
PATH`.A potential downside to this PR is that aside of the LakeFS instance connection it now uses no local cache - which of course can be implemented in a separate PR later.
Testing notes:
Note that there's a currently a non-working git submodule set (like inFixed with updated bin bridge client to fix broken submodule #36develop
branch) forayon_bin_client
. Use branchrelease_v0_1_0
instead for that submodule.