Luke Wyman
09/17/2021, 4:27 AMinstallCommands
to get those same steps to happen with sst.
The thing is, I'm wondering if some take on this could become a feature of sst. Typescript sst projects have their nice, clean way of running tests in test
using Jest, and the tsconfig
et al working the deployment. As it currently stands, coordinating testing and deployment with Python in sst seems a little under-developed by comparison.Frank
Frank
Frank
/
libs/
my-lib.py
handlers/
my-handler.py
One issue that often pop up is if my-handler
tries to import my-lib
, it can’t be done because Lambda doesn’t support relative import, ie. from ..libs
. But that works when running locally in sst start
Frank
Frank
Luke Wyman
09/19/2021, 1:33 AMsst deploy
, or whether this should just be left as a space for Python engineers to use their usual build and packaging tooling.
I'm sitting down tonight to play with installCommands
some more and make another little spike out of that. I think what I'll do, is summarize some steps from the results of my spikes that may or not be abstractable, addressing:
1. The do-ability of relative imports like from ..libs
- I believe it's doable, from what I've seen so far. I'll be sure to note what my discoveries are around that.
2. The steps a Python dev may expect to happen during deployment, either as independent, scripted commands that they manage, or as steps abstracted away in the cdk constructs and in an sst deploy
(kinda thinking about the scripts construct you guys recently added to sst).
3. Either publishing the .whl
as a package to a private Python package server, or just going direct from the .whl
into the zip (making relative imports like from ..libs
doable).
Will let you know! :)