This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
So I'm building my first Python SDK tool (a simple tool that allows you to create directories for outputs), and I think I'm doing something wrong 🙂
The GUI is working; as is a basic tool that passes info through - but the development process is super painful because I can't figure out how to get a development harness working so that I can run within an IDE to test my code.
- Fire up a new project type of "Alteryx Tool Engine"
- This creates proxies for the Alteryx Engine; Incoming Interface; Outgoing Interface etc
- Also allows me to set up test data on inputs; do test driven delivery etc
- I can't figure out how to do a proxy (harness) for the Alteryx Engine; Incoming Interface etc - so all development is in a python tool (like Jupyter / VS Code / IDLE) but I can't run it to test or get any debug messages
- As a result, I may as well be developing in Notepad
- Write Code
- Copy the tools in to the Alteryx folder under ...AppData\roaming\Alteryx\Tools\
- Run a test Alteryx Canvas
- get an error (which is difficult to read in the Alteryx GUI)
- Copy this error into notepad to read it
I feel like I'm missing something fundamental - how do the devs at Alteryx do this and develop new tools in a harness that simulates the Alteryx Engine and all the other critical objects so that you can build and debug right in the IDE?
Am I right that you still don't have the capability to have intellisense /code completion (since the import cannot find the engine definitions); or simulate / emulate engine events; or to script out all your test cases within the IDE?
The reason why I ask is that if the only way I can test a tool is by putting it in Alteryx Designer and running it - then I really can't test robustly. I can't confirm that the right exception type is being raised; or whether I've introduced a regression defect into a complex use-case; etc.
the best possible outcome here would be a series of stubs / proxies which would allow us to simulate the behaviour of the engine within the IDE; give full code intelligence in-IDE; and allow for full TDD and automated testing.
Let me know if I've missed something @Ozzie - I would be super happy if all this exists and is possible right now by switching to PyCharm.
That's correct. I know there some people internally who have made an effort to introduce those features in a separate repo but from what I hear it nowhere near ready to be open-sourced. Also can I ask if you tried using SnakePlane (https://github.com/alteryx/snakeplane)? It's an open-source library that we created to make it easier to develop Python-sdk based tools. I'd give it a look and we would love accepting some feedback from someone like you. It's what we are using now to develop the code-free machine learning tools. Hope this helps.