wide-midnight-78598
11/02/2023, 11:13 PMalembic is packaged into my pex file, and I want to run the command line to test out migrations and whatnot, but that's looking for an alembic.ini file. Since I can't bundle files into a pex-binary, I need to use a resource. However, when I do that, alembic CLI doesn't know where to look for the config. I think it ends up getting packaged into site packages or something.
Anyone have experience with this?
Eventually I'll be bundling the command into a scie with the rest of my application as a separate command, but trying to quickly test something on a pexcurved-television-6568
11/02/2023, 11:24 PMcurved-television-6568
11/02/2023, 11:26 PMwide-midnight-78598
11/02/2023, 11:26 PMwide-midnight-78598
11/02/2023, 11:28 PMbroad-processor-92400
11/03/2023, 12:05 AMos.chdir to that directory, and then invokes alembic.config.main(argv=args).broad-processor-92400
11/03/2023, 12:06 AMwide-midnight-78598
11/03/2023, 12:14 AM-c CONFIG_PATH or using I believe ALEMBIC_CONFIG envvarwide-midnight-78598
11/03/2023, 12:16 AMSCIE_BOOT=migrate and then just allowing passed in commands, but I just realized that I also have to get the migrations directory included. I thought it was just the config, but alembic needs a path, the scripts directory, and config. Blahwide-midnight-78598
11/03/2023, 12:17 AMbetter-van-82973
11/03/2023, 1:58 AMwide-midnight-78598
11/03/2023, 2:16 AM