adamant-piano-24321
11/10/2022, 7:52 AMalembic.ini
file is not being included in the pex runtime.
I have attempted to explicitly include the ini file using the file and resource pattern.
Still not managing to get this right.
Any advice?wide-midnight-78598
11/10/2022, 11:51 AMhappy-kitchen-89482
11/10/2022, 4:48 PMfile
or a resource
depends on how it’s loaded by alembic.happy-kitchen-89482
11/10/2022, 4:49 PM./pants --keep-sandboxes=always
and poke around in the sandbox for the pytest process. You can see if alembic.ini
is where you expect it to be in the sandbox.happy-kitchen-89482
11/10/2022, 4:49 PMadamant-piano-24321
11/15/2022, 6:04 AMcool-yacht-37128
12/21/2022, 8:31 AMcool-yacht-37128
12/21/2022, 8:32 AMcool-yacht-37128
12/21/2022, 8:32 AMadamant-piano-24321
12/21/2022, 8:41 AM./pants list ::
From this you can see which file with their appropriate path are available to the pants vm.
To include a given file, navigate to the BUILD file in that source dir.
You then have the option to either include a single or multiple files:
file(name="filename", source="filename.yml")
Run list to get the exact file pointer used by pants:
./pants list ::
Then where the file is needed:
python_tests(
name="tests",
dependencies=["path/path:filename"],
)
adamant-piano-24321
12/21/2022, 8:42 AM--keep-sandboxes=always
works a charmcool-yacht-37128
12/21/2022, 10:12 AMprepend_sys_path
config option set in the alembic.ini
to point to my python first party root for alembic to correctly find the models referenced in my env.py
Seems to be something to do with their use of importlib to load modules when using alembic the cli tool