Customizing Aeromancy projects#
To quickly set up an Aeromancy project, we've created a Copier template. See instructions at the quant-aq/aeromancy-project-template.
In the generated Python project setup (pyproject.toml
), you may also want to
adjust:
- Extra Python packages: Add them with
pdm add <pkgname>
. See PDM docs for more information on this. pdm
scripts: Some of these are necessary for running Aeromancy (likepdm go
), but you can add more if there are common tasks for your project.- Extra
docker run
arguments: (E.g., mounting volumes). These can be bakedpdm go
script with--extra-docker-run-args='...'
. The template includes a standard volume mapping (data/
) for ingesting datasets. - Extra Debian packages: (outside of those included by Aeromancy), you may
want to bake them into the
pdm go
script with--extra-debian-package='...'
(specify the flag once per package name). - Extra environment variables: If your code needs information in environment
variables (e.g., API keys and other credentials), you can pass tell Aeromancy
to pass these through to container with
--extra-env-var
(specify the flag once per variable). Use these sparingly, as they could make steps using these variables harder to reproduce and are not tracked by Aeromancy.
Filesystem layout#
Ultimately, the structure of an Aeromancy project should look something like this:
<projectroot>/
pyproject.toml
pdm.lock
main.py # AeroMain
src/
<projectname>/
<youractions>.py
<youractionbuilder>.py
The structure of the classes containing your
Action
(s) and
ActionBuilder
is flexible -- they
just need to be importable in AeroMain.