Hi,
On 12/28/22 10:31, Roy Smith wrote:
How do people install their bots into toolforge? In the past, I've just done a "git pull" to the bastion host and run with the code directly out of the source tree, but I'm not sure that's a good plan.
This is what I do. Each bot/webapp has a requirements.txt with a mix of pinned and unpinned dependencies, I create the virtualenv, install requirements.txt. For webapps, this is automated with the `webservice-python-bootstrap` script[1]. Whenever I git pull, manually check to see if I need to reinstall/update dependencies.
I personally find this to be the simplest way of enabling straightforward local development and minimal work to deploy, usually it's just `git pull && webservice restart`.
The stumbling block with that plan seems to be that toolforge insists on your webapp being installed at $HOME/www/python/src/app.py, which isn't going to play well with a wheel installation.
Right. From a Toolforge perspective, if there's some other, better way to do it, filing a bug would be a good first step to figuring out how to add that. T229172[2] contains some discussion of PEP 517 which ACN mentioned, but doesn't discuss the requirement of app.py.
[1] https://wikitech.wikimedia.org/wiki/Help:Toolforge/Web/Python#Creating_a_vir... [2] https://phabricator.wikimedia.org/T229172
-- Kunal / Legoktm