This section contains documentation for the source code of Astrality, and is intended for the developers of Astrality.
Here we offer a quick overview of the most relevant python modules in the code base, loosely ordered according to their execution order.
- The CLI entry point of Astrality, using the standard library
- The main loop of Astrality, binding everything together. Calls out to the different submodules and handles interruption signals gracefully.
- Compilation and pre-processing of the user configuration according to the heuristics explained in the documentation.
- Retrieval of modules defined in GitHub repositories.
Execution of actions defined in modules.
Each module in the user configuration is represented by a
Module-objects are managed by a single
ModuleManagerobject which iterates over them and executes their actions.
- Module for checking if module requirements are satisfied.
- Module for executing actions such as “import_context”, “compile”, “run”, and “trigger”.
- Implements all the types of module event listeners as subclasses of
- Defines a dictionary-like data structure which contains context values, passed off to Jinja2 template compilation.
- Wrappers around the
Jinja2library for compiling templates with specific context values.
- Implements a file system watcher which dispatches to event handlers when files are modified on disk.
- Utility functions which are used all over the code base, most importantly a wrapper function for running shell commands.