I am new to airflow and have install airflow in remote linux server. But my local develop windows machine haven't installed it.How can I test whether my script work right?I don't have an airflow locally installed,so I can not even use code auto-completion in pycharm,nor can I debug unless I install my own environment. So,my question is: 1.Can I use remote debugging in some way so that I don't need to install airflow locally and the editor(say VS Code) will do linting for me? 2.Should I install the environment and test locally,it seems missing C++ 14.0 is another problem.
Asked
Active
Viewed 2,498 times
1
-
**[1]** For code-completion and linting, you need to install airflow and related packages locally on your machine (and configure your PyCharm project with right Python interpreter so that those packages are picked. Though I'm a [little sceptical](https://stackoverflow.com/q/32378494/3679900) as to whether that can be done without a ton of hacks on windows **[2]** For testing, you can use the very-popular [`puckel/docker-airflow`](https://github.com/puckel/docker-airflow) to quickly spin-up an `Airflow` environment. – y2k-shubham Jul 22 '19 at 10:43
2 Answers
0
I suggest working using the remote environment directly, this way you have the exact environment and you don't have to maintain a local one in sync with the distant one.
Here is a way to do it with Visual Studio Code - Insiders (for compatibility reasons) and installing the Remote Development extension. Then you need to configure the ssh. On the first connection, a wget command is issued on the server and you might need to configure a proxy server if it doesn't work directly.
Once this is done, you should be able to use the remote environment, auto-completion etc.

Jaâfar Karioun
- 24
- 2
0
You could use pdb
to bind at context point of process when running airflow test.
https://docs.python.org/3.7/library/pdb.html

Damon Liao
- 96
- 2
-
From Review: Hi, while links are a great way of sharing knowledge, they won't really answer the question if they get broken in the future. Add to your answer the essential content of the link which answers the question. In case the content is too complex or too big to fit here, describe the general idea of the proposed solution. Remember to always keep a link reference to the original solution's website. See: [How do I write a good answer?](https://stackoverflow.com/help/how-to-answer) – sɐunıɔןɐqɐp Sep 03 '20 at 11:44