Hi!
I have some thoughts about my workflow when I’am developing hooks. For now i use PyCharm to wrtie scripts witohud any mocking or testing. When i think that script is ready. I’am upadting configuration and test it directly in Maya for example. It’s definitly not optimal way to do that. So my question is, how do you work with developing your Shotgun? I mean do you use any mocks, so you dont need to run Maya via Shotgun everytime you want to test your script? What i want to achive if possible is to work mainly in scirpt editor like PyCharm, without need to run Maya or else software, to test if for example collector collect all mesh i need for example. Any ideas?
For now we don’t have tests for hooks, though we do for other things.
I go with unittests for pure interfaces that do not need to use the dcc libraries.
It is largely pointless to mock dcc functions, imo.
Since you use PyCharm, I think it supports remote debugging out of the box (never used PyCharm but I’ve heard), so have a look at remote_pdb. Debugging is pretty powerful to allow you to take things apart and figure out problems faster. It also generally reduces the number of times you have to restart your program while fixing something.
Another thing is to launch programs via tank command, which allows you to open directly a scene in the same command, reducing greatly the number of actions to get to a testing setup.
Not sure how to achieve this in PyCharm but surely there is something like that:
run a process with
tank "Task" "@6154" "houdini_fx_18.5.351" "path/to/scene"
This also gets you in the right context, etc.
There are other tricks to speed up testing. I gotta run now, might add more here later.