Let me just spell out some thoughts:
(As far as I know and please correct me if I’m wrong.)
- Testing integration addon’s functionality (e.g. Nuke addon) is different from testing core functionalities and API calls. as the integration addon is supposed to be run within the host (e.g. Nuke) it self.
- Being able to import all code from different addons doesn’t mean you have a working AYON dev environment setup because there are important things that happens on initialization (e.g. setting tool groups for your current context). This is reason why I only used these paths for code completion without caring much about running it.
Possible ways to test:
(sorry for repeating most of @BigRoy’s answer)
-
Run Code in AYON’s console (script editor). (Access it via Tray menu, Admin > Console)
-
Ask AYON to run a script. which I think is equivalent to the previous suggestion). You can do it via terminal.
ayon_console run /path/to/pythonscript.py
-
Run AYON in interactively (Python like) console.
ayon_console interactive
-
There some internal discussion about using
Jupyter
but currently there is some conflicts in the dependencies on my side. and there is no request for supportingJupyter
atm. -
Open Terminal with your app environment initialized. I think it can be a middle ground for running scripts while expecting all env to be set like
AYON_PROJECT_NAME
.
-
Run Apps in Headless mode and build up some testing scripts like if you are doing it outside of AYON.
ayon_console addon applications launch --app <app_name> -- project <project_name> --folder <ayon_folder_path> --task <ayon_task_name>
-
Use AYON Dev Mode where you can test directly/manually client code. Ayon Developer Mode -- Guide